public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 1/2] cmd: bind: Fix driver binding on a device
Date: Fri, 9 Apr 2021 09:13:12 -0400	[thread overview]
Message-ID: <d88c5c18-baa2-32cb-8baa-4a2021271ec8@gmail.com> (raw)
In-Reply-To: <1b1695a5-dd8b-b6c9-e04d-910b90ad7257@foss.st.com>

On 4/9/21 8:05 AM, Patrice CHOTARD wrote:
> 
> 
> On 4/9/21 1:01 PM, Andy Shevchenko wrote:
>> On Fri, Apr 9, 2021 at 1:32 PM Patrice CHOTARD
>> <patrice.chotard@foss.st.com> wrote:
>>> On 4/9/21 11:48 AM, Andy Shevchenko wrote:
>>>> On Fri, Apr 9, 2021 at 12:28 PM Patrice CHOTARD
>>>> <patrice.chotard@foss.st.com> wrote:
>>>>> On 4/9/21 11:16 AM, Andy Shevchenko wrote:
>>>>>> On Fri, Apr 9, 2021 at 10:37 AM Patrice Chotard
>>>>>> <patrice.chotard@foss.st.com> wrote:
>>
>> ...
>>
>>>>>>> +                       if (drv) {
>>>>>>> +                               if (drv == entry)
>>>>>>> +                                       break;
>>>>>>
>>>>>>> +                       } else {
>>>>>>> +                               if (!ret)
>>>>>>> +                                       break;
>>>>>>> +                       }
>>>>>>
>>>>>> This can be simplified to
>>>>>> } else if (!ret)
>>>>>>    break;
>>>>>
>>>>> I know but checkpatch.pl requested it ;-)
>>>>
>>>> You mean it doesn't recognize 'else if' construction? Then it's a bug
>>>> there for sure.
>>>>
>>>
>>> No, i mean checkpath.pl request to put {} on all statements as shown below :
>>>
>>> ./scripts/checkpatch.pl 0001-cmd-bind-Fix-driver-binding-on-a-device.patch
>>> CHECK: braces {} should be used on all arms of this statement
>>> #83: FILE: drivers/core/lists.c:228:
>>> +                       if (drv) {
>>> [...]
>>> +                       } else if (!ret)
>>
>> So, you still can put else and if on one line, right?
>>
> 
> No, if i put else and if on one line as you suggested, checkpatch.pl is complaining as shown above.
> 
> Patrice
> 

} else if (!ret) {
	break;
}

?

  reply	other threads:[~2021-04-09 13:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  7:36 [PATCH v1 0/2] cmd: bind: Fix driver binding Patrice Chotard
2021-04-09  7:36 ` [PATCH v1 1/2] cmd: bind: Fix driver binding on a device Patrice Chotard
2021-04-09  9:16   ` Andy Shevchenko
2021-04-09  9:28     ` Patrice CHOTARD
2021-04-09  9:48       ` Andy Shevchenko
2021-04-09 10:32         ` Patrice CHOTARD
2021-04-09 11:01           ` Andy Shevchenko
2021-04-09 12:05             ` Patrice CHOTARD
2021-04-09 13:13               ` Sean Anderson [this message]
2021-04-09 13:41                 ` Andy Shevchenko
2021-04-09 14:34                   ` Patrice CHOTARD
2021-04-14 19:38   ` Simon Glass
2021-04-16 16:16     ` Patrice CHOTARD
2021-04-09  7:36 ` [PATCH v1 2/2] usb: gadget: Add bcdDevice for the DWC2 USB Gadget Controller Patrice Chotard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d88c5c18-baa2-32cb-8baa-4a2021271ec8@gmail.com \
    --to=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox