Skip to contentSkip to conversation

nvdimm: fix inline function return type warning

PATCH Applied Randy Dunlap 2 participants 2 messages Jul 28, 2015 – Jul 31, 2015 libnvdimm: non-volatile memory device

lore
Share & tools
lore
#0 lore raw

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)

               ^
---
 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_com
 bool 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;
 }
Applied
#1 lore raw
Quoted 4 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix multiple build warnings when CONFIG_BTT is 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 inline nd_btt_probe(struct nd_namespace_common *ndns, void *drvdata)

               ^

Applied to libnvdimm-for-next. Thanks Randy!