Skip to contentSkip to conversation

fs/dax: Fix run_dax() missing prototype

PATCH In review [email protected] 2 participants 3 messages Mar 4, 2022 – Mar 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/dax: Fix run_dax() missing prototype

From: Ira Weiny <[email protected]>

The function run_dax() was missing a prototype when compiling with warnings.

Add bus.h to fix this.

---
 drivers/dax/super.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dax/super.c +1 -0
index e3029389d809..5c003cc73d04 100644
@@ -14,6 +14,7 @@
 #include <linux/dax.h>
 #include <linux/fs.h>
 #include "dax-private.h"
+#include "bus.h"
 
 /**
  * struct dax_device - anchor object for dax services
Signature · 1 line
2.35.1
#1 lore raw
Quoted 8 lines · On Fri, Mar 4, 2022 at 12:38 PM <[email protected]> wrote:

From: Ira Weiny <[email protected]>

The function run_dax() was missing a prototype when compiling with warnings.

Add bus.h to fix this.

Always include the warning and the compiler in the changelog. I suspect you hit this with LLVM and not gcc?

super.c has no business including bus.h. If the bots are tripping over this a better fix is to move it into dax-private.h.

author
#2 lore raw
Quoted 11 lines · Dan Williams
Quoted 8 lines · On Fri, Mar 4, 2022 at 12:38 PM <[email protected]> wrote:

From: Ira Weiny <[email protected]>

The function run_dax() was missing a prototype when compiling with warnings.

Add bus.h to fix this.

Always include the warning and the compiler in the changelog.

Sorry.

Quoted 2 lines

I
suspect you hit this with LLVM and not gcc?

No this was with gcc.

gcc -Wp,-MMD,drivers/dax/.super.o.d -nostdinc -I./arch/x86/include
...
-D__KBUILD_MODNAME=kmod_dax -c -o drivers/dax/super.o drivers/dax/super.c ;
./tools/objtool/objtool orc generate --no-fp --retpoline --uaccess drivers/dax/super.o
drivers/dax/super.c:276:6: warning: no previous prototype for ‘run_dax’ [-Wmissing-prototypes]
276 | void run_dax(struct dax_device *dax_dev)
| ^~~~~~~

Quoted 3 lines

super.c has no business including bus.h. If the bots are tripping over this a better fix is to move it into dax-private.h.

It was not a bot just me using W=1.

I can ignore it or move the prototype to dax-private.h.

Ira