Skip to contentSkip to conversation

net: qed: Move static keyword to the front of declaration

PATCH Applied Krzysztof Wilczynski 3 participants 3 messages Sep 4, 2019 – Sep 5, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: qed: Move static keyword to the front of declaration

Move the static keyword to the front of declaration of iwarp_state_names, and resolve the following compiler warning that can be seen when building with warnings enabled (W=1):

drivers/net/ethernet/qlogic/qed/qed_iwarp.c:385:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

Also, resolve checkpatch.pl script warning:

WARNING: static const char * array should probably be
static const char * const

---
Related: https://lore.kernel.org/r/[email protected]

 drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_iwarp.c +1 -1
index f380fae8799d..65ec16a31658 100644
@@ -382,7 +382,7 @@ qed_iwarp2roce_state(enum qed_iwarp_qp_state state)
 	}
 }
 
-const static char *iwarp_state_names[] = {
+static const char * const iwarp_state_names[] = {
 	"IDLE",
 	"RTS",
 	"TERMINATE",
Signature · 1 line
2.22.1
Acked-by on v1 1/1
#1 lore raw
Quoted 39 lines

From: Krzysztof Wilczynski <[email protected]> On Behalf Of Krzysztof Wilczynski

External Email

----------------------------------------------------------------------
Move the static keyword to the front of declaration of iwarp_state_names, and resolve the following compiler warning that can be seen when building with warnings enabled (W=1):

drivers/net/ethernet/qlogic/qed/qed_iwarp.c:385:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

Also, resolve checkpatch.pl script warning:

WARNING: static const char * array should probably be
static const char * const

---
Related: https://lore.kernel.org/r/[email protected]

 drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_iwarp.c +1 -1
index f380fae8799d..65ec16a31658 100644
@@ -382,7 +382,7 @@ qed_iwarp2roce_state(enum qed_iwarp_qp_state
 state)
 	}
 }
 
-const static char *iwarp_state_names[] = {
+static const char * const iwarp_state_names[] = {
 	"IDLE",
 	"RTS",
Quoted 1 line

"TERMINATE",

Thanks,

Quoted 2 lines

--
2.22.1

maintainer Applied
#2 lore raw
In reply to Krzysztof Wilczynski

From: Krzysztof Wilczynski <[email protected]>
Date: Wed, 4 Sep 2019 16:17:30 +0200

Quoted 7 lines

Move the static keyword to the front of declaration of iwarp_state_names, and resolve the following compiler warning that can be seen when building with warnings enabled (W=1):

drivers/net/ethernet/qlogic/qed/qed_iwarp.c:385:1: warning:
‘static’ is not at beginning of declaration [-Wold-style-declaration]

Quoted 6 lines

Also, resolve checkpatch.pl script warning:

WARNING: static const char * array should probably be
static const char * const

Applied to net-next.