diff mbox

nvdimm: fix inline function return type warning

Message ID 55B7D785.6050900@infradead.org (mailing list archive)
State Accepted
Commit f6ef5a2a5081
Headers show

Commit Message

Randy Dunlap July 28, 2015, 7:27 p.m. UTC
From: Randy Dunlap <rdunlap@infradead.org>

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@infradead.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: linux-nvdimm@lists.01.org
---
 drivers/nvdimm/nd.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dan Williams July 31, 2015, 10:37 p.m. UTC | #1
On Tue, Jul 28, 2015 at 12:27 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> 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@infradead.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: linux-nvdimm@lists.01.org

Applied to libnvdimm-for-next.  Thanks Randy!
diff mbox

Patch

--- 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;
 }