* [PATCH 0/7] OMAP compile warning fix
@ 2011-01-17 4:31 Felipe Balbi
2011-01-17 4:31 ` [PATCH 1/7] arm: omap: i2c: fix compile warning Felipe Balbi
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Tony,
I gave it a shot at dropping a few compile warnings
from omap1-only and omap2-only builds.
Following are 7 patches which I came up with. All
compile tested with omap1_defconfig and omap2_defconfig
(the latter being a result of omap2plus_defconfig -
omap3 and omap4 support and adding any other config option
which was disabled)
There are a few more warnings to clean up, though. I didn't
tackle all of them.
Felipe Balbi (7):
arm: omap: i2c: fix compile warning
arm: omap1: fix compile warning
arm: omap1: fix compile warnings
arm: omap1: fix a bunch of section mismatches
arm: omap2: mux: fix compile warning
arm: omap2: irq: fix compile warning:
arm: omap2: clksel: fix compile warning
arch/arm/mach-omap1/board-ams-delta.c | 14 +++---
arch/arm/mach-omap1/board-fsample.c | 2 +-
arch/arm/mach-omap1/board-palmte.c | 13 -----
arch/arm/mach-omap2/clkt_clksel.c | 5 ++-
arch/arm/mach-omap2/irq.c | 4 +-
arch/arm/mach-omap2/mux.c | 2 +-
arch/arm/plat-omap/i2c.c | 2 +-
arch/arm/plat-omap/include/plat/fpga.h | 92 ++++++++++++++++----------------
8 files changed, 62 insertions(+), 72 deletions(-)
--
1.7.3.4.598.g85356
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/7] arm: omap: i2c: fix compile warning
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 4:31 ` [PATCH 2/7] arm: omap1: " Felipe Balbi
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following compile warning:
arch/arm/plat-omap/i2c.c:120:13: warning:
'omap_pm_set_max_mpu_wakeup_lat_compat' defined but not used
arch/arm/plat-omap/i2c.c:125:38: warning: 'omap_i2c_latency'
defined but not used
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/plat-omap/i2c.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index a4f8003..3341ca4 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -112,6 +112,7 @@ static inline int omap1_i2c_add_bus(int bus_id)
}
+#ifdef CONFIG_ARCH_OMAP2PLUS
/*
* XXX This function is a temporary compatibility wrapper - only
* needed until the I2C driver can be converted to call
@@ -130,7 +131,6 @@ static struct omap_device_pm_latency omap_i2c_latency[] = {
},
};
-#ifdef CONFIG_ARCH_OMAP2PLUS
static inline int omap2_i2c_add_bus(int bus_id)
{
int l;
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/7] arm: omap1: fix compile warning
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
2011-01-17 4:31 ` [PATCH 1/7] arm: omap: i2c: fix compile warning Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 4:31 ` [PATCH 3/7] arm: omap1: fix compile warnings Felipe Balbi
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following compile warning:
arch/arm/mach-omap1/board-palmte.c:233:13: warning:
'palmte_headphones_detect' defined but not used
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/mach-omap1/board-palmte.c | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index fb51ce6..c9d38f4 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -230,19 +230,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = {
},
};
-static void palmte_headphones_detect(void *data, int state)
-{
- if (state) {
- /* Headphones connected, disable speaker */
- gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
- printk(KERN_INFO "PM: speaker off\n");
- } else {
- /* Headphones unplugged, re-enable speaker */
- gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
- printk(KERN_INFO "PM: speaker on\n");
- }
-}
-
static void __init palmte_misc_gpio_setup(void)
{
/* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/7] arm: omap1: fix compile warnings
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
2011-01-17 4:31 ` [PATCH 1/7] arm: omap: i2c: fix compile warning Felipe Balbi
2011-01-17 4:31 ` [PATCH 2/7] arm: omap1: " Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 4:31 ` [PATCH 4/7] arm: omap1: fix a bunch of section mismatches Felipe Balbi
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following compile warnings:
arch/arm/mach-omap1/board-innovator.c:165:3: warning: initialization
makes integer from pointer without a cast
arch/arm/mach-omap1/board-perseus2.c:305:3: warning: initialization
makes integer from pointer without a cast
arch/arm/mach-omap1/board-fsample.c:338:3: warning: initialization makes
integer from pointer without a cast
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/plat-omap/include/plat/fpga.h | 92 ++++++++++++++++----------------
1 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/arch/arm/plat-omap/include/plat/fpga.h b/arch/arm/plat-omap/include/plat/fpga.h
index ae39bcb..bd3c632 100644
--- a/arch/arm/plat-omap/include/plat/fpga.h
+++ b/arch/arm/plat-omap/include/plat/fpga.h
@@ -30,18 +30,18 @@ extern void omap1510_fpga_init_irq(void);
* ---------------------------------------------------------------------------
*/
/* maps in the FPGA registers and the ETHR registers */
-#define H2P2_DBG_FPGA_BASE IOMEM(0xE8000000) /* VA */
+#define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */
#define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */
#define H2P2_DBG_FPGA_START 0x04000000 /* PA */
#define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300)
-#define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */
-#define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */
-#define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */
-#define H2P2_DBG_FPGA_LEDS (H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */
-#define H2P2_DBG_FPGA_MISC_INPUTS (H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */
-#define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */
-#define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */
+#define H2P2_DBG_FPGA_FPGA_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */
+#define H2P2_DBG_FPGA_BOARD_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */
+#define H2P2_DBG_FPGA_GPIO IOMEM(H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */
+#define H2P2_DBG_FPGA_LEDS IOMEM(H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */
+#define H2P2_DBG_FPGA_MISC_INPUTS IOMEM(H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */
+#define H2P2_DBG_FPGA_LAN_STATUS IOMEM(H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */
+#define H2P2_DBG_FPGA_LAN_RESET IOMEM(H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */
/* NOTE: most boards don't have a static mapping for the FPGA ... */
struct h2p2_dbg_fpga {
@@ -81,55 +81,55 @@ struct h2p2_dbg_fpga {
* OMAP-1510 FPGA
* ---------------------------------------------------------------------------
*/
-#define OMAP1510_FPGA_BASE IOMEM(0xE8000000) /* VA */
+#define OMAP1510_FPGA_BASE 0xE8000000 /* VA */
#define OMAP1510_FPGA_SIZE SZ_4K
#define OMAP1510_FPGA_START 0x08000000 /* PA */
/* Revision */
-#define OMAP1510_FPGA_REV_LOW (OMAP1510_FPGA_BASE + 0x0)
-#define OMAP1510_FPGA_REV_HIGH (OMAP1510_FPGA_BASE + 0x1)
+#define OMAP1510_FPGA_REV_LOW IOMEM(OMAP1510_FPGA_BASE + 0x0)
+#define OMAP1510_FPGA_REV_HIGH IOMEM(OMAP1510_FPGA_BASE + 0x1)
-#define OMAP1510_FPGA_LCD_PANEL_CONTROL (OMAP1510_FPGA_BASE + 0x2)
-#define OMAP1510_FPGA_LED_DIGIT (OMAP1510_FPGA_BASE + 0x3)
-#define INNOVATOR_FPGA_HID_SPI (OMAP1510_FPGA_BASE + 0x4)
-#define OMAP1510_FPGA_POWER (OMAP1510_FPGA_BASE + 0x5)
+#define OMAP1510_FPGA_LCD_PANEL_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x2)
+#define OMAP1510_FPGA_LED_DIGIT IOMEM(OMAP1510_FPGA_BASE + 0x3)
+#define INNOVATOR_FPGA_HID_SPI IOMEM(OMAP1510_FPGA_BASE + 0x4)
+#define OMAP1510_FPGA_POWER IOMEM(OMAP1510_FPGA_BASE + 0x5)
/* Interrupt status */
-#define OMAP1510_FPGA_ISR_LO (OMAP1510_FPGA_BASE + 0x6)
-#define OMAP1510_FPGA_ISR_HI (OMAP1510_FPGA_BASE + 0x7)
+#define OMAP1510_FPGA_ISR_LO IOMEM(OMAP1510_FPGA_BASE + 0x6)
+#define OMAP1510_FPGA_ISR_HI IOMEM(OMAP1510_FPGA_BASE + 0x7)
/* Interrupt mask */
-#define OMAP1510_FPGA_IMR_LO (OMAP1510_FPGA_BASE + 0x8)
-#define OMAP1510_FPGA_IMR_HI (OMAP1510_FPGA_BASE + 0x9)
+#define OMAP1510_FPGA_IMR_LO IOMEM(OMAP1510_FPGA_BASE + 0x8)
+#define OMAP1510_FPGA_IMR_HI IOMEM(OMAP1510_FPGA_BASE + 0x9)
/* Reset registers */
-#define OMAP1510_FPGA_HOST_RESET (OMAP1510_FPGA_BASE + 0xa)
-#define OMAP1510_FPGA_RST (OMAP1510_FPGA_BASE + 0xb)
-
-#define OMAP1510_FPGA_AUDIO (OMAP1510_FPGA_BASE + 0xc)
-#define OMAP1510_FPGA_DIP (OMAP1510_FPGA_BASE + 0xe)
-#define OMAP1510_FPGA_FPGA_IO (OMAP1510_FPGA_BASE + 0xf)
-#define OMAP1510_FPGA_UART1 (OMAP1510_FPGA_BASE + 0x14)
-#define OMAP1510_FPGA_UART2 (OMAP1510_FPGA_BASE + 0x15)
-#define OMAP1510_FPGA_OMAP1510_STATUS (OMAP1510_FPGA_BASE + 0x16)
-#define OMAP1510_FPGA_BOARD_REV (OMAP1510_FPGA_BASE + 0x18)
-#define OMAP1510P1_PPT_DATA (OMAP1510_FPGA_BASE + 0x100)
-#define OMAP1510P1_PPT_STATUS (OMAP1510_FPGA_BASE + 0x101)
-#define OMAP1510P1_PPT_CONTROL (OMAP1510_FPGA_BASE + 0x102)
-
-#define OMAP1510_FPGA_TOUCHSCREEN (OMAP1510_FPGA_BASE + 0x204)
-
-#define INNOVATOR_FPGA_INFO (OMAP1510_FPGA_BASE + 0x205)
-#define INNOVATOR_FPGA_LCD_BRIGHT_LO (OMAP1510_FPGA_BASE + 0x206)
-#define INNOVATOR_FPGA_LCD_BRIGHT_HI (OMAP1510_FPGA_BASE + 0x207)
-#define INNOVATOR_FPGA_LED_GRN_LO (OMAP1510_FPGA_BASE + 0x208)
-#define INNOVATOR_FPGA_LED_GRN_HI (OMAP1510_FPGA_BASE + 0x209)
-#define INNOVATOR_FPGA_LED_RED_LO (OMAP1510_FPGA_BASE + 0x20a)
-#define INNOVATOR_FPGA_LED_RED_HI (OMAP1510_FPGA_BASE + 0x20b)
-#define INNOVATOR_FPGA_CAM_USB_CONTROL (OMAP1510_FPGA_BASE + 0x20c)
-#define INNOVATOR_FPGA_EXP_CONTROL (OMAP1510_FPGA_BASE + 0x20d)
-#define INNOVATOR_FPGA_ISR2 (OMAP1510_FPGA_BASE + 0x20e)
-#define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210)
+#define OMAP1510_FPGA_HOST_RESET IOMEM(OMAP1510_FPGA_BASE + 0xa)
+#define OMAP1510_FPGA_RST IOMEM(OMAP1510_FPGA_BASE + 0xb)
+
+#define OMAP1510_FPGA_AUDIO IOMEM(OMAP1510_FPGA_BASE + 0xc)
+#define OMAP1510_FPGA_DIP IOMEM(OMAP1510_FPGA_BASE + 0xe)
+#define OMAP1510_FPGA_FPGA_IO IOMEM(OMAP1510_FPGA_BASE + 0xf)
+#define OMAP1510_FPGA_UART1 IOMEM(OMAP1510_FPGA_BASE + 0x14)
+#define OMAP1510_FPGA_UART2 IOMEM(OMAP1510_FPGA_BASE + 0x15)
+#define OMAP1510_FPGA_OMAP1510_STATUS IOMEM(OMAP1510_FPGA_BASE + 0x16)
+#define OMAP1510_FPGA_BOARD_REV IOMEM(OMAP1510_FPGA_BASE + 0x18)
+#define OMAP1510P1_PPT_DATA IOMEM(OMAP1510_FPGA_BASE + 0x100)
+#define OMAP1510P1_PPT_STATUS IOMEM(OMAP1510_FPGA_BASE + 0x101)
+#define OMAP1510P1_PPT_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x102)
+
+#define OMAP1510_FPGA_TOUCHSCREEN IOMEM(OMAP1510_FPGA_BASE + 0x204)
+
+#define INNOVATOR_FPGA_INFO IOMEM(OMAP1510_FPGA_BASE + 0x205)
+#define INNOVATOR_FPGA_LCD_BRIGHT_LO IOMEM(OMAP1510_FPGA_BASE + 0x206)
+#define INNOVATOR_FPGA_LCD_BRIGHT_HI IOMEM(OMAP1510_FPGA_BASE + 0x207)
+#define INNOVATOR_FPGA_LED_GRN_LO IOMEM(OMAP1510_FPGA_BASE + 0x208)
+#define INNOVATOR_FPGA_LED_GRN_HI IOMEM(OMAP1510_FPGA_BASE + 0x209)
+#define INNOVATOR_FPGA_LED_RED_LO IOMEM(OMAP1510_FPGA_BASE + 0x20a)
+#define INNOVATOR_FPGA_LED_RED_HI IOMEM(OMAP1510_FPGA_BASE + 0x20b)
+#define INNOVATOR_FPGA_CAM_USB_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x20c)
+#define INNOVATOR_FPGA_EXP_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x20d)
+#define INNOVATOR_FPGA_ISR2 IOMEM(OMAP1510_FPGA_BASE + 0x20e)
+#define INNOVATOR_FPGA_IMR2 IOMEM(OMAP1510_FPGA_BASE + 0x210)
#define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300)
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/7] arm: omap1: fix a bunch of section mismatches
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
` (2 preceding siblings ...)
2011-01-17 4:31 ` [PATCH 3/7] arm: omap1: fix compile warnings Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 4:31 ` [PATCH 5/7] arm: omap2: mux: fix compile warning Felipe Balbi
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following section mismatches:
WARNING: arch/arm/mach-omap1/built-in.o(.data+0x491c): Section mismatch
in reference from the variable fsample_config to the (unknown reference)
.init.data:(unknown)
The variable fsample_config references
the (unknown reference) __initdata (unknown)
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-omap1/built-in.o(.data+0x8f0c): Section mismatch
in reference from the variable ams_delta_config to the (unknown
reference) .init.data:(unknown)
The variable ams_delta_config references
the (unknown reference) __initdata (unknown)
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-omap1/built-in.o(.data+0x93ac): Section mismatch
in reference from the variable ams_delta_camera_device to the (unknown
reference) .init.data:(unknown)
The variable ams_delta_camera_device references
the (unknown reference) __initdata (unknown)
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: vmlinux.o(.data+0x5e94): Section mismatch in reference from the
variable fsample_config to the (unknown reference) .init.data:(unknown)
The variable fsample_config references
the (unknown reference) __initdata (unknown)
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: vmlinux.o(.data+0xa484): Section mismatch in reference from the
variable ams_delta_config to the (unknown reference)
.init.data:(unknown)
The variable ams_delta_config references
the (unknown reference) __initdata (unknown)
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: vmlinux.o(.data+0xa924): Section mismatch in reference from the
variable ams_delta_camera_device to the (unknown reference)
.init.data:(unknown)
The variable ams_delta_camera_device references
the (unknown reference) __initdata (unknown)
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,
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/mach-omap1/board-ams-delta.c | 14 +++++++-------
arch/arm/mach-omap1/board-fsample.c | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index bd0495a..be2feca 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -165,7 +165,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
}
};
-static struct omap_lcd_config ams_delta_lcd_config __initdata = {
+static struct omap_lcd_config ams_delta_lcd_config = {
.ctrl_name = "internal",
};
@@ -192,14 +192,14 @@ static const struct matrix_keymap_data ams_delta_keymap_data = {
.keymap_size = ARRAY_SIZE(ams_delta_keymap),
};
-static struct omap_kp_platform_data ams_delta_kp_data = {
+static struct omap_kp_platform_data ams_delta_kp_data __initdata = {
.rows = 8,
.cols = 8,
.keymap_data = &ams_delta_keymap_data,
.delay = 9,
};
-static struct platform_device ams_delta_kp_device = {
+static struct platform_device ams_delta_kp_device __initdata = {
.name = "omap-keypad",
.id = -1,
.dev = {
@@ -209,12 +209,12 @@ static struct platform_device ams_delta_kp_device = {
.resource = ams_delta_kp_resources,
};
-static struct platform_device ams_delta_lcd_device = {
+static struct platform_device ams_delta_lcd_device __initdata = {
.name = "lcd_ams_delta",
.id = -1,
};
-static struct platform_device ams_delta_led_device = {
+static struct platform_device ams_delta_led_device __initdata = {
.name = "ams-delta-led",
.id = -1
};
@@ -243,7 +243,7 @@ static int ams_delta_camera_power(struct device *dev, int power)
#define ams_delta_camera_power NULL
#endif
-static struct soc_camera_link __initdata ams_delta_iclink = {
+static struct soc_camera_link ams_delta_iclink __initdata = {
.bus_id = 0, /* OMAP1 SoC camera bus */
.i2c_adapter_id = 1,
.board_info = &ams_delta_camera_board_info[0],
@@ -251,7 +251,7 @@ static struct soc_camera_link __initdata ams_delta_iclink = {
.power = ams_delta_camera_power,
};
-static struct platform_device ams_delta_camera_device = {
+static struct platform_device ams_delta_camera_device __initdata = {
.name = "soc-camera-pdrv",
.id = 0,
.dev = {
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 0efb9db..27fb1be 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -287,7 +287,7 @@ static struct platform_device *devices[] __initdata = {
&lcd_device,
};
-static struct omap_lcd_config fsample_lcd_config __initdata = {
+static struct omap_lcd_config fsample_lcd_config = {
.ctrl_name = "internal",
};
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/7] arm: omap2: mux: fix compile warning
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
` (3 preceding siblings ...)
2011-01-17 4:31 ` [PATCH 4/7] arm: omap1: fix a bunch of section mismatches Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 4:31 ` [PATCH 6/7] arm: omap2: irq: fix compile warning: Felipe Balbi
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following compile warning:
arch/arm/mach-omap2/mux.c: In function '_omap_mux_get_by_name':
arch/arm/mach-omap2/mux.c:163:17: warning: 'found_mode' may be used
uninitialized in this function
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/mach-omap2/mux.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index df8d2f2..fae49d1 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -160,7 +160,7 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition,
struct omap_mux *mux = NULL;
struct omap_mux_entry *e;
const char *mode_name;
- int found = 0, found_mode, mode0_len = 0;
+ int found = 0, found_mode = 0, mode0_len = 0;
struct list_head *muxmodes = &partition->muxmodes;
mode_name = strchr(muxname, '.');
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/7] arm: omap2: irq: fix compile warning:
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
` (4 preceding siblings ...)
2011-01-17 4:31 ` [PATCH 5/7] arm: omap2: mux: fix compile warning Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 4:31 ` [PATCH 7/7] arm: omap2: clksel: fix compile warning Felipe Balbi
2011-01-20 1:25 ` [PATCH 0/7] OMAP compile warning fix Tony Lindgren
7 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following compile warning:
arch/arm/mach-omap2/irq.c:64:31: warning: 'intc_context' defined but not
used
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/mach-omap2/irq.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 23049c4..d151aac 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -61,8 +61,6 @@ struct omap3_intc_regs {
u32 mir[INTCPS_NR_MIR_REGS];
};
-static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
-
/* INTC bank register get/set */
static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg)
@@ -229,6 +227,8 @@ void __init omap_init_irq(void)
}
#ifdef CONFIG_ARCH_OMAP3
+static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
+
void omap_intc_save_context(void)
{
int ind = 0, i = 0;
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/7] arm: omap2: clksel: fix compile warning
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
` (5 preceding siblings ...)
2011-01-17 4:31 ` [PATCH 6/7] arm: omap2: irq: fix compile warning: Felipe Balbi
@ 2011-01-17 4:31 ` Felipe Balbi
2011-01-17 8:07 ` Varadarajan, Charulatha
2011-01-20 1:25 ` [PATCH 0/7] OMAP compile warning fix Tony Lindgren
7 siblings, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 4:31 UTC (permalink / raw)
To: linux-arm-kernel
Fix the following compile warning:
arch/arm/mach-omap2/clkt_clksel.c: In function '_get_div_and_fieldval':
arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
used uninitialized in this function
While at that, also add a check to avoid using max_clkr while NULL.
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
arch/arm/mach-omap2/clkt_clksel.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
index a781cd6..baf0b6b 100644
--- a/arch/arm/mach-omap2/clkt_clksel.c
+++ b/arch/arm/mach-omap2/clkt_clksel.c
@@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
u32 *field_val)
{
const struct clksel *clks;
- const struct clksel_rate *clkr, *max_clkr;
+ const struct clksel_rate *clkr, *max_clkr = NULL;
u8 max_div = 0;
clks = _get_clksel_by_parent(clk, src_clk);
@@ -123,6 +123,9 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
}
}
+ if (!max_clkr)
+ return 0;
+
if (max_div == 0) {
/* This indicates an error in the clksel data */
WARN(1, "clock: Could not find divisor for clock %s parent %s"
--
1.7.3.4.598.g85356
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/7] arm: omap2: clksel: fix compile warning
2011-01-17 4:31 ` [PATCH 7/7] arm: omap2: clksel: fix compile warning Felipe Balbi
@ 2011-01-17 8:07 ` Varadarajan, Charulatha
2011-01-17 8:18 ` Felipe Balbi
0 siblings, 1 reply; 12+ messages in thread
From: Varadarajan, Charulatha @ 2011-01-17 8:07 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 17, 2011 at 10:01, Felipe Balbi <balbi@ti.com> wrote:
> Fix the following compile warning:
> arch/arm/mach-omap2/clkt_clksel.c: In function '_get_div_and_fieldval':
> arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
> used uninitialized in this function
>
> While at that, also add a check to avoid using max_clkr while NULL.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> ?arch/arm/mach-omap2/clkt_clksel.c | ? ?5 ++++-
> ?1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
> index a781cd6..baf0b6b 100644
> --- a/arch/arm/mach-omap2/clkt_clksel.c
> +++ b/arch/arm/mach-omap2/clkt_clksel.c
> @@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?u32 *field_val)
> ?{
> ? ? ? ?const struct clksel *clks;
> - ? ? ? const struct clksel_rate *clkr, *max_clkr;
> + ? ? ? const struct clksel_rate *clkr, *max_clkr = NULL;
> ? ? ? ?u8 max_div = 0;
>
> ? ? ? ?clks = _get_clksel_by_parent(clk, src_clk);
> @@ -123,6 +123,9 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
> ? ? ? ? ? ? ? ?}
> ? ? ? ?}
>
> + ? ? ? if (!max_clkr)
> + ? ? ? ? ? ? ? return 0;
Would it be more appropriate to move this check after the "if" check
of max_div==0 and it's warning?
or add a warning before it returns?
> +
> ? ? ? ?if (max_div == 0) {
> ? ? ? ? ? ? ? ?/* This indicates an error in the clksel data */
> ? ? ? ? ? ? ? ?WARN(1, "clock: Could not find divisor for clock %s parent %s"
> --
> 1.7.3.4.598.g85356
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 7/7] arm: omap2: clksel: fix compile warning
2011-01-17 8:07 ` Varadarajan, Charulatha
@ 2011-01-17 8:18 ` Felipe Balbi
2011-01-19 23:09 ` Tony Lindgren
0 siblings, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2011-01-17 8:18 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Mon, Jan 17, 2011 at 01:37:41PM +0530, Varadarajan, Charulatha wrote:
> On Mon, Jan 17, 2011 at 10:01, Felipe Balbi <balbi@ti.com> wrote:
> > Fix the following compile warning:
> > arch/arm/mach-omap2/clkt_clksel.c: In function '_get_div_and_fieldval':
> > arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
> > used uninitialized in this function
> >
> > While at that, also add a check to avoid using max_clkr while NULL.
> >
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> > ?arch/arm/mach-omap2/clkt_clksel.c | ? ?5 ++++-
> > ?1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
> > index a781cd6..baf0b6b 100644
> > --- a/arch/arm/mach-omap2/clkt_clksel.c
> > +++ b/arch/arm/mach-omap2/clkt_clksel.c
> > @@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?u32 *field_val)
> > ?{
> > ? ? ? ?const struct clksel *clks;
> > - ? ? ? const struct clksel_rate *clkr, *max_clkr;
> > + ? ? ? const struct clksel_rate *clkr, *max_clkr = NULL;
> > ? ? ? ?u8 max_div = 0;
> >
> > ? ? ? ?clks = _get_clksel_by_parent(clk, src_clk);
> > @@ -123,6 +123,9 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
> > ? ? ? ? ? ? ? ?}
> > ? ? ? ?}
> >
> > + ? ? ? if (!max_clkr)
> > + ? ? ? ? ? ? ? return 0;
>
> Would it be more appropriate to move this check after the "if" check
> of max_div==0 and it's warning?
> or add a warning before it returns?
Maybe this return isn't even necessary. max_clkr will be true if max_div
is valid, so they cancel each other.
Tony ?
--
balbi
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 7/7] arm: omap2: clksel: fix compile warning
2011-01-17 8:18 ` Felipe Balbi
@ 2011-01-19 23:09 ` Tony Lindgren
0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2011-01-19 23:09 UTC (permalink / raw)
To: linux-arm-kernel
* Felipe Balbi <balbi@ti.com> [110117 00:18]:
> Hi,
>
> On Mon, Jan 17, 2011 at 01:37:41PM +0530, Varadarajan, Charulatha wrote:
> > On Mon, Jan 17, 2011 at 10:01, Felipe Balbi <balbi@ti.com> wrote:
> > > Fix the following compile warning:
> > > arch/arm/mach-omap2/clkt_clksel.c: In function '_get_div_and_fieldval':
> > > arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
> > > used uninitialized in this function
> > >
> > > While at that, also add a check to avoid using max_clkr while NULL.
> > >
> > > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > > ---
> > > ?arch/arm/mach-omap2/clkt_clksel.c | ? ?5 ++++-
> > > ?1 files changed, 4 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c
> > > index a781cd6..baf0b6b 100644
> > > --- a/arch/arm/mach-omap2/clkt_clksel.c
> > > +++ b/arch/arm/mach-omap2/clkt_clksel.c
> > > @@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
> > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?u32 *field_val)
> > > ?{
> > > ? ? ? ?const struct clksel *clks;
> > > - ? ? ? const struct clksel_rate *clkr, *max_clkr;
> > > + ? ? ? const struct clksel_rate *clkr, *max_clkr = NULL;
> > > ? ? ? ?u8 max_div = 0;
> > >
> > > ? ? ? ?clks = _get_clksel_by_parent(clk, src_clk);
> > > @@ -123,6 +123,9 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
> > > ? ? ? ? ? ? ? ?}
> > > ? ? ? ?}
> > >
> > > + ? ? ? if (!max_clkr)
> > > + ? ? ? ? ? ? ? return 0;
> >
> > Would it be more appropriate to move this check after the "if" check
> > of max_div==0 and it's warning?
> > or add a warning before it returns?
>
> Maybe this return isn't even necessary. max_clkr will be true if max_div
> is valid, so they cancel each other.
>
> Tony ?
Looks like the max_div test should catch it to me. Paul?
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/7] OMAP compile warning fix
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
` (6 preceding siblings ...)
2011-01-17 4:31 ` [PATCH 7/7] arm: omap2: clksel: fix compile warning Felipe Balbi
@ 2011-01-20 1:25 ` Tony Lindgren
7 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2011-01-20 1:25 UTC (permalink / raw)
To: linux-arm-kernel
* Felipe Balbi <balbi@ti.com> [110116 20:30]:
> Hi Tony,
>
> I gave it a shot at dropping a few compile warnings
> from omap1-only and omap2-only builds.
>
> Following are 7 patches which I came up with. All
> compile tested with omap1_defconfig and omap2_defconfig
> (the latter being a result of omap2plus_defconfig -
> omap3 and omap4 support and adding any other config option
> which was disabled)
>
> There are a few more warnings to clean up, though. I didn't
> tackle all of them.
Thanks, adding all but the last one into devel-cleanup
for the next merge window. Let's see what Paul says about
the last one.
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-01-20 1:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-17 4:31 [PATCH 0/7] OMAP compile warning fix Felipe Balbi
2011-01-17 4:31 ` [PATCH 1/7] arm: omap: i2c: fix compile warning Felipe Balbi
2011-01-17 4:31 ` [PATCH 2/7] arm: omap1: " Felipe Balbi
2011-01-17 4:31 ` [PATCH 3/7] arm: omap1: fix compile warnings Felipe Balbi
2011-01-17 4:31 ` [PATCH 4/7] arm: omap1: fix a bunch of section mismatches Felipe Balbi
2011-01-17 4:31 ` [PATCH 5/7] arm: omap2: mux: fix compile warning Felipe Balbi
2011-01-17 4:31 ` [PATCH 6/7] arm: omap2: irq: fix compile warning: Felipe Balbi
2011-01-17 4:31 ` [PATCH 7/7] arm: omap2: clksel: fix compile warning Felipe Balbi
2011-01-17 8:07 ` Varadarajan, Charulatha
2011-01-17 8:18 ` Felipe Balbi
2011-01-19 23:09 ` Tony Lindgren
2011-01-20 1:25 ` [PATCH 0/7] OMAP compile warning fix Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).