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?
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: chongjiapeng <[email protected]>
---
drivers/infiniband/hw/hfi1/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
};
--
1.8.3.1
On Mon, Sep 06, 2021 at 05:48:43PM +0800, Jiapeng Chong wrote:
> 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?
>
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: chongjiapeng <[email protected]>
> ---
> drivers/infiniband/hw/hfi1/trace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-rc, thanks
Jason