[net-next] ibmveth: Make array ibmveth_stats static
diff mbox series

Message ID 20190319144237.19288-1-yuehaibing@huawei.com
State Not Applicable
Headers show
Series
  • [net-next] ibmveth: Make array ibmveth_stats static
Related show

Checks

Context Check Description
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded and removed 1 sparse warnings
snowpatch_ozlabs/build-ppc64le success Build succeeded and removed 1 sparse warnings
snowpatch_ozlabs/apply_patch success Successfully applied on branch next (de3c83c2fd2b87cf68214eda76dfa66989d78cb6)

Commit Message

YueHaibing March 19, 2019, 2:42 p.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

Fix sparse warning:
drivers/net/ethernet/ibm/ibmveth.c:96:21:
 warning: symbol 'ibmveth_stats' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/ibm/ibmveth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller March 19, 2019, 9:10 p.m. UTC | #1
From: Yue Haibing <yuehaibing@huawei.com>
Date: Tue, 19 Mar 2019 22:42:37 +0800

> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fix sparse warning:
> drivers/net/ethernet/ibm/ibmveth.c:96:21:
>  warning: symbol 'ibmveth_stats' was not declared. Should it be static?
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

Patch
diff mbox series

diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index dd71d5d..d86b0e5 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -93,7 +93,7 @@  struct ibmveth_stat {
 #define IBMVETH_STAT_OFF(stat) offsetof(struct ibmveth_adapter, stat)
 #define IBMVETH_GET_STAT(a, off) *((u64 *)(((unsigned long)(a)) + off))
 
-struct ibmveth_stat ibmveth_stats[] = {
+static struct ibmveth_stat ibmveth_stats[] = {
 	{ "replenish_task_cycles", IBMVETH_STAT_OFF(replenish_task_cycles) },
 	{ "replenish_no_mem", IBMVETH_STAT_OFF(replenish_no_mem) },
 	{ "replenish_add_buff_failure",