From 9c7f4f5ce6523af6b6e103a991b2ca71b962acb7 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 16:36:59 +0000 Subject: ARM: shark: fix shark_pci_init return code When run on the wrong platform, the shark_pci_init function returns an undefined value, as reported by a gcc warning, so let's just return -ENODEV. Without this patch, building shark_defconfig results in: arch/arm/mach-shark/pci.c: In function 'shark_pci_init': arch/arm/mach-shark/pci.c:42:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type] Signed-off-by: Arnd Bergmann Cc: "Krzysztof Halasa" --- arch/arm/mach-shark/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c index 9089407d5326..2b351a339c93 100644 --- a/arch/arm/mach-shark/pci.c +++ b/arch/arm/mach-shark/pci.c @@ -38,7 +38,7 @@ static struct hw_pci shark_pci __initdata = { static int __init shark_pci_init(void) { if (!machine_is_shark()) - return; + return -ENODEV; pcibios_min_io = 0x6000; pcibios_min_mem = 0x50000000; -- cgit From 5f0cc6d16c0572bf5e9e65b6133ac415268c0720 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 16:53:11 +0000 Subject: ARM: pxa: Wunused-result warning in viper board file Calling kstrtoul requires checking the result. In case of the viper_tpm_setup function, let's fail the __setup function if the number was invalid. Without this patch, building viper_defconfig results in: arch/arm/mach-pxa/viper.c: In function 'viper_tpm_setup': arch/arm/mach-pxa/viper.c:771:10: warning: ignoring return value of 'kstrtoul', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Arnd Bergmann Acked-by: Marc Zyngier Cc: Haojian Zhuang Cc: Eric Miao --- arch/arm/mach-pxa/viper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 130379fb9d0f..ac733e91f3e4 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -768,8 +768,7 @@ static unsigned long viper_tpm; static int __init viper_tpm_setup(char *str) { - strict_strtoul(str, 10, &viper_tpm); - return 1; + return strict_strtoul(str, 10, &viper_tpm) >= 0; } __setup("tpm=", viper_tpm_setup); -- cgit From 30bda0ebef512af996a079977488ea52a0ff1646 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 16:05:28 +0000 Subject: ARM: pxa: define palmte2_pxa_keys conditionally Gcc prints a harmless warning about palmte2_pxa_keys not being used when the gpio keyboard driver is disabled. The solution is to use the same #ifdef that is already present in the place where the symbol is used. Without this patch, building palmz72_defconfig results in: /home/arnd/linux-arm/arch/arm/mach-pxa/palmte2.c:128:31: warning: 'palmte2_pxa_keys' defined but not used [-Wunused-variable] Signed-off-by: Arnd Bergmann Acked-by: Marek Vasut Cc: Carlos Eduardo Medaglia Dyonisio Cc: Haojian Zhuang Cc: Eric Miao --- arch/arm/mach-pxa/palmte2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index c054827c567f..8497b28825e5 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c @@ -105,6 +105,7 @@ static struct pxamci_platform_data palmte2_mci_platform_data = { .gpio_power = GPIO_NR_PALMTE2_SD_POWER, }; +#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) /****************************************************************************** * GPIO keys ******************************************************************************/ @@ -132,6 +133,7 @@ static struct platform_device palmte2_pxa_keys = { .platform_data = &palmte2_pxa_keys_data, }, }; +#endif /****************************************************************************** * Backlight -- cgit From 066258f4293128bb489e42790637dd6d9b7ff206 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 13:53:06 +0000 Subject: ARM: pxa: remove sharpsl_fatal_check function The sharpsl_fatal_check has not been used since Pavel Machek removed the caller in 99f329a2b "pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume". Nobody has complained since 2009, so it's safe to assume we can just remove the function. Without this patch, building corgi_defconfig results in: /home/arnd/linux-arm/arch/arm/mach-pxa/sharpsl_pm.c:693:12: warning: 'sharpsl_fatal_check' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann Cc: Pavel Machek Cc: Stanislav Brabec Cc: Eric Miao Cc: Haojian Zhuang --- arch/arm/mach-pxa/sharpsl_pm.c | 48 ------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index bdf4cb88ca0a..6c9658f4695a 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -55,7 +55,6 @@ #ifdef CONFIG_PM static int sharpsl_off_charge_battery(void); static int sharpsl_check_battery_voltage(void); -static int sharpsl_fatal_check(void); #endif static int sharpsl_check_battery_temp(void); static int sharpsl_ac_check(void); @@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state) return 0; } -/* - * Check for fatal battery errors - * Fatal returns -1 - */ -static int sharpsl_fatal_check(void) -{ - int buff[5], temp, i, acin; - - dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n"); - - /* Check AC-Adapter */ - acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); - - if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { - sharpsl_pm.machinfo->charge(0); - udelay(100); - sharpsl_pm.machinfo->discharge(1); /* enable discharge */ - mdelay(SHARPSL_WAIT_DISCHARGE_ON); - } - - if (sharpsl_pm.machinfo->discharge1) - sharpsl_pm.machinfo->discharge1(1); - - /* Check battery : check inserting battery ? */ - for (i = 0; i < 5; i++) { - buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); - mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT); - } - - if (sharpsl_pm.machinfo->discharge1) - sharpsl_pm.machinfo->discharge1(0); - - if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) { - udelay(100); - sharpsl_pm.machinfo->charge(1); - sharpsl_pm.machinfo->discharge(0); - } - - temp = get_select_val(buff); - dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %ld\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT)); - - if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) || - (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt))) - return -1; - return 0; -} - static int sharpsl_off_charge_error(void) { dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n"); -- cgit From e0347c52384d494618299c64ad8ba68665044919 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 13:34:49 +0000 Subject: ARM: pxa: work around duplicate definition of GPIO24_SSP1_SFRM The symbol "GPIO24_SSP1_SFRM" is defined in both mfp-pxa27x.h and mfp-pxa25x.h. Since the macro is not actually used in the cm-x2xx.c file, but it includes both headers, a safe workaround should be to just undefine it from the .c file. This is a bit hacky and the headers should be fixed to not both define it, but for now it gets us around an annoying warning. Without this patch, building cm_x2xx_defconfig results in: In file included from arch/arm/mach-pxa/include/mach-pxa/pxa27x.h:7:0, from arch/arm/mach-pxa/cm-x2xx.c:25: arch/arm/mach-pxa/include/mach-pxa/mfp-pxa27x.h:215:0: warning: "GPIO24_SSP1_SFRM" redefined [enabled by default] arch/arm/mach-pxa/include/mach-pxa/mfp-pxa25x.h:111:0: note: this is the location of the previous definition Signed-off-by: Arnd Bergmann Acked-by: Igor Grinberg Cc: Haojian Zhuang Cc: Mike Rapoport --- arch/arm/mach-pxa/cm-x2xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index 8fa4ad27edf3..ae5e74a34d5a 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c @@ -22,6 +22,7 @@ #include #include +#undef GPIO24_SSP1_SFRM #include #include #include -- cgit From ac09281a026aad1fe489419bc948ba88b910e242 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 13:18:53 +0000 Subject: ARM: at91: skip at91_io_desc definition for NOMMU On NOMMU systems, we do cannot remap the MMIO space, so the definition of at91_io_desc is unused. Without this patch, building at91x40_defconfig results in: arch/arm/mach-at91/setup.c:90:24: warning: 'at91_io_desc' defined but not used [-Wunused-variable] Signed-off-by: Arnd Bergmann Cc: Nicolas Ferre Cc: Jean-Christophe Plagniol-Villard --- arch/arm/mach-at91/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 944bffb08991..3a53f3dfca52 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -87,7 +87,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length) iotable_init(desc, 1); } -static struct map_desc at91_io_desc __initdata = { +static struct map_desc at91_io_desc __initdata __maybe_unused = { .virtual = AT91_VA_BASE_SYS, .pfn = __phys_to_pfn(AT91_BASE_SYS), .length = SZ_16K, -- cgit From 9e0e4e11623e57c0f6635f5dc6972244ce511f77 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 13:00:32 +0000 Subject: ARM: at91: unused variable in at91_pm_verify_clocks The code using the variable 'i' in this function is conditional which results in a harmless compiler warning. Using the IS_ENABLED macro instead of #ifdef makes the code look nicer and gets rid of the warning. Without this patch, building at91sam9263_defconfig results in: /home/arnd/linux-arm/arch/arm/mach-at91/pm.c: In function 'at91_pm_verify_clocks': /home/arnd/linux-arm/arch/arm/mach-at91/pm.c:137:6: warning: unused variable 'i' [-Wunused-variable] Signed-off-by: Arnd Bergmann Acked-by: Jean-Christophe PLAGNIOL-VILLARD Cc: Nicolas Ferre --- arch/arm/mach-at91/pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 2c2d86505a54..5315f05896e9 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -153,7 +153,9 @@ static int at91_pm_verify_clocks(void) } } -#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS + if (!IS_ENABLED(CONFIG_AT91_PROGRAMMABLE_CLOCKS)) + return 1; + /* PCK0..PCK3 must be disabled, or configured to use clk32k */ for (i = 0; i < 4; i++) { u32 css; @@ -167,7 +169,6 @@ static int at91_pm_verify_clocks(void) return 0; } } -#endif return 1; } -- cgit From 673550a19f01c7955a1321ed9f43a4e2fd9cabf6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 27 May 2012 02:42:12 +0000 Subject: ARM: s3c24xx: fix multiple section mismatch warnings The *_irq_add function should not be marked __init because the driver subsystem thinks they might be called at a later stage. The usb_simtec_init function accesses initdata and should be marked init. This is safe because the only caller is also an init function. Without this patch, building s3c2410_defconfig results in: WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1030): Section mismatch in reference from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add() The variable s3c2416_irq_interface references the function __init s3c2416_irq_add() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0x1b08): Section mismatch in reference from the variable s3c2443_irq_interface to the function .init.text:s3c2443_irq_add() The variable s3c2443_irq_interface references the function __init s3c2443_irq_add() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/arm/mach-s3c24xx/built-in.o(.data+0xf44): Section mismatch in reference from the variable s3c2416_irq_interface to the function .init.text:s3c2416_irq_add() The variable s3c2416_irq_interface references the function __init s3c2416_irq_add() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: arch/arm/mach-s3c24xx/built-in.o(.text+0x3f7c): Section mismatch in reference from the function usb_simtec_init() to the (unknown reference) .init.data:(unknown) The function usb_simtec_init() references the (unknown reference) __initdata (unknown). This is often because usb_simtec_init lacks a __initdata annotation or the annotation of (unknown) is wrong. Signed-off-by: Arnd Bergmann Cc: Ben Dooks Cc: Kukjin Kim --- arch/arm/mach-s3c24xx/irq-s3c2416.c | 6 +++--- arch/arm/mach-s3c24xx/irq-s3c2443.c | 4 ++-- arch/arm/mach-s3c24xx/simtec-usb.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-s3c24xx/irq-s3c2416.c b/arch/arm/mach-s3c24xx/irq-s3c2416.c index 23ec97370f32..ff141b0af26b 100644 --- a/arch/arm/mach-s3c24xx/irq-s3c2416.c +++ b/arch/arm/mach-s3c24xx/irq-s3c2416.c @@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = { /* IRQ initialisation code */ -static int __init s3c2416_add_sub(unsigned int base, +static int s3c2416_add_sub(unsigned int base, void (*demux)(unsigned int, struct irq_desc *), struct irq_chip *chip, @@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base, return 0; } -static void __init s3c2416_irq_add_second(void) +static void s3c2416_irq_add_second(void) { unsigned long pend; unsigned long last; @@ -287,7 +287,7 @@ static void __init s3c2416_irq_add_second(void) } } -static int __init s3c2416_irq_add(struct device *dev, +static int s3c2416_irq_add(struct device *dev, struct subsys_interface *sif) { printk(KERN_INFO "S3C2416: IRQ Support\n"); diff --git a/arch/arm/mach-s3c24xx/irq-s3c2443.c b/arch/arm/mach-s3c24xx/irq-s3c2443.c index ac2829f56d12..5e69109c0928 100644 --- a/arch/arm/mach-s3c24xx/irq-s3c2443.c +++ b/arch/arm/mach-s3c24xx/irq-s3c2443.c @@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = { /* IRQ initialisation code */ -static int __init s3c2443_add_sub(unsigned int base, +static int s3c2443_add_sub(unsigned int base, void (*demux)(unsigned int, struct irq_desc *), struct irq_chip *chip, @@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base, return 0; } -static int __init s3c2443_irq_add(struct device *dev, +static int s3c2443_irq_add(struct device *dev, struct subsys_interface *sif) { printk("S3C2443: IRQ Support\n"); diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c index d91c1a725139..c303d1b63a86 100644 --- a/arch/arm/mach-s3c24xx/simtec-usb.c +++ b/arch/arm/mach-s3c24xx/simtec-usb.c @@ -104,7 +104,7 @@ static struct s3c2410_hcd_info usb_simtec_info __initdata = { }; -int usb_simtec_init(void) +int __init usb_simtec_init(void) { int ret; -- cgit From e7215fb33acfba65f0a83a2cf3c58c529e042078 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 15:44:12 +0000 Subject: ARM: mv78xx0: mark mv78xx0_timer_init as __init_refok The sys_timer init function is only called at __init time, so it's safe to mark mv78xx0_timer_init as __init_refok, which allows us to call orion_time_init without getting a link time warning. Without this patch, building mv78xx0_defconfig results in: WARNING: vmlinux.o(.text+0x15470): Section mismatch in reference from the function mv78xx0_timer_init() to the function .init.text:orion_time_init() The function mv78xx0_timer_init() references the function __init orion_time_init(). This is often because mv78xx0_timer_init lacks a __init annotation or the annotation of orion_time_init is wrong. Signed-off-by: Arnd Bergmann Cc: Jason Cooper Cc: Andrew Lunn --- arch/arm/mach-mv78xx0/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 3057f7d4329a..e251ebc72289 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c @@ -341,7 +341,7 @@ void __init mv78xx0_init_early(void) orion_time_set_base(TIMER_VIRT_BASE); } -static void mv78xx0_timer_init(void) +static void __init_refok mv78xx0_timer_init(void) { orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, IRQ_MV78XX0_TIMER_1, get_tclk()); -- cgit From b04e246a897bb14f2508015aa708b1f7a484039a Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 14:58:50 +0000 Subject: ARM: iop13xx: mark iop13xx_scan_bus as __devinit pci_scan_root_bus is __devinit, so iop13xx_scan_bus has to be the same in order to safely call it. This is ok because the function itself is only called from the hwpci->scan callback. WARNING: vmlinux.o(.text+0x10138): Section mismatch in reference from the function iop13xx_scan_bus() to the function .devinit.text:pci_scan_root_bus() The function iop13xx_scan_bus() references the function __devinit pci_scan_root_bus(). This is often because iop13xx_scan_bus lacks a __devinit annotation or the annotation of pci_scan_root_bus is wrong. Signed-off-by: Arnd Bergmann Cc: Bjorn Helgaas Cc: Lennert Buytenhek Cc: Dan Williams --- arch/arm/mach-iop13xx/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 861cb12ef436..9d7f4cabe58b 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -506,7 +506,7 @@ iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) /* Scan an IOP13XX PCI bus. nr selects which ATU we use. */ -struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys) +struct pci_bus * __devinit iop13xx_scan_bus(int nr, struct pci_sys_data *sys) { int which_atu; struct pci_bus *bus = NULL; -- cgit From 58cbdbe0248d0bf3eed47a9ac69d330a140726a9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 14:58:45 +0000 Subject: ARM: iop13xx: fix iq81340sc_atux_map_irq prototype The pci map_irq callbacks get a 'const' pci_dev argument, so change the iop13xx version to use the same prototype as everything else. Without this patch, building iop13xx_defconfig results in: arch/arm/mach-iop13xx/iq81340sc.c:63:2: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-iop13xx/iq81340sc.c:63:2: warning: (near initialization for 'iq81340sc_pci.map_irq') [enabled by default] Signed-off-by: Arnd Bergmann Cc: Lennert Buytenhek Cc: Dan Williams --- arch/arm/mach-iop13xx/iq81340sc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c index 060cddde2fd4..e94744111634 100644 --- a/arch/arm/mach-iop13xx/iq81340sc.c +++ b/arch/arm/mach-iop13xx/iq81340sc.c @@ -30,7 +30,7 @@ extern int init_atu; static int __init -iq81340sc_atux_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) +iq81340sc_atux_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin) { WARN_ON(idsel < 1 || idsel > 2); -- cgit From 5063557ac0e83a52182fd0d49e83cc770e52ccd1 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 14:00:15 +0000 Subject: ARM: davinci: don't mark da850_register_cpufreq as __init The mityomapl138_cpufreq_init and read_factory_config function in board-mityomapl138.c are not __init functions and might be called at a later stage, so da850_register_cpufreq must not be __init either. Without this patch, building da8xx_omapl_defconfig results in: WARNING: arch/arm/mach-davinci/built-in.o(.text+0x2eb4): Section mismatch in reference from the function read_factory_config() to the function .init.text:da850_register_cpufreq() The function read_factory_config() references the function __init da850_register_cpufreq(). This is often because read_factory_config lacks a __init annotation or the annotation of da850_register_cpufreq is wrong. Signed-off-by: Arnd Bergmann Acked-by: Sekhar Nori Cc: Kevin Hilman --- arch/arm/mach-davinci/da850.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index b44dc844e15e..8329e5b81cf5 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -939,7 +939,7 @@ static struct platform_device da850_cpufreq_device = { unsigned int da850_max_speed = 300000; -int __init da850_register_cpufreq(char *async_clk) +int da850_register_cpufreq(char *async_clk) { int i; -- cgit From 5f07809e93b4c05516d85a3f2770b1a77115eb70 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 16:26:01 +0000 Subject: ARM: rpc: check device_register return code in ecard_probe device_register is marked __must_check, so we better propagate the error value by returning it from ecard_probe. Without this patch, building rpc_defconfig results in: arch/arm/mach-rpc/ecard.c: In function 'ecard_probe': arch/arm/mach-rpc/ecard.c:963:17: warning: ignoring return value of 'device_register', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Arnd Bergmann Cc: Russell King --- arch/arm/mach-rpc/ecard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rpc/ecard.c b/arch/arm/mach-rpc/ecard.c index b91bc87b3dcf..fcb1d59f7aec 100644 --- a/arch/arm/mach-rpc/ecard.c +++ b/arch/arm/mach-rpc/ecard.c @@ -960,7 +960,9 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type) *ecp = ec; slot_to_expcard[slot] = ec; - device_register(&ec->dev); + rc = device_register(&ec->dev); + if (rc) + goto nodev; return 0; -- cgit From 113f7ae5a9cebfc536d71d25a8b6f83f7fe93789 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 12:17:20 +0000 Subject: ARM: ks8695: __arch_virt_to_dma type handling __arch_virt_to_dma expects a virtual address pointer, but the ks8695 implementation of this macro treats it as an integer. Adding a type cast avoids hundreds of identical warning messages. Without this patch, building acs5k_defconfig results in: arch/arm/include/asm/dma-mapping.h: In function 'virt_to_dma': arch/arm/include/asm/dma-mapping.h:60:2: warning: passing argument 1 of '__virt_to_phys' makes integer from pointer without a cast [enabled by default] arch/arm/include/asm/memory.h:172:60: note: expected 'long unsigned int' but argument is of type 'void *' In file included from include/linux/dma-mapping.h:73:0, from include/linux/skbuff.h:33, from security/commoncap.c:21: Signed-off-by: Arnd Bergmann Cc: Krzysztof Halasa Cc: Daniel Silverstone Cc: Ben Dooks --- arch/arm/mach-ks8695/include/mach/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index f7e1b9bce345..95e731a7ed6a 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h @@ -34,7 +34,8 @@ extern struct bus_type platform_bus_type; #define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \ __phys_to_virt(x) : __bus_to_virt(x)); }) #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ - (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) + (dma_addr_t)__virt_to_phys((unsigned long)x) \ + : (dma_addr_t)__virt_to_bus(x); }) #define __arch_pfn_to_dma(dev, pfn) \ ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ if (!is_lbus_device(dev)) \ -- cgit From 8f90cce5a9b0ecf3cc6d3d3046cbfc19fc957dcb Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 16 Aug 2012 09:36:04 +0000 Subject: ARM: soc: dependency warnings for errata The PL310_ERRATA_753970 and ARM_ERRATA_764369 symbols only make sense when the base features for them are enabled, so select them conditionally in Kconfig to avoid warnings like: warning: (UX500_SOC_COMMON) selects PL310_ERRATA_753970 which has unmet direct dependencies (CACHE_PL310) warning: (ARCH_TEGRA_2x_SOC && ARCH_TEGRA_3x_SOC && UX500_SOC_COMMON) selects ARM_ERRATA_764369 which has unmet direct dependencies (CPU_V7 && SMP) Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Acked-by: Stephen Warren --- arch/arm/mach-tegra/Kconfig | 4 ++-- arch/arm/mach-ux500/Kconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 9077aaa398d9..b5f62ab04e84 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -16,7 +16,7 @@ config ARCH_TEGRA_2x_SOC select ARM_ERRATA_742230 select ARM_ERRATA_751472 select ARM_ERRATA_754327 - select ARM_ERRATA_764369 + select ARM_ERRATA_764369 if SMP select PL310_ERRATA_727915 if CACHE_L2X0 select PL310_ERRATA_769419 if CACHE_L2X0 select CPU_FREQ_TABLE if CPU_FREQ @@ -38,7 +38,7 @@ config ARCH_TEGRA_3x_SOC select ARM_ERRATA_743622 select ARM_ERRATA_751472 select ARM_ERRATA_754322 - select ARM_ERRATA_764369 + select ARM_ERRATA_764369 if SMP select PL310_ERRATA_769419 if CACHE_L2X0 select CPU_FREQ_TABLE if CPU_FREQ help diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 53d3d46dec12..18755f132267 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig @@ -5,9 +5,9 @@ config UX500_SOC_COMMON default y select ARM_GIC select HAS_MTU - select PL310_ERRATA_753970 + select PL310_ERRATA_753970 if CACHE_PL310 select ARM_ERRATA_754322 - select ARM_ERRATA_764369 + select ARM_ERRATA_764369 if SMP select CACHE_L2X0 select PINCTRL select PINCTRL_NOMADIK -- cgit From ec8e8208acb88d81dde2727b0ac06d06728bf963 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 3 Oct 2012 13:13:27 +0000 Subject: ARM: footbridge: remove RTC_IRQ definition Since commit bd8abc9a32c "ARM: mc146818rtc: remove unnecessary include of mach/irqs.h", building footbridge_defconfig results in this warning: In file included from include/linux/mc146818rtc.h:16:0, from arch/arm/mach-footbridge/isa-rtc.c:21: arch/arm/include/asm/mc146818rtc.h:10:0: warning: "RTC_IRQ" redefined [enabled by default] arch/arm/mach-footbridge/include/mach/irqs.h:93:0: note: this is the location of the previous definition The above commit was intentionally made to catch errors like this, where code relies on the RTC_IRQ definition. The only driver using it is the legacy PC-style drivers/char/rtc.c driver. However, the ARM architecture has been using the RTC_LIB framework since at least 2006, and that doesn't use it. Signed-off-by: Arnd Bergmann Cc: Rob Herring Cc: Alessandro Zummo Cc: rtc-linux@googlegroups.com Cc: Russell King --- arch/arm/mach-footbridge/include/mach/irqs.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-footbridge/include/mach/irqs.h b/arch/arm/mach-footbridge/include/mach/irqs.h index 400551e43e4e..61c714c4920e 100644 --- a/arch/arm/mach-footbridge/include/mach/irqs.h +++ b/arch/arm/mach-footbridge/include/mach/irqs.h @@ -89,8 +89,6 @@ #define IRQ_NETWINDER_VGA _ISA_IRQ(11) #define IRQ_NETWINDER_SOUND _ISA_IRQ(12) -#undef RTC_IRQ -#define RTC_IRQ IRQ_ISA_RTC_ALARM #define I8042_KBD_IRQ IRQ_ISA_KEYBOARD #define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE) #define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY -- cgit From edc9e3334a19efe1f0c1d2dc7df354e77c8d535d Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 5 Aug 2012 15:00:18 +0000 Subject: ARM: mv78xx0: correct addr_map_cfg __initdata annotation The annotation on the addr_map_cfg variable is in the wrong place. Without this patch, building mv78xx0_defconfig results in: /home/arnd/linux-arm/arch/arm/mach-mv78xx0/addr-map.c:59:2: warning: initialization from incompatible pointer type [enabled by default] /home/arnd/linux-arm/arch/arm/mach-mv78xx0/addr-map.c:59:2: warning: (near initialization for 'addr_map_cfg.win_cfg_base') [enabled by default] Signed-off-by: Arnd Bergmann Acked-by: Andrew Lunn Cc: Jason Cooper --- arch/arm/mach-mv78xx0/addr-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mv78xx0/addr-map.c b/arch/arm/mach-mv78xx0/addr-map.c index a9bc84180d21..03f7486873e8 100644 --- a/arch/arm/mach-mv78xx0/addr-map.c +++ b/arch/arm/mach-mv78xx0/addr-map.c @@ -53,7 +53,7 @@ static void __init __iomem *win_cfg_base(const struct orion_addr_map_cfg *cfg, i /* * Description of the windows needed by the platform code */ -static struct __initdata orion_addr_map_cfg addr_map_cfg = { +static struct orion_addr_map_cfg addr_map_cfg __initdata = { .num_wins = 14, .remappable_wins = 8, .win_cfg_base = win_cfg_base, -- cgit From 45ef6ac6f5d4d4ea441a042fee3790b3f33cba73 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 5 Aug 2012 14:59:12 +0000 Subject: ARM: footbridge: nw_gpio_lock is raw_spin_lock bd31b85960a "locking, ARM: Annotate low level hw locks as raw" made nw_gpio_lock a raw spinlock, but did not change all the users in device drivers. This fixes the remaining ones. sound/oss/waveartist.c: In function 'vnc_mute_spkr': sound/oss/waveartist.c:1485:2: warning: passing argument 1 of 'spinlock_check' from incompatible pointer type [enabled by default] include/linux/spinlock.h:272:102: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *' drivers/char/ds1620.c: In function 'netwinder_lock': drivers/char/ds1620.c:77:2: warning: passing argument 1 of 'spinlock_check' from incompatible pointer type [enabled by default] include/linux/spinlock.h:272:102: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *' drivers/char/nwflash.c: In function 'kick_open': drivers/char/nwflash.c:620:2: warning: passing argument 1 of 'spinlock_check' from incompatible pointer type [enabled by default] include/linux/spinlock.h:272:102: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *' Signed-off-by: Arnd Bergmann Cc: Thomas Gleixner Cc: Russell King --- drivers/char/ds1620.c | 8 ++++---- drivers/char/nwflash.c | 4 ++-- sound/oss/waveartist.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index aab9605f0b43..24ffd8cec51e 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c @@ -74,21 +74,21 @@ static inline void netwinder_ds1620_reset(void) static inline void netwinder_lock(unsigned long *flags) { - spin_lock_irqsave(&nw_gpio_lock, *flags); + raw_spin_lock_irqsave(&nw_gpio_lock, *flags); } static inline void netwinder_unlock(unsigned long *flags) { - spin_unlock_irqrestore(&nw_gpio_lock, *flags); + raw_spin_unlock_irqrestore(&nw_gpio_lock, *flags); } static inline void netwinder_set_fan(int i) { unsigned long flags; - spin_lock_irqsave(&nw_gpio_lock, flags); + raw_spin_lock_irqsave(&nw_gpio_lock, flags); nw_gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); - spin_unlock_irqrestore(&nw_gpio_lock, flags); + raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); } static inline int netwinder_get_fan(void) diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c index d45c3345b4af..04e2a9491fca 100644 --- a/drivers/char/nwflash.c +++ b/drivers/char/nwflash.c @@ -617,9 +617,9 @@ static void kick_open(void) * we want to write a bit pattern XXX1 to Xilinx to enable * the write gate, which will be open for about the next 2ms. */ - spin_lock_irqsave(&nw_gpio_lock, flags); + raw_spin_lock_irqsave(&nw_gpio_lock, flags); nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE); - spin_unlock_irqrestore(&nw_gpio_lock, flags); + raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); /* * let the ISA bus to catch on... diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index 24c430f721d4..672af8b56542 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c @@ -1482,9 +1482,9 @@ vnc_mute_spkr(wavnc_info *devc) { unsigned long flags; - spin_lock_irqsave(&nw_gpio_lock, flags); + raw_spin_lock_irqsave(&nw_gpio_lock, flags); nw_cpld_modify(CPLD_UNMUTE, devc->spkr_mute_state ? 0 : CPLD_UNMUTE); - spin_unlock_irqrestore(&nw_gpio_lock, flags); + raw_spin_unlock_irqrestore(&nw_gpio_lock, flags); } static void -- cgit