From: Leon Romanovsky <leon@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Networking <netdev@vger.kernel.org>,
Karsten Keil <isdn@linux-pingi.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/5] misdn: avoid -Wempty-body warning
Date: Mon, 22 Mar 2021 14:06:15 +0200 [thread overview]
Message-ID: <YFiIN50pcTnO4X3M@unreal> (raw)
In-Reply-To: <CAK8P3a3WZmBB=bxNc=taaDwBksLOPVPzhXPAFJ3QCG+eA+Xxww@mail.gmail.com>
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@kernel.org> wrote:
> > On Mon, Mar 22, 2021 at 11:43:31AM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.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@arndb.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
next prev parent reply other threads:[~2021-03-22 12:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 10:43 [PATCH net-next 1/5] misdn: avoid -Wempty-body warning Arnd Bergmann
2021-03-22 10:43 ` [PATCH net-next 3/5] iwlegacy: " Arnd Bergmann
2021-03-22 11:31 ` Stanislaw Gruszka
2021-04-11 9:32 ` Kalle Valo
2021-03-22 10:43 ` [PATCH net-next 4/5] libertas: " Arnd Bergmann
2021-04-17 18:01 ` Kalle Valo
2021-03-22 10:43 ` [PATCH net-next 5/5] vxge: avoid -Wemtpy-body warnings Arnd Bergmann
2021-03-24 20:08 ` Arnd Bergmann
2021-03-22 10:55 ` [PATCH net-next 1/5] misdn: avoid -Wempty-body warning Leon Romanovsky
2021-03-22 11:24 ` Arnd Bergmann
2021-03-22 12:06 ` Leon Romanovsky [this message]
2021-03-22 12:48 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2021-03-22 10:43 [PATCH net-next 2/5] dccp: avoid Wempty-body warning Arnd Bergmann
2021-03-22 10:43 ` Arnd Bergmann
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=YFiIN50pcTnO4X3M@unreal \
--to=leon@kernel.org \
--cc=arnd@kernel.org \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.