Commit 2d515352 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Dan Williams

dax: fix missing-prototype warnings

dev_dax_probe declaration for this function was removed with the only
caller outside of device.c. Mark it static to avoid a W=1
warning:
drivers/dax/device.c:399:5: error: no previous prototype for 'dev_dax_probe'

Similarly, run_dax() causes a warning, but this one is because the
declaration needs to be included:

drivers/dax/super.c:337:6: error: no previous prototype for 'run_dax'

Fixes: 83762cb5 ("dax: Kill DEV_DAX_PMEM_COMPAT")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230517125532.931157-1-arnd@kernel.orgSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent e764f122
...@@ -49,13 +49,6 @@ void dax_driver_unregister(struct dax_device_driver *dax_drv); ...@@ -49,13 +49,6 @@ void dax_driver_unregister(struct dax_device_driver *dax_drv);
void kill_dev_dax(struct dev_dax *dev_dax); void kill_dev_dax(struct dev_dax *dev_dax);
bool static_dev_dax(struct dev_dax *dev_dax); bool static_dev_dax(struct dev_dax *dev_dax);
/*
* While run_dax() is potentially a generic operation that could be
* defined in include/linux/dax.h we don't want to grow any users
* outside of drivers/dax/
*/
void run_dax(struct dax_device *dax_dev);
#define MODULE_ALIAS_DAX_DEVICE(type) \ #define MODULE_ALIAS_DAX_DEVICE(type) \
MODULE_ALIAS("dax:t" __stringify(type) "*") MODULE_ALIAS("dax:t" __stringify(type) "*")
#define DAX_DEVICE_MODALIAS_FMT "dax:t%d" #define DAX_DEVICE_MODALIAS_FMT "dax:t%d"
......
...@@ -76,6 +76,13 @@ struct dev_dax { ...@@ -76,6 +76,13 @@ struct dev_dax {
} *ranges; } *ranges;
}; };
/*
* While run_dax() is potentially a generic operation that could be
* defined in include/linux/dax.h we don't want to grow any users
* outside of drivers/dax/
*/
void run_dax(struct dax_device *dax_dev);
static inline struct dev_dax *to_dev_dax(struct device *dev) static inline struct dev_dax *to_dev_dax(struct device *dev)
{ {
return container_of(dev, struct dev_dax, dev); return container_of(dev, struct dev_dax, dev);
......
...@@ -396,7 +396,7 @@ static void dev_dax_kill(void *dev_dax) ...@@ -396,7 +396,7 @@ static void dev_dax_kill(void *dev_dax)
kill_dev_dax(dev_dax); kill_dev_dax(dev_dax);
} }
int dev_dax_probe(struct dev_dax *dev_dax) static int dev_dax_probe(struct dev_dax *dev_dax)
{ {
struct dax_device *dax_dev = dev_dax->dax_dev; struct dax_device *dax_dev = dev_dax->dax_dev;
struct device *dev = &dev_dax->dev; struct device *dev = &dev_dax->dev;
...@@ -471,7 +471,6 @@ int dev_dax_probe(struct dev_dax *dev_dax) ...@@ -471,7 +471,6 @@ int dev_dax_probe(struct dev_dax *dev_dax)
run_dax(dax_dev); run_dax(dax_dev);
return devm_add_action_or_reset(dev, dev_dax_kill, dev_dax); return devm_add_action_or_reset(dev, dev_dax_kill, dev_dax);
} }
EXPORT_SYMBOL_GPL(dev_dax_probe);
static struct dax_device_driver device_dax_driver = { static struct dax_device_driver device_dax_driver = {
.probe = dev_dax_probe, .probe = dev_dax_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment