Skip to contentSkip to conversation

IB/hfi1: make hist static

PATCH Applied Jiapeng Chong 2 participants 2 messages Sep 6, 2021 – Sep 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/hfi1: make hist static

From: chongjiapeng <[email protected]>

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?

---
 drivers/infiniband/hw/hfi1/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/trace.c +1 -1
index d9b5bbb..8302469 100644
@@ -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)
 };
 
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Jiapeng Chong

From: chongjiapeng <[email protected]>

This symbol is not used outside of trace.c, so marks it static.

Fix the following sparse warning:

Quoted 8 lines

drivers/infiniband/hw/hfi1/trace.c:491:23: warning: symbol 'hist' was not declared. Should it be static?

---
 drivers/infiniband/hw/hfi1/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-rc, thanks

Jason