ARM: s3c24xx: fix Wunused-variable warning on !MMU
authorKrzysztof Kozlowski <krzk@kernel.org>
Thu, 10 Sep 2020 15:41:50 +0000 (17:41 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Wed, 16 Sep 2020 17:09:52 +0000 (19:09 +0200)
If S3C24xx machine code is build without CONFIG_MMU, the iotable()
macros do nothing so annotate structures to get rid of warnings:

  arch/arm/mach-s3c24xx/common.c:140:24: warning: ‘s3c_iodesc’ defined but not used [-Wunused-variable]
  arch/arm/mach-s3c24xx/s3c2410.c:49:24: warning: ‘s3c2410_iodesc’ defined but not used [-Wunused-variable]
  arch/arm/mach-s3c24xx/s3c2412.c:60:24: warning: ‘s3c2412_iodesc’ defined but not used [-Wunused-variable]
  arch/arm/mach-s3c24xx/s3c2416.c:54:24: warning: ‘s3c2416_iodesc’ defined but not used [-Wunused-variable]
  arch/arm/mach-s3c24xx/s3c2443.c:45:24: warning: ‘s3c2443_iodesc’ defined but not used [-Wunused-variable]
  arch/arm/mach-s3c24xx/s3c244x.c:44:24: warning: ‘s3c244x_iodesc’ defined but not used [-Wunused-variable]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200910154150.3318-2-krzk@kernel.org
arch/arm/mach-s3c24xx/common.c
arch/arm/mach-s3c24xx/s3c2410.c
arch/arm/mach-s3c24xx/s3c2412.c
arch/arm/mach-s3c24xx/s3c2416.c
arch/arm/mach-s3c24xx/s3c2443.c
arch/arm/mach-s3c24xx/s3c244x.c

index 3dc029c..1ec8fe2 100644 (file)
@@ -137,7 +137,7 @@ static struct cpu_table cpu_ids[] __initdata = {
 
 /* minimal IO mapping */
 
-static struct map_desc s3c_iodesc[] __initdata = {
+static struct map_desc s3c_iodesc[] __initdata __maybe_unused = {
        IODESC_ENT(GPIO),
        IODESC_ENT(IRQ),
        IODESC_ENT(MEMCTRL),
index 21fd540..ed49883 100644 (file)
@@ -46,7 +46,7 @@
 
 /* Initial IO mappings */
 
-static struct map_desc s3c2410_iodesc[] __initdata = {
+static struct map_desc s3c2410_iodesc[] __initdata __maybe_unused = {
        IODESC_ENT(CLKPWR),
        IODESC_ENT(TIMER),
        IODESC_ENT(WATCHDOG),
index 8fe4d46..d1ea1ca 100644 (file)
@@ -57,7 +57,7 @@ static inline void s3c2412_init_gpio2(void)
 
 /* Initial IO mappings */
 
-static struct map_desc s3c2412_iodesc[] __initdata = {
+static struct map_desc s3c2412_iodesc[] __initdata __maybe_unused = {
        IODESC_ENT(CLKPWR),
        IODESC_ENT(TIMER),
        IODESC_ENT(WATCHDOG),
index 9514196..17157f0 100644 (file)
@@ -51,7 +51,7 @@
 #include "nand-core.h"
 #include "spi-core.h"
 
-static struct map_desc s3c2416_iodesc[] __initdata = {
+static struct map_desc s3c2416_iodesc[] __initdata __maybe_unused = {
        IODESC_ENT(WATCHDOG),
        IODESC_ENT(CLKPWR),
        IODESC_ENT(TIMER),
index 4cbeb74..2afeb53 100644 (file)
@@ -42,7 +42,7 @@
 #include "nand-core.h"
 #include "spi-core.h"
 
-static struct map_desc s3c2443_iodesc[] __initdata = {
+static struct map_desc s3c2443_iodesc[] __initdata __maybe_unused = {
        IODESC_ENT(WATCHDOG),
        IODESC_ENT(CLKPWR),
        IODESC_ENT(TIMER),
index a75f588..4439cfb 100644 (file)
@@ -41,7 +41,7 @@
 #include "nand-core.h"
 #include "regs-dsc.h"
 
-static struct map_desc s3c244x_iodesc[] __initdata = {
+static struct map_desc s3c244x_iodesc[] __initdata __maybe_unused = {
        IODESC_ENT(CLKPWR),
        IODESC_ENT(TIMER),
        IODESC_ENT(WATCHDOG),