* [PATCH] net: smc911x: Adjust indentation in smc911x_phy_configure
@ 2019-12-09 21:50 Nathan Chancellor
2019-12-10 4:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2019-12-09 21:50 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, linux-kernel, clang-built-linux, Nathan Chancellor
Clang warns:
../drivers/net/ethernet/smsc/smc911x.c:939:3: warning: misleading
indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
if (!lp->ctl_rfduplx)
^
../drivers/net/ethernet/smsc/smc911x.c:936:2: note: previous statement
is here
if (lp->ctl_rspeed != 100)
^
1 warning generated.
This warning occurs because there is a space after the tab on this line.
Remove it so that the indentation is consistent with the Linux kernel
coding style and clang no longer warns.
Fixes: 0a0c72c9118c ("[PATCH] RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips")
Link: https://github.com/ClangBuiltLinux/linux/issues/796
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/net/ethernet/smsc/smc911x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index 4cc679376c9a..186c0bddbe5f 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -936,7 +936,7 @@ static void smc911x_phy_configure(struct work_struct *work)
if (lp->ctl_rspeed != 100)
my_ad_caps &= ~(ADVERTISE_100BASE4|ADVERTISE_100FULL|ADVERTISE_100HALF);
- if (!lp->ctl_rfduplx)
+ if (!lp->ctl_rfduplx)
my_ad_caps &= ~(ADVERTISE_100FULL|ADVERTISE_10FULL);
/* Update our Auto-Neg Advertisement Register */
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: smc911x: Adjust indentation in smc911x_phy_configure
2019-12-09 21:50 [PATCH] net: smc911x: Adjust indentation in smc911x_phy_configure Nathan Chancellor
@ 2019-12-10 4:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-10 4:32 UTC (permalink / raw)
To: natechancellor; +Cc: netdev, linux-kernel, clang-built-linux
From: Nathan Chancellor <natechancellor@gmail.com>
Date: Mon, 9 Dec 2019 14:50:27 -0700
> Clang warns:
>
> ../drivers/net/ethernet/smsc/smc911x.c:939:3: warning: misleading
> indentation; statement is not part of the previous 'if'
> [-Wmisleading-indentation]
> if (!lp->ctl_rfduplx)
> ^
> ../drivers/net/ethernet/smsc/smc911x.c:936:2: note: previous statement
> is here
> if (lp->ctl_rspeed != 100)
> ^
> 1 warning generated.
>
> This warning occurs because there is a space after the tab on this line.
> Remove it so that the indentation is consistent with the Linux kernel
> coding style and clang no longer warns.
>
> Fixes: 0a0c72c9118c ("[PATCH] RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips")
> Link: https://github.com/ClangBuiltLinux/linux/issues/796
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-10 4:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 21:50 [PATCH] net: smc911x: Adjust indentation in smc911x_phy_configure Nathan Chancellor
2019-12-10 4:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).