* [PATCH] net: qed: Move static keyword to the front of declaration
@ 2019-09-04 14:17 Krzysztof Wilczynski
2019-09-05 7:10 ` [EXT] " Michal Kalderon
2019-09-05 10:39 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Wilczynski @ 2019-09-04 14:17 UTC (permalink / raw)
To: Ariel Elior; +Cc: David S. Miller, GR-everest-linux-l2, netdev, linux-kernel
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
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
---
Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com
drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
index f380fae8799d..65ec16a31658 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
@@ -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",
--
2.22.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [EXT] [PATCH] net: qed: Move static keyword to the front of declaration
2019-09-04 14:17 [PATCH] net: qed: Move static keyword to the front of declaration Krzysztof Wilczynski
@ 2019-09-05 7:10 ` Michal Kalderon
2019-09-05 10:39 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Michal Kalderon @ 2019-09-05 7:10 UTC (permalink / raw)
To: Krzysztof Wilczynski, Ariel Elior
Cc: David S. Miller, GR-everest-linux-l2, netdev, linux-kernel
> From: Krzysztof Wilczynski <kswilczynski@gmail.com> 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
>
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
> ---
> Related: https://lore.kernel.org/r/20190827233017.GK9987@google.com
>
> drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> index f380fae8799d..65ec16a31658 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c
> @@ -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",
Thanks,
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
> --
> 2.22.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: qed: Move static keyword to the front of declaration
2019-09-04 14:17 [PATCH] net: qed: Move static keyword to the front of declaration Krzysztof Wilczynski
2019-09-05 7:10 ` [EXT] " Michal Kalderon
@ 2019-09-05 10:39 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-09-05 10:39 UTC (permalink / raw)
To: kw; +Cc: aelior, GR-everest-linux-l2, netdev, linux-kernel
From: Krzysztof Wilczynski <kw@linux.com>
Date: Wed, 4 Sep 2019 16:17:30 +0200
> 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
>
> Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
Applied to net-next.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-05 10:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 14:17 [PATCH] net: qed: Move static keyword to the front of declaration Krzysztof Wilczynski
2019-09-05 7:10 ` [EXT] " Michal Kalderon
2019-09-05 10:39 ` 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).