Skip to content

Commit 2d51535

Browse files
arndbdjbw
authored andcommitted
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: 83762cb ("dax: Kill DEV_DAX_PMEM_COMPAT") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230517125532.931157-1-arnd@kernel.org Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent e764f12 commit 2d51535

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

drivers/dax/bus.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ void dax_driver_unregister(struct dax_device_driver *dax_drv);
4949
void kill_dev_dax(struct dev_dax *dev_dax);
5050
bool static_dev_dax(struct dev_dax *dev_dax);
5151

52-
/*
53-
* While run_dax() is potentially a generic operation that could be
54-
* defined in include/linux/dax.h we don't want to grow any users
55-
* outside of drivers/dax/
56-
*/
57-
void run_dax(struct dax_device *dax_dev);
58-
5952
#define MODULE_ALIAS_DAX_DEVICE(type) \
6053
MODULE_ALIAS("dax:t" __stringify(type) "*")
6154
#define DAX_DEVICE_MODALIAS_FMT "dax:t%d"

drivers/dax/dax-private.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ struct dev_dax {
7676
} *ranges;
7777
};
7878

79+
/*
80+
* While run_dax() is potentially a generic operation that could be
81+
* defined in include/linux/dax.h we don't want to grow any users
82+
* outside of drivers/dax/
83+
*/
84+
void run_dax(struct dax_device *dax_dev);
85+
7986
static inline struct dev_dax *to_dev_dax(struct device *dev)
8087
{
8188
return container_of(dev, struct dev_dax, dev);

drivers/dax/device.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static void dev_dax_kill(void *dev_dax)
396396
kill_dev_dax(dev_dax);
397397
}
398398

399-
int dev_dax_probe(struct dev_dax *dev_dax)
399+
static int dev_dax_probe(struct dev_dax *dev_dax)
400400
{
401401
struct dax_device *dax_dev = dev_dax->dax_dev;
402402
struct device *dev = &dev_dax->dev;
@@ -471,7 +471,6 @@ int dev_dax_probe(struct dev_dax *dev_dax)
471471
run_dax(dax_dev);
472472
return devm_add_action_or_reset(dev, dev_dax_kill, dev_dax);
473473
}
474-
EXPORT_SYMBOL_GPL(dev_dax_probe);
475474

476475
static struct dax_device_driver device_dax_driver = {
477476
.probe = dev_dax_probe,

0 commit comments

Comments
 (0)