[-next] device-dax: make dev_dax_kmem_probe() static
diff mbox series

Message ID 20200707112340.9178-1-weiyongjun1@huawei.com
State New
Headers show
Series
  • [-next] device-dax: make dev_dax_kmem_probe() static
Related show

Commit Message

Wei Yongjun July 7, 2020, 11:23 a.m. UTC
sparse report warning as follows:

drivers/dax/kmem.c:22:5: warning:
 symbol 'dev_dax_kmem_probe' was not declared. Should it be static?

dev_dax_kmem_probe() is not used outside of kmem.c, so marks
it static.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/dax/kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ira Weiny July 11, 2020, 3:31 a.m. UTC | #1
On Tue, Jul 07, 2020 at 07:23:40PM +0800, Wei Yongjun wrote:
> sparse report warning as follows:
> 
> drivers/dax/kmem.c:22:5: warning:
>  symbol 'dev_dax_kmem_probe' was not declared. Should it be static?
> 
> dev_dax_kmem_probe() is not used outside of kmem.c, so marks
> it static.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Seems ok,

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
>  drivers/dax/kmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
> index 275aa5f87399..87e271668170 100644
> --- a/drivers/dax/kmem.c
> +++ b/drivers/dax/kmem.c
> @@ -19,7 +19,7 @@ static const char *kmem_name;
>  /* Set if any memory will remain added when the driver will be unloaded. */
>  static bool any_hotremove_failed;
>  
> -int dev_dax_kmem_probe(struct device *dev)
> +static int dev_dax_kmem_probe(struct device *dev)
>  {
>  	struct dev_dax *dev_dax = to_dev_dax(dev);
>  	struct resource *res = &dev_dax->region->res;
>

Patch
diff mbox series

diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 275aa5f87399..87e271668170 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -19,7 +19,7 @@  static const char *kmem_name;
 /* Set if any memory will remain added when the driver will be unloaded. */
 static bool any_hotremove_failed;
 
-int dev_dax_kmem_probe(struct device *dev)
+static int dev_dax_kmem_probe(struct device *dev)
 {
 	struct dev_dax *dev_dax = to_dev_dax(dev);
 	struct resource *res = &dev_dax->region->res;