[PATCH] nvdimm: fix inline function return type warning

From: Randy Dunlap
Date: Tue Jul 28 2015 - 15:27:08 EST


From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

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 <rdunlap@xxxxxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: linux-nvdimm@xxxxxxxxxxxx
---
drivers/nvdimm/nd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- lnx-42-rc4.orig/drivers/nvdimm/nd.h
+++ lnx-42-rc4/drivers/nvdimm/nd.h
@@ -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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/