RE: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-23 Thread David Laight
.. > I totally agree with this one but usually it's already reported by > another one (probably the one complaining about misindenting). The > case I've seen quite a few times was: > > while (condition); > > At least I want the ';' on its own line to avoid it being > confused with one that e

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Willy Tarreau
On Mon, Mar 22, 2021 at 05:34:48PM +0100, Arnd Bergmann wrote: > On Mon, Mar 22, 2021 at 5:26 PM Willy Tarreau wrote: > > On Mon, Mar 22, 2021 at 05:18:23PM +0100, Arnd Bergmann wrote: > > > and a lot mostly harmless code like > > > > > > #ifdef DEBUG_THIS_DRIVER /* always disabled */ > > > #defin

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
On Mon, Mar 22, 2021 at 5:26 PM Willy Tarreau wrote: > On Mon, Mar 22, 2021 at 05:18:23PM +0100, Arnd Bergmann wrote: > > and a lot mostly harmless code like > > > > #ifdef DEBUG_THIS_DRIVER /* always disabled */ > > #define dprintk(args...) printk(args) > > #else > > #define dprintk(args...) > >

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Willy Tarreau
On Mon, Mar 22, 2021 at 05:18:23PM +0100, Arnd Bergmann wrote: > I agree that this instance of the warning is particularly stupid, but the > I'd like to leave the warning option there and eventually enable it by > default because it tends to find other more interesting cases, and this > one is triv

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
On Mon, Mar 22, 2021 at 4:53 PM Willy Tarreau wrote: > On Mon, Mar 22, 2021 at 03:47:35PM +, Christoph Hellwig wrote: > > On Mon, Mar 22, 2021 at 12:44:34PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > Building with 'make W=1' shows a harmless warning for pscsi: > > > > >

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Matthew Wilcox
On Mon, Mar 22, 2021 at 12:44:34PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Building with 'make W=1' shows a harmless warning for pscsi: > > drivers/target/target_core_pscsi.c: In function 'pscsi_complete_cmd': > drivers/target/target_core_pscsi.c:624:33: error: suggest braces aroun

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Willy Tarreau
On Mon, Mar 22, 2021 at 03:47:35PM +, Christoph Hellwig wrote: > On Mon, Mar 22, 2021 at 12:44:34PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > Building with 'make W=1' shows a harmless warning for pscsi: > > > > drivers/target/target_core_pscsi.c: In function 'pscsi_complete

Re: [PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Christoph Hellwig
On Mon, Mar 22, 2021 at 12:44:34PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Building with 'make W=1' shows a harmless warning for pscsi: > > drivers/target/target_core_pscsi.c: In function 'pscsi_complete_cmd': > drivers/target/target_core_pscsi.c:624:33: error: suggest braces aroun

[PATCH] target: pscsi: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann Building with 'make W=1' shows a harmless warning for pscsi: drivers/target/target_core_pscsi.c: In function 'pscsi_complete_cmd': drivers/target/target_core_pscsi.c:624:33: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 624 |