linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] habanalabs: make some functions static
@ 2020-07-29 15:59 Wei Yongjun
  2020-07-29 16:02 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-07-29 15:59 UTC (permalink / raw)
  To: Hulk Robot, Oded Gabbay, Arnd Bergmann, Greg Kroah-Hartman,
	Omer Shpigelman, Ofir Bitton, Tomer Tayar
  Cc: Wei Yongjun, linux-kernel

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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/misc/habanalabs/gaudi/gaudi.c | 2 +-
 drivers/misc/habanalabs/goya/goya.c | 2 +-
 2 file changed, 2 insertion(+), 2 deletion(-)

diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index d4b3b995f69d..00a0a7238d81 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -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;
 }
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index dedcd2211fb7..85030759b2af 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -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;
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] habanalabs: make some functions static
  2020-07-29 15:59 [PATCH -next] habanalabs: make some functions static Wei Yongjun
@ 2020-07-29 16:02 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-29 16:02 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Hulk Robot, Oded Gabbay, Arnd Bergmann, Omer Shpigelman,
	Ofir Bitton, Tomer Tayar, linux-kernel

On Wed, Jul 29, 2020 at 11:59:25PM +0800, Wei Yongjun wrote:
> 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")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

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

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-29 16:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 15:59 [PATCH -next] habanalabs: make some functions static Wei Yongjun
2020-07-29 16:02 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).