2018-08-10 01:31:50

by kernel test robot

[permalink] [raw]
Subject: [net-next:master 1939/1953] drivers/net/ethernet/qlogic/qede/qede_main.c:539:5: sparse: symbol 'qede_setup_tc' was not declared. Should it be static?

tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 36d2f761b5aa688567b6aebdc6d68e73682275d4
commit: 5e7baf0fcb2a3aef7329f3c7543d4695a46bd321 [1939/1953] qed/qede: Multi CoS support.
reproduce:
# apt-get install sparse
git checkout 5e7baf0fcb2a3aef7329f3c7543d4695a46bd321
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/qlogic/qede/qede_main.c:539:5: sparse: symbol 'qede_setup_tc' was not declared. Should it be static?
include/linux/slab.h:631:13: sparse: undefined identifier '__builtin_mul_overflow'
include/linux/slab.h:631:13: sparse: not a function <noident>
drivers/net/ethernet/qlogic/qede/qede_main.c:1175:19: sparse: expression using sizeof(void)
drivers/net/ethernet/qlogic/qede/qede_main.c:1175:19: sparse: expression using sizeof(void)
include/linux/slab.h:631:13: sparse: call with no type!

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


2018-08-10 01:32:22

by Fengguang Wu

[permalink] [raw]
Subject: [RFC PATCH net-next] qed/qede: qede_setup_tc() can be static


Fixes: 5e7baf0fcb2a ("qed/qede: Multi CoS support.")
Signed-off-by: kbuild test robot <[email protected]>
---
qede_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 4b5d98f..46d0f2e 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -536,7 +536,7 @@ static int qede_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}

-int qede_setup_tc(struct net_device *ndev, u8 num_tc)
+static int qede_setup_tc(struct net_device *ndev, u8 num_tc)
{
struct qede_dev *edev = netdev_priv(ndev);
int cos, count, offset;

2018-08-10 21:43:41

by David Miller

[permalink] [raw]
Subject: Re: [RFC PATCH net-next] qed/qede: qede_setup_tc() can be static

From: kbuild test robot <[email protected]>
Date: Fri, 10 Aug 2018 09:29:59 +0800

> Fixes: 5e7baf0fcb2a ("qed/qede: Multi CoS support.")
> Signed-off-by: kbuild test robot <[email protected]>

Applied.