[PATCH v1 1/2] cmd: bind: Fix driver binding on a device
Andy Shevchenko
andy.shevchenko at gmail.com
Fri Apr 9 13:01:02 CEST 2021
On Fri, Apr 9, 2021 at 1:32 PM Patrice CHOTARD
<patrice.chotard at 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 at 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 at 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?
--
With Best Regards,
Andy Shevchenko
More information about the U-Boot
mailing list