lkml.org 
[lkml]   [2021]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 10/13] usb: core: config: fix checkpatch.pl braces warning
    This fixes the following checkpatch.pl warnings:

    core/config.c:268: CHECK:BRACES: braces {} should be used on all arms of this statement
    core/config.c:272: CHECK:BRACES: Unbalanced braces around else statement
    core/config.c:649: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

    Signed-off-by: Robert Greener <rob@robgreener.com>
    ---
    drivers/usb/core/config.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
    index 9717f89bcb6f..76038e8c84c5 100644
    --- a/drivers/usb/core/config.c
    +++ b/drivers/usb/core/config.c
    @@ -265,11 +265,12 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
    buffer += d->bLength;
    size -= d->bLength;

    - if (d->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE)
    + if (d->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE) {
    n = USB_DT_ENDPOINT_AUDIO_SIZE;
    - else if (d->bLength >= USB_DT_ENDPOINT_SIZE)
    + }
    + else if (d->bLength >= USB_DT_ENDPOINT_SIZE) {
    n = USB_DT_ENDPOINT_SIZE;
    - else {
    + } else {
    dev_warn(ddev,
    "config %d interface %d altsetting %d has an invalid endpoint descriptor of length %d, skipping\n",
    cfgno, inum, asnum, d->bLength);
    @@ -646,7 +647,6 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
    for ((buffer2 = buffer, size2 = size);
    size2 > 0;
    (buffer2 += header->bLength, size2 -= header->bLength)) {
    -
    if (size2 < sizeof(struct usb_descriptor_header)) {
    dev_warn(ddev,
    "config %d descriptor has %d excess byte%s, ignoring\n",
    --
    2.32.0
    \
     
     \ /
      Last update: 2021-10-05 16:07    [W:2.877 / U:1.924 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site