lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFiIN50pcTnO4X3M@unreal>
Date:   Mon, 22 Mar 2021 14:06:15 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Networking <netdev@...r.kernel.org>,
        Karsten Keil <isdn@...ux-pingi.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 1/5] misdn: avoid -Wempty-body warning

On Mon, Mar 22, 2021 at 12:24:20PM +0100, Arnd Bergmann wrote:
> On Mon, Mar 22, 2021 at 11:55 AM Leon Romanovsky <leon@...nel.org> wrote:
> > On Mon, Mar 22, 2021 at 11:43:31AM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@...db.de>
> > >
> > > gcc warns about a pointless condition:
> > >
> > > drivers/isdn/hardware/mISDN/hfcmulti.c: In function 'hfcmulti_interrupt':
> > > drivers/isdn/hardware/mISDN/hfcmulti.c:2752:17: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> > >  2752 |                 ; /* external IRQ */
> > >
> > > Change this as suggested by gcc, which also fits the style of the
> > > other conditions in this function.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > > ---
> > >  drivers/isdn/hardware/mISDN/hfcmulti.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
> > > index 7013a3f08429..8ab0fde758d2 100644
> > > --- a/drivers/isdn/hardware/mISDN/hfcmulti.c
> > > +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
> > > @@ -2748,8 +2748,9 @@ hfcmulti_interrupt(int intno, void *dev_id)
> > >               if (hc->ctype != HFC_TYPE_E1)
> > >                       ph_state_irq(hc, r_irq_statech);
> > >       }
> > > -     if (status & V_EXT_IRQSTA)
> > > -             ; /* external IRQ */
> > > +     if (status & V_EXT_IRQSTA) {
> > > +             /* external IRQ */
> > > +     }
> >
> > Any reason do not delete this hunk?
> 
> I don't care either way, I only kept it because it was apparently left there
> on purpose by the original author, as seen by the comment.

I personally would delete it.

Thanks

> 
>         Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ