habanalabs: make some functions static
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.
--- 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
@@ -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
@@ -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 ; }
Greg Kroah-Hartman
maintainerQuoted 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")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
0-day already sent this patch in earlier today, sorry.
greg k-h