nvdimm: fix inline function return type warning
PATCH 1/1 nvdimm: fix inline function return type warning
From: Randy Dunlap <[email protected]>
Fix multiple build warnings when CONFIG_BTT is not enabled:
In file included from ../drivers/nvdimm/bus.c:29:0:../drivers/nvdimm/nd.h:169:15: warning: return type defaults to 'int' [-Wreturn-type]
static inline nd_btt_probe(struct nd_namespace_common *ndns, void *drvdata)
^
Signed-off-by Randy Dunlap <[email protected]>
Cc Dan Williams <[email protected]>
--- drivers/nvdimm/nd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvdimm/nd.h +1 -1
@@ -166,7 +166,7 @@ int nd_btt_probe(struct nd_namespace_combool is_nd_btt (struct device *dev);struct device *nd_btt_create (struct nd_region *nd_region);#else -static inline nd_btt_probe(struct nd_namespace_common *ndns, void *drvdata) +static inline int nd_btt_probe (struct nd_namespace_common *ndns,void *drvdata) {return -ENODEV ; }
Dan Williams
AppliedQuoted 4 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
Fix multiple build warnings when
CONFIG_BTTis not enabled:
Quoted 8 lines
In file included from
../drivers/nvdimm/bus.c:29:0:../drivers/nvdimm/nd.h:169:15: warning: return type defaults to 'int' [-Wreturn-type]
static inlinend_btt_probe(struct nd_namespace_common *ndns, void *drvdata)^Signed-off-by Randy Dunlap <[email protected]>Cc Dan Williams <[email protected]>
Applied to libnvdimm-for-next. Thanks Randy!