Skip to contentSkip to conversation

habanalabs: make some functions static

PATCH In review Wei Yongjun 2 participants 2 messages Jul 29, 2020 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 habanalabs: make some functions static

The sparse tool complains as follows:

drivers/misc/habanalabs/gaudi/gaudi.c:6275:5: warning:
symbol 'gaudi_ctx_init' was not declared. Should it be static?
drivers/misc/habanalabs/goya/goya.c:5228:5: warning:
symbol 'goya_ctx_init' was not declared. Should it be static?

Those functions are not used outside of source file, so this commit marks them static.

Fixes a04b7cd97eef ("habanalabs: create internal CB pool")
---
 drivers/misc/habanalabs/gaudi/gaudi.c | 2 +-
 drivers/misc/habanalabs/goya/goya.c | 2 +-
 2 file changed, 2 insertion(+), 2 deletion(-)
drivers/misc/habanalabs/gaudi/gaudi.c +1 -1
index d4b3b995f69d..00a0a7238d81 100644
@@ -6272,7 +6272,7 @@ static enum hl_device_hw_state gaudi_get_hw_state(struct hl_device *hdev)
 	return RREG32(mmHW_STATE);
 }
 
-int gaudi_ctx_init(struct hl_ctx *ctx)
+static int gaudi_ctx_init(struct hl_ctx *ctx)
 {
 	return 0;
 }
drivers/misc/habanalabs/goya/goya.c +1 -1
index dedcd2211fb7..85030759b2af 100644
@@ -5225,7 +5225,7 @@ static enum hl_device_hw_state goya_get_hw_state(struct hl_device *hdev)
 	return RREG32(mmHW_STATE);
 }
 
-int goya_ctx_init(struct hl_ctx *ctx)
+static int goya_ctx_init(struct hl_ctx *ctx)
 {
 	return 0;
 }
#1 lore raw
Quoted 7 lines · Wei Yongjun

The sparse tool complains as follows:

drivers/misc/habanalabs/gaudi/gaudi.c:6275:5: warning:
symbol 'gaudi_ctx_init' was not declared. Should it be static?
drivers/misc/habanalabs/goya/goya.c:5228:5: warning:
symbol 'goya_ctx_init' was not declared. Should it be static?

Quoted 6 lines

Those functions are not used outside of source file, so this commit marks them static.

Fixes a04b7cd97eef ("habanalabs: create internal CB pool")

0-day already sent this patch in earlier today, sorry.

greg k-h