ARM: samsung warning fixes
Subsystems (3)
cover ARM: samsung warning fixes
These are all patches addressing harmless warnings I found in my randconfig tests. Please merge into the samsung fixes branch for 4.6.
Arnd
PATCH 1/6 ARM: s3c24xx: don't select EEPROM_AT24
EEPROM_AT24 depends on both I2C and SYSFS. We have in the past added I2C 'select' statements to avoid build problems with the first, but we still get a warning because of the second:
warning: (MACH_DAVINCI_EVM && MACH_SFFSDR && MACH_DAVINCI_DM6467_EVM && MACH_DAVINCI_DM365_EVM && MACH_DAVINCI_DA830_EVM && MACH_MITYOMAPL138 && MACH_MINI2440) selects EEPROM_AT24 which has unmet direct dependencies (I2C && SYSFS)
This removes the 'select' statements again, and forces users to enable the driver in their configuration files, as we do for most other drivers.
--- arch/arm/configs/mini2440_defconfig | 1 + arch/arm/configs/s3c2410_defconfig | 1 + arch/arm/mach-s3c24xx/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/mini2440_defconfig +1 -0
@@ -158,6 +158,7 @@ CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_S3C2410=y CONFIG_I2C_SIMTEC=y +CONFIG_EEPROM_AT24=y CONFIG_SPI=y CONFIG_SPI_S3C24XX=y CONFIG_SPI_SPIDEV=y
arch/arm/configs/s3c2410_defconfig +1 -0
@@ -290,6 +290,7 @@ CONFIG_HW_RANDOM=y CONFIG_I2C_CHARDEV=m CONFIG_I2C_S3C2410=y CONFIG_I2C_SIMTEC=y +CONFIG_EEPROM_AT24=y CONFIG_SPI=y CONFIG_SPI_GPIO=m CONFIG_SPI_S3C24XX=m
arch/arm/mach-s3c24xx/Kconfig +0 -1
@@ -460,7 +460,6 @@ config MACH_AT2440EVB config MACH_MINI2440 bool "MINI2440 development board" - select EEPROM_AT24 if I2C select LEDS_CLASS select LEDS_TRIGGERS select LEDS_TRIGGER_BACKLIGHT
Signature · 1 line
2.7.0
PATCH 2/6 ARM: s3c24xx: allow selecting S3C2440_XTAL_16934400 for s3c2442
In reply to Arnd BergmannThe S3C2440_XTAL_16934400 and S3C2440_XTAL_12000000 symbols are used for both s3c2442 and s3c2440, but Kconfig only allows it to be selected if CPU_S3C2440 is enabled, which can lead to a warning otherwise:
warning: (MACH_RX1950) selects S3C2440_XTAL_16934400 which has unmet direct dependencies (ARCH_S3C24XX && CPU_S3C2440)
This changes the dependencies to make it possible also for CPU_S3C2442-only configurations.
--- arch/arm/mach-s3c24xx/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-s3c24xx/Kconfig +4 -1
@@ -405,7 +405,7 @@ config MACH_S3C2416_DT endif # CPU_S3C2416 -if CPU_S3C2440 +if CPU_S3C2440 || CPU_S3C2442 config S3C2440_XTAL_12000000 bool
@@ -432,6 +432,9 @@ config S3C2440_PLL_16934400 default y if S3C24XX_PLL help PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals. +endif + +if CPU_S3C2440 comment "S3C2440 Boards"
Signature · 1 line
2.7.0
PATCH 3/6 ARM: s3c24xx: fix unused gta02_configure_pmu_for_charger warning
In reply to Arnd Bergmanngta02_configure_pmu_for_charger is only used when CONFIG_PCF50633_ADC is set, and otherwise we get a warning about an unused symbol:
arch/arm/mach-s3c24xx/mach-gta02.c:158:1: warning: 'gta02_configure_pmu_for_charger' defined but not used [-Wunused-function]
gta02_configure_pmu_for_charger(struct pcf50633 *pcf, void *unused, int res)
This adds an #ifdef to shut up the warning.
--- arch/arm/mach-s3c24xx/mach-gta02.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-s3c24xx/mach-gta02.c +2 -0
@@ -154,6 +154,7 @@ static struct s3c2410_uartcfg gta02_uartcfgs[] = {#define ADC_NOM_CHG_DETECT_1A 6#define ADC_NOM_CHG_DETECT_USB 43 +#ifdef CONFIG_PCF50633_ADC static void gta02_configure_pmu_for_charger (struct pcf50633 *pcf,void *unused,int res) {
@@ -174,6 +175,7 @@ gta02_configure_pmu_for_charger(struct pcf50633 *pcf, void *unused, int res) pcf50633_mbc_usb_curlim_set(pcf, ma); } +#endif static struct delayed_work gta02_charger_work;static int gta02_usb_vbus_draw;
Signature · 1 line
2.7.0
PATCH 4/6 ARM: s3c24xx: don't select RFKILL if CONFIG_NET is disabled
In reply to Arnd BergmannBluetooth is only supported when network support is part of the kernel, so it is a bit pointless to build the hi1940-bt support without networking. If we try anyway, we get a Kconfig warning:
warning: (TOSA_BT && H1940BT) selects RFKILL which has unmet direct dependencies (NET)
This adds a dependency on CONFIG_NET to avoid that case.
--- arch/arm/mach-s3c24xx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-s3c24xx/Kconfig +1 -1
@@ -227,7 +227,7 @@ config ARCH_H1940 config H1940BT tristate "Control the state of H1940 bluetooth chip" - depends on ARCH_H1940 + depends on ARCH_H1940 && NET select RFKILL help This is a simple driver that is able to control
Signature · 1 line
2.7.0
PATCH 5/6 ARM: s3c64xx: mark regulator init data as unused
In reply to Arnd BergmannThe smdk6410 board defines lots of regulator settings, but uses most of them only in certain configurations, and otherwise leaves them without any references, so we get lots of randconfig warnings about them:
mach-s3c64xx/mach-smdk6410.c:303:35: error: 'smdk6410_vddarm' defined but not used [-Werror=unused-variable] mach-s3c64xx/mach-smdk6410.c:316:35: error: 'smdk6410_vddint' defined but not used [-Werror=unused-variable] mach-s3c64xx/mach-smdk6410.c:327:35: error: 'smdk6410_vddhi' defined but not used [-Werror=unused-variable] mach-s3c64xx/mach-smdk6410.c:335:35: error: 'smdk6410_vddpll' defined but not used [-Werror=unused-variable] mach-s3c64xx/mach-smdk6410.c:343:35: error: 'smdk6410_vdduh_mmc' defined but not used [-Werror=unused-variable]
This marks all regulator_init_data structures in this file as __maybe_unused, indicating that we don't care whether there are any references or not in a given configuration.
--- arch/arm/mach-s3c64xx/mach-smdk6410.c | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-)
arch/arm/mach-s3c64xx/mach-smdk6410.c +19 -19
@@ -216,7 +216,7 @@ static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = { REGULATOR_SUPPLY("AVDD", "0-001b"), }; -static struct regulator_init_data smdk6410_b_pwr_5v_data = { +static struct regulator_init_data __maybe_unused smdk6410_b_pwr_5v_data = { .constraints = { .always_on =1 , },
@@ -300,7 +300,7 @@ static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = { };/* VDDARM, BUCK1 on J5 */ -static struct regulator_init_data smdk6410_vddarm = { +static struct regulator_init_data __maybe_unused smdk6410_vddarm = { .constraints = { .name ="PVDD_ARM" , .min_uV =1000000 ,
@@ -313,7 +313,7 @@ static struct regulator_init_data smdk6410_vddarm = { };/* VDD_INT, BUCK2 on J5 */ -static struct regulator_init_data smdk6410_vddint = { +static struct regulator_init_data __maybe_unused smdk6410_vddint = { .constraints = { .name ="PVDD_INT" , .min_uV =1000000 ,
@@ -324,7 +324,7 @@ static struct regulator_init_data smdk6410_vddint = { };/* VDD_HI, LDO3 on J5 */ -static struct regulator_init_data smdk6410_vddhi = { +static struct regulator_init_data __maybe_unused smdk6410_vddhi = { .constraints = { .name ="PVDD_HI" , .always_on =1 ,
@@ -332,7 +332,7 @@ static struct regulator_init_data smdk6410_vddhi = { };/* VDD_PLL, LDO2 on J5 */ -static struct regulator_init_data smdk6410_vddpll = { +static struct regulator_init_data __maybe_unused smdk6410_vddpll = { .constraints = { .name ="PVDD_PLL" , .always_on =1 ,
@@ -340,7 +340,7 @@ static struct regulator_init_data smdk6410_vddpll = { };/* VDD_UH_MMC, LDO5 on J5 */ -static struct regulator_init_data smdk6410_vdduh_mmc = { +static struct regulator_init_data __maybe_unused smdk6410_vdduh_mmc = { .constraints = { .name ="PVDD_UH+PVDD_MMC" , .always_on =1 ,
@@ -348,7 +348,7 @@ static struct regulator_init_data smdk6410_vdduh_mmc = { };/* VCCM3BT, LDO8 on J5 */ -static struct regulator_init_data smdk6410_vccmc3bt = { +static struct regulator_init_data __maybe_unused smdk6410_vccmc3bt = { .constraints = { .name ="PVCCM3BT" , .always_on =1 ,
@@ -356,7 +356,7 @@ static struct regulator_init_data smdk6410_vccmc3bt = { };/* VCCM2MTV, LDO11 on J5 */ -static struct regulator_init_data smdk6410_vccm2mtv = { +static struct regulator_init_data __maybe_unused smdk6410_vccm2mtv = { .constraints = { .name ="PVCCM2MTV" , .always_on =1 ,
@@ -364,7 +364,7 @@ static struct regulator_init_data smdk6410_vccm2mtv = { };/* VDD_LCD, LDO12 on J5 */ -static struct regulator_init_data smdk6410_vddlcd = { +static struct regulator_init_data __maybe_unused smdk6410_vddlcd = { .constraints = { .name ="PVDD_LCD" , .always_on =1 ,
@@ -372,7 +372,7 @@ static struct regulator_init_data smdk6410_vddlcd = { };/* VDD_OTGI, LDO9 on J5 */ -static struct regulator_init_data smdk6410_vddotgi = { +static struct regulator_init_data __maybe_unused smdk6410_vddotgi = { .constraints = { .name ="PVDD_OTGI" , .always_on =1 ,
@@ -380,7 +380,7 @@ static struct regulator_init_data smdk6410_vddotgi = { };/* VDD_OTG, LDO14 on J5 */ -static struct regulator_init_data smdk6410_vddotg = { +static struct regulator_init_data __maybe_unused smdk6410_vddotg = { .constraints = { .name ="PVDD_OTG" , .always_on =1 ,
@@ -388,7 +388,7 @@ static struct regulator_init_data smdk6410_vddotg = { };/* VDD_ALIVE, LDO15 on J5 */ -static struct regulator_init_data smdk6410_vddalive = { +static struct regulator_init_data __maybe_unused smdk6410_vddalive = { .constraints = { .name ="PVDD_ALIVE" , .always_on =1 ,
@@ -396,7 +396,7 @@ static struct regulator_init_data smdk6410_vddalive = { };/* VDD_AUDIO, VLDO_AUDIO on J5 */ -static struct regulator_init_data smdk6410_vddaudio = { +static struct regulator_init_data __maybe_unused smdk6410_vddaudio = { .constraints = { .name ="PVDD_AUDIO" , .always_on =1 ,
@@ -406,7 +406,7 @@ static struct regulator_init_data smdk6410_vddaudio = { #ifdef CONFIG_SMDK6410_WM1190_EV1 /* S3C64xx internal logic & PLL */ -static struct regulator_init_data wm8350_dcdc1_data = { +static struct regulator_init_data __maybe_unused wm8350_dcdc1_data = { .constraints = { .name = "PVDD_INT+PVDD_PLL", .min_uV = 1200000,
@@ -417,7 +417,7 @@ static struct regulator_init_data wm8350_dcdc1_data = { };/* Memory */ -static struct regulator_init_data wm8350_dcdc3_data = { +static struct regulator_init_data __maybe_unused wm8350_dcdc3_data = { .constraints = { .name ="PVDD_MEM" , .min_uV =1800000 ,
@@ -437,7 +437,7 @@ static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = { REGULATOR_SUPPLY("DVDD", "0-001b"), }; -static struct regulator_init_data wm8350_dcdc4_data = { +static struct regulator_init_data __maybe_unused wm8350_dcdc4_data = { .constraints = { .name ="PVDD_HI+PVDD_EXT+PVDD_SYS+PVCCM2MTV" , .min_uV =3000000 ,
@@ -449,7 +449,7 @@ static struct regulator_init_data wm8350_dcdc4_data = { };/* OTGi/1190-EV1 HPVDD & AVDD */ -static struct regulator_init_data wm8350_ldo4_data = { +static struct regulator_init_data __maybe_unused wm8350_ldo4_data = { .constraints = { .name ="PVDD_OTGI+HPVDD+AVDD" , .min_uV =1200000 ,
@@ -537,7 +537,7 @@ static struct wm831x_backlight_pdata wm1192_backlight_pdata = { .max_uA = 27554, }; -static struct regulator_init_data wm1192_dcdc3 = { +static struct regulator_init_data __maybe_unused wm1192_dcdc3 = { .constraints = { .name ="PVDD_MEM+PVDD_GPS" , .always_on =1 ,
@@ -548,7 +548,7 @@ static struct regulator_consumer_supply wm1192_ldo1_consumers[] = { REGULATOR_SUPPLY("DVDD", "0-001b"), /* WM8580 */ }; -static struct regulator_init_data wm1192_ldo1 = { +static struct regulator_init_data __maybe_unused wm1192_ldo1 = { .constraints = { .name ="PVDD_LCD+PVDD_EXT" , .always_on =1 ,
Signature · 1 line
2.7.0
PATCH 6/6 ARM: exynos: select THERMAL_OF
In reply to Arnd BergmannWe cannot select a symbol that has disabled dependencies, so we get a warning if we ever enable EXYNOS_THERMAL without also turning on THERMAL_OF:
warning: (ARCH_EXYNOS) selects EXYNOS_THERMAL which has unmet direct dependencies (THERMAL && (ARCH_EXYNOS || COMPILE_TEST) && THERMAL_OF)
This adds another 'select' in the platform code to avoid that case. Alternatively, we could decide to not select EXYNOS_THERMAL here and instead make it a user option.
--- arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select S5P_DEV_MFC select SRAM select THERMAL + select THERMAL_OF select MFD_SYSCON select CLKSRC_EXYNOS_MCT select POWER_RESET
Signature · 1 line
2.7.0
Re: [PATCH 1/6] ARM: s3c24xx: don't select EEPROM_AT24
In reply to Arnd BergmannQuoted 10 lines · Arnd Bergmann
EEPROM_AT24depends on both I2C and SYSFS. We have in the past added I2C 'select' statements to avoid build problems with the first, but we still get a warning because of the second:warning: (
MACH_DAVINCI_EVM&&MACH_SFFSDR&&MACH_DAVINCI_DM6467_EVM&&MACH_DAVINCI_DM365_EVM&&MACH_DAVINCI_DA830_EVM&&MACH_MITYOMAPL138&&MACH_MINI2440) selectsEEPROM_AT24which has unmet direct dependencies (I2C && SYSFS)This removes the 'select' statements again, and forces users to enable the driver in their configuration files, as we do for most other drivers.
Quoted 6 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/configs/mini2440_defconfig | 1 + arch/arm/configs/s3c2410_defconfig | 1 + arch/arm/mach-s3c24xx/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletion(-)
Best regards,
Krzysztof
Re: [PATCH 2/6] ARM: s3c24xx: allow selecting S3C2440_XTAL_16934400 for s3c2442
In reply to Arnd BergmannQuoted 6 lines · Arnd Bergmann
The
S3C2440_XTAL_16934400andS3C2440_XTAL_12000000symbols are used for both s3c2442 and s3c2440, butKconfigonly allows it to be selected ifCPU_S3C2440is enabled, which can lead to a warning otherwise:warning: (
MACH_RX1950) selectsS3C2440_XTAL_16934400which has unmet direct dependencies (ARCH_S3C24XX&&CPU_S3C2440)
Quoted 7 lines
This changes the dependencies to make it possible also for CPU_S3C2442-only configurations.
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-s3c24xx/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Best regards,
Krzysztof
Re: [PATCH 3/6] ARM: s3c24xx: fix unused gta02_configure_pmu_for_charger warning
In reply to Arnd BergmannQuoted 6 lines · Arnd Bergmann
gta02_configure_pmu_for_chargeris only used whenCONFIG_PCF50633_ADCis set, and otherwise we get a warning about an unused symbol:
arch/arm/mach-s3c24xx/mach-gta02.c:158:1: warning: 'gta02_configure_pmu_for_charger' defined but not used [-Wunused-function]
gta02_configure_pmu_for_charger(struct pcf50633 *pcf, void *unused, int res)
Quoted 6 lines
This adds an #ifdef to shut up the warning.
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-s3c24xx/mach-gta02.c | 2 ++ 1 file changed, 2 insertions(+)
Best regards,
Krzysztof
Re: [PATCH 4/6] ARM: s3c24xx: don't select RFKILL if CONFIG_NET is disabled
In reply to Arnd BergmannQuoted 18 lines · Arnd Bergmann
Bluetooth is only supported when network support is part of the kernel, so it is a bit pointless to build the hi1940-bt support without networking. If we try anyway, we get a
Kconfigwarning:warning: (
TOSA_BT&& H1940BT) selects RFKILL which has unmet direct dependencies (NET)This adds a dependency on
CONFIG_NETto avoid that case.Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-s3c24xx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-s3c24xx/Kconfig +0
-0
arch/arm/mach-s3c24xx/Kconfig config ARCH_H1940 · line 233
Quoted 8 lines
arch/arm/mach-s3c24xx/Kconfig +1
-1@@ -227,7 +227,7 @@ config ARCH_H1940 config H1940BT tristate "Control the state of H1940 bluetooth chip" - depends on ARCH_H1940 + depends on ARCH_H1940 && NET select RFKILL help This is a simple driver that is able to control
I think there shouldn't be a reverse dependency for RFKILL but instead just:
depends on ARCH_H1940 && RFKILL
This makes it simpler and RFKILL is a user-visible symbol.
Best regards,
Krzysztof
Re: [PATCH 5/6] ARM: s3c64xx: mark regulator init data as unused
In reply to Arnd BergmannQuoted 11 lines · Arnd Bergmann
The smdk6410 board defines lots of regulator settings, but uses most of them only in certain configurations, and otherwise leaves them without any references, so we get lots of randconfig warnings about them:
mach-s3c64xx/mach-smdk6410.c:303:35: error: 'smdk6410_vddarm' defined but not used [-Werror=unused-variable]mach-s3c64xx/mach-smdk6410.c:316:35: error: 'smdk6410_vddint' defined but not used [-Werror=unused-variable]mach-s3c64xx/mach-smdk6410.c:327:35: error: 'smdk6410_vddhi' defined but not used [-Werror=unused-variable]mach-s3c64xx/mach-smdk6410.c:335:35: error: 'smdk6410_vddpll' defined but not used [-Werror=unused-variable]mach-s3c64xx/mach-smdk6410.c:343:35: error: 'smdk6410_vdduh_mmc' defined but not used [-Werror=unused-variable]
Quoted 9 lines
This marks all
regulator_init_datastructures in this file as__maybe_unused, indicating that we don't care whether there are any references or not in a given configuration.Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-s3c64xx/mach-smdk6410.c | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-)
Best regards,
Krzysztof
Re: [PATCH 6/6] ARM: exynos: select THERMAL_OF
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
We cannot select a symbol that has disabled dependencies, so we get a warning if we ever enable
EXYNOS_THERMALwithout also turning onTHERMAL_OF:warning: (
ARCH_EXYNOS) selectsEXYNOS_THERMALwhich has unmet direct dependencies (THERMAL && (ARCH_EXYNOS||COMPILE_TEST) &&THERMAL_OF)This adds another 'select' in the platform code to avoid that case. Alternatively, we could decide to not select
EXYNOS_THERMALhere and instead make it a user option.
We want EXYNOS_THERMAL because we are using boost cpufreq on Exynos4x12 (through turbo frequencies in DTS and cpufreq-dt) so your current solution is a proper fix for:
CONFIG_THERMAL_OF instead of CONFIG_OF")
Best regards,
Krzysztof
Quoted 19 lines
Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/mach-exynos/Kconfig +1
-0@@ -27,6 +27,7 @@ menuconfig ARCH_EXYNOS select S5P_DEV_MFC select SRAM select THERMAL + select THERMAL_OF select MFD_SYSCON select CLKSRC_EXYNOS_MCT select POWER_RESET