Skip to content

Commit 3e4ab15

Browse files
nathanchancegregkh
authored andcommitted
net: tulip: Adjust indentation in {dmfe, uli526x}_init_module
commit fe06bf3 upstream. Clang warns: ../drivers/net/ethernet/dec/tulip/uli526x.c:1812:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] switch (mode) { ^ ../drivers/net/ethernet/dec/tulip/uli526x.c:1809:2: note: previous statement is here if (cr6set) ^ 1 warning generated. ../drivers/net/ethernet/dec/tulip/dmfe.c:2217:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] switch(mode) { ^ ../drivers/net/ethernet/dec/tulip/dmfe.c:2214:2: note: previous statement is here if (cr6set) ^ 1 warning generated. This warning occurs because there is a space before the tab on these lines. Remove them so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. While we are here, adjust the default block in dmfe_init_module to have a proper break between the label and assignment and add a space between the switch and opening parentheses to avoid a checkpatch warning. Fixes: e1c3e50 ("[PATCH] initialisation cleanup for ULI526x-net-driver") Link: ClangBuiltLinux/linux#795 Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 12b6b8f commit 3e4ab15

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

drivers/net/ethernet/dec/tulip/dmfe.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,15 +2225,16 @@ static int __init dmfe_init_module(void)
22252225
if (cr6set)
22262226
dmfe_cr6_user_set = cr6set;
22272227

2228-
switch(mode) {
2229-
case DMFE_10MHF:
2228+
switch (mode) {
2229+
case DMFE_10MHF:
22302230
case DMFE_100MHF:
22312231
case DMFE_10MFD:
22322232
case DMFE_100MFD:
22332233
case DMFE_1M_HPNA:
22342234
dmfe_media_mode = mode;
22352235
break;
2236-
default:dmfe_media_mode = DMFE_AUTO;
2236+
default:
2237+
dmfe_media_mode = DMFE_AUTO;
22372238
break;
22382239
}
22392240

drivers/net/ethernet/dec/tulip/uli526x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,8 +1813,8 @@ static int __init uli526x_init_module(void)
18131813
if (cr6set)
18141814
uli526x_cr6_user_set = cr6set;
18151815

1816-
switch (mode) {
1817-
case ULI526X_10MHF:
1816+
switch (mode) {
1817+
case ULI526X_10MHF:
18181818
case ULI526X_100MHF:
18191819
case ULI526X_10MFD:
18201820
case ULI526X_100MFD:

0 commit comments

Comments
 (0)