From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Fri, 9 Apr 2021 16:41:34 +0300 Subject: [PATCH v1 1/2] cmd: bind: Fix driver binding on a device In-Reply-To: References: <20210409073617.16045-1-patrice.chotard@foss.st.com> <20210409073617.16045-2-patrice.chotard@foss.st.com> <2d124ca6-664d-08b8-909f-1bde35856529@foss.st.com> <014a0559-aec0-6a65-77fd-141707a58d7c@foss.st.com> <1b1695a5-dd8b-b6c9-e04d-910b90ad7257@foss.st.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Apr 09, 2021 at 09:13:12AM -0400, Sean Anderson wrote: > 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 > > > wrote: > > > > On 4/9/21 11:48 AM, Andy Shevchenko wrote: > > > > > On Fri, Apr 9, 2021 at 12:28 PM Patrice CHOTARD > > > > > wrote: > > > > > > On 4/9/21 11:16 AM, Andy Shevchenko wrote: > > > > > > > On Fri, Apr 9, 2021 at 10:37 AM Patrice Chotard > > > > > > > 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; > } > > ? Thanks, that's fine for me. Does checkpatch.pl complain on this? -- With Best Regards, Andy Shevchenko