]> git.baikalelectronics.ru Git - kernel.git/commit
net: qed: move static iro_arr[] out of header file
authorAlexander Lobakin <alobakin@marvell.com>
Mon, 6 Jul 2020 15:38:13 +0000 (18:38 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jul 2020 20:18:55 +0000 (13:18 -0700)
commite19d95a42e52d3c6ea0af1627a27be4bbb9a614b
treeffbc36bfcf0cc1504d5b7e087314a58d6f54c492
parente591540444fdecae210927e1f1deb536b888a1a6
net: qed: move static iro_arr[] out of header file

Static variables (and functions, unless they're inline) should not
be declared in header files.
Move the static array iro_arr[] from "qed_hsi.h" to the sole place
where it's used, "qed_init_ops.c". This eliminates lots of warnings
(42 of them actually) against W=1+:

In file included from drivers/net/ethernet/qlogic/qed/qed.h:51:0,
                 from drivers/net/ethernet/qlogic/qed/qed_ooo.c:40:
drivers/net/ethernet/qlogic/qed/qed_hsi.h:4421:18: warning: 'iro_arr'
defined but not used [-Wunused-const-variable=]
 static const u32 iro_arr[] = {
                  ^~~~~~~

Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_hsi.h
drivers/net/ethernet/qlogic/qed/qed_init_ops.c