diff mbox series

IB/hfi1: make hist static

Message ID 1630921723-21545-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series IB/hfi1: make hist static | expand

Commit Message

Jiapeng Chong Sept. 6, 2021, 9:48 a.m. UTC
From: chongjiapeng <jiapeng.chong@linux.alibaba.com>

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?

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
---
 drivers/infiniband/hw/hfi1/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe Sept. 8, 2021, 11:44 a.m. UTC | #1
On Mon, Sep 06, 2021 at 05:48:43PM +0800, Jiapeng Chong wrote:
> From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> 
> 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?
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/infiniband/hw/hfi1/trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hfi1/trace.c b/drivers/infiniband/hw/hfi1/trace.c
index d9b5bbb..8302469 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)
 };