Skip to contentSkip to conversation

device-dax: make dev_dax_kmem_probe() static

PATCH In review Wei Yongjun 2 participants 2 messages Jul 7, 2020 – Jul 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 device-dax: make dev_dax_kmem_probe() static

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.

---
 drivers/dax/kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dax/kmem.c +1 -1
index 275aa5f87399..87e271668170 100644
@@ -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;
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Wei Yongjun

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.

Seems ok,

Quoted 18 lines
---
 drivers/dax/kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dax/kmem.c +1 -1
index 275aa5f87399..87e271668170 100644
@@ -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;