Skip to contentSkip to conversation

m68k: /proc/hardware depends on PROC_FS

PATCH In review Randy Dunlap 2 participants 3 messages Feb 9, 2023 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: /proc/hardware depends on PROC_FS

When CONFIG_PROC_FS is not set, there is a build error for an unused function. Make PROC_HARDWARE depend on PROC_FS to prevent this error.

In file included from ../arch/m68k/kernel/setup.c:3:
../arch/m68k/kernel/setup_mm.c:477:12: error: 'hardware_proc_show' defined but not used [-Werror=unused-function]
477 | static int hardware_proc_show(struct seq_file *m, void *v)

      |            ^~~~~~~~~~~~~~~~~~
Fixes 66d857b08b8c ("m68k: merge m68k and m68knommu arch directories") # v3.0
Cc Geert Uytterhoeven <[email protected]>
Cc Greg Ungerer <[email protected]>
---
 arch/m68k/Kconfig.devices |    1 +
 1 file changed, 1 insertion(+)
arch/m68k/Kconfig.devices +1 -0
diff -- a/arch/m68k/Kconfig.devices b/arch/m68k/Kconfig.devices
@@ -18,6 +18,7 @@ config HEARTBEAT
 
 # We have a dedicated heartbeat LED. :-)
 config PROC_HARDWARE
+	depends on PROC_FS
 	bool "/proc/hardware support"
 	help
 	  Say Y here to support the /proc/hardware file, which gives you
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Randy,

Quoted 10 lines · Randy Dunlap

When CONFIG_PROC_FS is not set, there is a build error for an unused function. Make PROC_HARDWARE depend on PROC_FS to prevent this error.

In file included from ../arch/m68k/kernel/setup.c:3:
../arch/m68k/kernel/setup_mm.c:477:12: error: 'hardware_proc_show' defined but not used [-Werror=unused-function]
477 | static int hardware_proc_show(struct seq_file *m, void *v)

      |            ^~~~~~~~~~~~~~~~~~
Fixes 66d857b08b8c ("m68k: merge m68k and m68knommu arch directories") # v3.0

Thanks for your patch!

i.e. will queue in the m68k for-v6.3 branch.

arch/m68k/Kconfig.devices config HEARTBEAT · line 21

Quoted 7 lines
arch/m68k/Kconfig.devices +1 -0
@@ -18,6 +18,7 @@ config HEARTBEAT
 
 # We have a dedicated heartbeat LED. :-)
 config PROC_HARDWARE
+       depends on PROC_FS

I'll move the "depends ..." line below the "bool ..." line while applying, as that's where the dependencies are usually listed.

arch/m68k/Kconfig.devices config HEARTBEAT · line 24

Quoted 3 lines
arch/m68k/Kconfig.devices +0 -0
        bool "/proc/hardware support"
        help
          Say Y here to support the /proc/hardware file, which gives you

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 23 lines · Geert Uytterhoeven

Hi Randy,

Quoted 10 lines · Randy Dunlap

When CONFIG_PROC_FS is not set, there is a build error for an unused function. Make PROC_HARDWARE depend on PROC_FS to prevent this error.

In file included from ../arch/m68k/kernel/setup.c:3:
../arch/m68k/kernel/setup_mm.c:477:12: error: 'hardware_proc_show' defined but not used [-Werror=unused-function]
477 | static int hardware_proc_show(struct seq_file *m, void *v)

      |            ^~~~~~~~~~~~~~~~~~
Fixes 66d857b08b8c ("m68k: merge m68k and m68knommu arch directories") # v3.0

Thanks for your patch!

i.e. will queue in the m68k for-v6.3 branch.

Quoted 4 lines
arch/m68k/Kconfig.devices +0 -0
@@ -18,6 +18,7 @@ config HEARTBEAT
 
Quoted 6 lines

arch/m68k/Kconfig.devices config HEARTBEAT · line 21

Quoted 3 lines
arch/m68k/Kconfig.devices +1 -0
 # We have a dedicated heartbeat LED. :-)
 config PROC_HARDWARE
+       depends on PROC_FS

I'll move the "depends ..." line below the "bool ..." line while applying, as that's where the dependencies are usually listed.

Agreed. I don't know how I did it like that.

Quoted 3 lines
Quoted 3 lines
arch/m68k/Kconfig.devices +0 -0
        bool "/proc/hardware support"
        help
          Say Y here to support the /proc/hardware file, which gives you
Signature · 1 line
~Randy