summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchongjiapeng <jiapeng.chong@linux.alibaba.com>2021-09-06 11:48:43 +0200
committerJason Gunthorpe <jgg@nvidia.com>2021-09-08 13:33:04 +0200
commit2169b908894df2ce83e7eb4a399d3224b2635126 (patch)
treeceba49b7b8f903bbd541e57eb19b9f84365c011c
parentRDMA/bnxt_re: Prefer kcalloc over open coded arithmetic (diff)
downloadlinux-2169b908894df2ce83e7eb4a399d3224b2635126.tar.xz
linux-2169b908894df2ce83e7eb4a399d3224b2635126.zip
IB/hfi1: make hist static
This symbol is not used outside of trace.c, so marks it static. Fix the following sparse warning: drivers/infiniband/hw/hfi1/trace.c:491:23: warning: symbol 'hist' was not declared. Should it be static? Link: https://lore.kernel.org/r/1630921723-21545-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r--drivers/infiniband/hw/hfi1/trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/trace.c b/drivers/infiniband/hw/hfi1/trace.c
index d9b5bbb2d011..8302469582c6 100644
--- a/drivers/infiniband/hw/hfi1/trace.c
+++ b/drivers/infiniband/hw/hfi1/trace.c
@@ -488,7 +488,7 @@ struct hfi1_ctxt_hist {
atomic_t data[255];
};
-struct hfi1_ctxt_hist hist = {
+static struct hfi1_ctxt_hist hist = {
.count = ATOMIC_INIT(0)
};