diff mbox series

[net-next,v2] misdn: avoid -Wempty-body warning

Message ID 20210322121453.653228-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit 13e8c216d2ed0bf99b6e8ae4d1edd1f17d6b6448
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] misdn: avoid -Wempty-body warning | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 3 of 3 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 10 this patch: 9
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 10 this patch: 9
netdev/header_inline success Link

Commit Message

Arnd Bergmann March 22, 2021, 12:14 p.m. UTC
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 */

As the check has no effect, just remove it.

Suggested-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: remove the line instead of adding {}
---
 drivers/isdn/hardware/mISDN/hfcmulti.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Leon Romanovsky March 22, 2021, 1:58 p.m. UTC | #1
On Mon, Mar 22, 2021 at 01:14:47PM +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 */
> 
> As the check has no effect, just remove it.
> 
> Suggested-by: Leon Romanovsky <leon@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: remove the line instead of adding {}
> ---
>  drivers/isdn/hardware/mISDN/hfcmulti.c | 2 --
>  1 file changed, 2 deletions(-)
> 

Thanks, interesting when we will delete whole drivers/isdn :)

Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Arnd Bergmann March 22, 2021, 2:37 p.m. UTC | #2
On Mon, Mar 22, 2021 at 2:58 PM Leon Romanovsky <leon@kernel.org> wrote:
>
> Thanks, interesting when we will delete whole drivers/isdn :)
>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

Not any time soon I think, Harald Welte mentioned that Osmocom
still relies on mISDN.

The CAPI stuff only remains because of net/bluetooth/cmtp/ though.
I don't think there are any users, but Marcel wanted to keep cmtp
since it is not really hardware specific. We could probably move
drivers/isdn/capi/* to net/bluetooth/cmtp/ if there was a good reason.

         Arnd
patchwork-bot+netdevbpf@kernel.org March 22, 2021, 8:30 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Mon, 22 Mar 2021 13:14:47 +0100 you 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 */
> 
> [...]

Here is the summary with links:
  - [net-next,v2] misdn: avoid -Wempty-body warning
    https://git.kernel.org/netdev/net-next/c/13e8c216d2ed

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 7013a3f08429..14092152b786 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -2748,8 +2748,6 @@  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_LOST_STA) {
 		/* LOST IRQ */
 		HFC_outb(hc, R_INC_RES_FIFO, V_RES_LOST); /* clear irq! */