* [PATCH 01/25] spi/imx: make spi_imx_data.devtype_data member point to const data
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 02/25] spi/spi-omap2-mcspi: add a const qualifier Uwe Kleine-König
` (25 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change the
following warning would occur:
drivers/spi/spi-imx.c: In function spi_imx_probe:
drivers/spi/spi-imx.c:814:24: warning: assignment discards const qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/spi/spi-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 47877d6..b09fc77 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -97,7 +97,7 @@ struct spi_imx_data {
const void *tx_buf;
unsigned int txfifo; /* number of words pushed in tx FIFO */
- struct spi_imx_devtype_data *devtype_data;
+ const struct spi_imx_devtype_data *devtype_data;
int chipselect[0];
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 02/25] spi/spi-omap2-mcspi: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 01/25] spi/imx: make spi_imx_data.devtype_data member point to const data Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 03/25] serial/imx: make imx_port.devdata member point to const data Uwe Kleine-König
` (24 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/spi/spi-omap2-mcspi.c: In function 'omap2_mcspi_probe':
drivers/spi/spi-omap2-mcspi.c:1118: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 0c73dd4..3455769 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1087,7 +1087,7 @@ MODULE_DEVICE_TABLE(of, omap_mcspi_of_match);
static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
{
struct spi_master *master;
- struct omap2_mcspi_platform_config *pdata;
+ const struct omap2_mcspi_platform_config *pdata;
struct omap2_mcspi *mcspi;
struct resource *r;
int status = 0, i;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 03/25] serial/imx: make imx_port.devdata member point to const data
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 01/25] spi/imx: make spi_imx_data.devtype_data member point to const data Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 02/25] spi/spi-omap2-mcspi: add a const qualifier Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 15:31 ` Greg Kroah-Hartman
2012-07-23 9:13 ` [PATCH 04/25] serial/mpc52xx_uart: add a const qualifier Uwe Kleine-König
` (23 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change the
following warning would occur:
drivers/tty/serial/imx.c: In function 'serial_imx_probe_dt':
drivers/tty/serial/imx.c:1430:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 4ef7473..0af4eec 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -207,7 +207,7 @@ struct imx_port {
unsigned short trcv_delay; /* transceiver delay */
struct clk *clk_ipg;
struct clk *clk_per;
- struct imx_uart_data *devdata;
+ const struct imx_uart_data *devdata;
};
struct imx_port_ucrs {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 04/25] serial/mpc52xx_uart: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (2 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 03/25] serial/imx: make imx_port.devdata member point to const data Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 15:31 ` Greg Kroah-Hartman
2012-07-23 9:13 ` [PATCH 05/25] ARM: cache-l2x0: " Uwe Kleine-König
` (22 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/tty/serial/mpc52xx_uart.c: In function 'mpc52xx_uart_of_enumerate':
drivers/tty/serial/mpc52xx_uart.c:1440:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/mpc52xx_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index bedac0d..b131f2d 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -598,7 +598,7 @@ static struct psc_ops mpc512x_psc_ops = {
};
#endif
-static struct psc_ops *psc_ops;
+static const struct psc_ops *psc_ops;
/* ======================================================================== */
/* UART operations */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 04/25] serial/mpc52xx_uart: add a const qualifier
2012-07-23 9:13 ` [PATCH 04/25] serial/mpc52xx_uart: add a const qualifier Uwe Kleine-König
@ 2012-07-23 15:31 ` Greg Kroah-Hartman
0 siblings, 0 replies; 48+ messages in thread
From: Greg Kroah-Hartman @ 2012-07-23 15:31 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 11:13:09AM +0200, Uwe Kleine-K?nig wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/tty/serial/mpc52xx_uart.c: In function 'mpc52xx_uart_of_enumerate':
> drivers/tty/serial/mpc52xx_uart.c:1440:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 05/25] ARM: cache-l2x0: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (3 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 04/25] serial/mpc52xx_uart: add a const qualifier Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 06/25] misc/atmel_tc: make atmel_tc.tcb_config member point to const data Uwe Kleine-König
` (21 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change the
following warning would occur:
arch/arm/mm/cache-l2x0.c: In function 'l2x0_of_init':
arch/arm/mm/cache-l2x0.c:573:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
though.
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
arch/arm/mm/cache-l2x0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 2a8e380..577baf7 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -554,7 +554,7 @@ static const struct of_device_id l2x0_ids[] __initconst = {
int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
{
struct device_node *np;
- struct l2x0_of_data *data;
+ const struct l2x0_of_data *data;
struct resource res;
np = of_find_matching_node(NULL, l2x0_ids);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 06/25] misc/atmel_tc: make atmel_tc.tcb_config member point to const data
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (4 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 05/25] ARM: cache-l2x0: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 07/25] gpio/gpio-omap.c: add a const qualifier Uwe Kleine-König
` (20 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/misc/atmel_tclib.c: In function 'tc_probe':
drivers/misc/atmel_tclib.c:170: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
include/linux/atmel_tc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/atmel_tc.h b/include/linux/atmel_tc.h
index 1d14b1dc..89a931b 100644
--- a/include/linux/atmel_tc.h
+++ b/include/linux/atmel_tc.h
@@ -63,7 +63,7 @@ struct atmel_tc {
struct platform_device *pdev;
struct resource *iomem;
void __iomem *regs;
- struct atmel_tcb_config *tcb_config;
+ const struct atmel_tcb_config *tcb_config;
int irq[3];
struct clk *clk[3];
struct list_head node;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 07/25] gpio/gpio-omap.c: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (5 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 06/25] misc/atmel_tc: make atmel_tc.tcb_config member point to const data Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-29 16:13 ` Linus Walleij
2012-07-30 8:18 ` Santosh Shilimkar
2012-07-23 9:13 ` [PATCH 08/25] gpio/mpc8xxx: " Uwe Kleine-König
` (19 subsequent siblings)
26 siblings, 2 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/gpio/gpio-omap.c: In function 'omap_gpio_probe':
drivers/gpio/gpio-omap.c:1060: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/gpio/gpio-omap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index c4ed172..019cb7b 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1050,7 +1050,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node;
const struct of_device_id *match;
- struct omap_gpio_platform_data *pdata;
+ const struct omap_gpio_platform_data *pdata;
struct resource *res;
struct gpio_bank *bank;
int ret = 0;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 08/25] gpio/mpc8xxx: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (6 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 07/25] gpio/gpio-omap.c: add a const qualifier Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-29 16:13 ` Linus Walleij
2012-07-23 9:13 ` [PATCH 09/25] i2c/i2c-omap: " Uwe Kleine-König
` (18 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_add_controller':
drivers/gpio/gpio-mpc8xxx.c:360:30: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/gpio/gpio-mpc8xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index 5a1817e..9ae29cc 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -38,7 +38,7 @@ struct mpc8xxx_gpio_chip {
*/
u32 data;
struct irq_domain *irq;
- void *of_dev_id_data;
+ const void *of_dev_id_data;
};
static inline u32 mpc8xxx_gpio2mask(unsigned int gpio)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 08/25] gpio/mpc8xxx: add a const qualifier
2012-07-23 9:13 ` [PATCH 08/25] gpio/mpc8xxx: " Uwe Kleine-König
@ 2012-07-29 16:13 ` Linus Walleij
0 siblings, 0 replies; 48+ messages in thread
From: Linus Walleij @ 2012-07-29 16:13 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_add_controller':
> drivers/gpio/gpio-mpc8xxx.c:360:30: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 09/25] i2c/i2c-omap: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (7 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 08/25] gpio/mpc8xxx: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 17:27 ` Datta, Shubhrajyoti
2012-07-23 9:13 ` [PATCH 10/25] i2c/mpc: " Uwe Kleine-König
` (17 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/i2c/busses/i2c-omap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..4fc585d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -987,7 +987,8 @@ omap_i2c_probe(struct platform_device *pdev)
struct omap_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem, *irq, *ioarea;
- struct omap_i2c_bus_platform_data *pdata = pdev->dev.platform_data;
+ const struct omap_i2c_bus_platform_data *pdata =
+ pdev->dev.platform_data;
struct device_node *node = pdev->dev.of_node;
const struct of_device_id *match;
irq_handler_t isr;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 09/25] i2c/i2c-omap: add a const qualifier
2012-07-23 9:13 ` [PATCH 09/25] i2c/i2c-omap: " Uwe Kleine-König
@ 2012-07-23 17:27 ` Datta, Shubhrajyoti
0 siblings, 0 replies; 48+ messages in thread
From: Datta, Shubhrajyoti @ 2012-07-23 17:27 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 2:43 PM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/i2c/busses/i2c-omap.c: In function 'omap_i2c_probe':
> drivers/i2c/busses/i2c-omap.c:1025: warning: assignment discards qualifiers from pointer target type
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
> drivers/i2c/busses/i2c-omap.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 10/25] i2c/mpc: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (8 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 09/25] i2c/i2c-omap: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 11/25] dmaengine: at_hdmac: add a few const qualifiers Uwe Kleine-König
` (16 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/i2c/busses/i2c-mpc.c: In function 'fsl_i2c_probe':
drivers/i2c/busses/i2c-mpc.c:650:31: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/i2c/busses/i2c-mpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index b76731e..775062c 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -647,7 +647,7 @@ static int __devinit fsl_i2c_probe(struct platform_device *op)
}
if (match->data) {
- struct mpc_i2c_data *data = match->data;
+ const struct mpc_i2c_data *data = match->data;
data->setup(op->dev.of_node, i2c, clock, data->prescaler);
} else {
/* Backwards compatibility */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 11/25] dmaengine: at_hdmac: add a few const qualifiers
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (9 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 10/25] i2c/mpc: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 12/25] mmc/omap_hsmmc: add a const qualifier Uwe Kleine-König
` (15 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/dma/at_hdmac.c: In function 'at_dma_get_driver_data':
drivers/dma/at_hdmac.c:1228: warning: return discards qualifiers from pointer target type
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/dma/at_hdmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 7292aa8..7e9d265 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1217,7 +1217,7 @@ static const struct platform_device_id atdma_devtypes[] = {
}
};
-static inline struct at_dma_platform_data * __init at_dma_get_driver_data(
+static inline const struct at_dma_platform_data * __init at_dma_get_driver_data(
struct platform_device *pdev)
{
if (pdev->dev.of_node) {
@@ -1255,7 +1255,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
int irq;
int err;
int i;
- struct at_dma_platform_data *plat_dat;
+ const struct at_dma_platform_data *plat_dat;
/* setup platform data for each SoC */
dma_cap_set(DMA_MEMCPY, at91sam9rl_config.cap_mask);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 12/25] mmc/omap_hsmmc: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (10 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 11/25] dmaengine: at_hdmac: add a few const qualifiers Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 15:41 ` S, Venkatraman
2012-07-23 9:13 ` [PATCH 13/25] macintosh/mediabay: " Uwe Kleine-König
` (14 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
drivers/mmc/host/omap_hsmmc.c:1808: warning: initialization discards qualifiers from pointer target type
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/mmc/host/omap_hsmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 389a3ee..5bcd043 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1805,7 +1805,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
if (match) {
pdata = of_get_hsmmc_pdata(&pdev->dev);
if (match->data) {
- u16 *offsetp = match->data;
+ const u16 *offsetp = match->data;
pdata->reg_offset = *offsetp;
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 12/25] mmc/omap_hsmmc: add a const qualifier
2012-07-23 9:13 ` [PATCH 12/25] mmc/omap_hsmmc: add a const qualifier Uwe Kleine-König
@ 2012-07-23 15:41 ` S, Venkatraman
0 siblings, 0 replies; 48+ messages in thread
From: S, Venkatraman @ 2012-07-23 15:41 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 2:43 PM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
> drivers/mmc/host/omap_hsmmc.c:1808: warning: initialization discards qualifiers from pointer target type
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Venkatraman S <svenkatr@ti.com>
> ---
> drivers/mmc/host/omap_hsmmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 13/25] macintosh/mediabay: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (11 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 12/25] mmc/omap_hsmmc: add a const qualifier Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-09-05 2:40 ` Benjamin Herrenschmidt
2012-07-23 9:13 ` [PATCH 14/25] powerpc/83xx: " Uwe Kleine-König
` (13 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/macintosh/mediabay.c: In function 'media_bay_attach':
drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/macintosh/mediabay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 831d751..54bf584 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -63,7 +63,7 @@ struct media_bay_info {
int value_count;
int timer;
struct macio_dev *mdev;
- struct mb_ops* ops;
+ const struct mb_ops* ops;
int index;
int cached_gpio;
int sleeping;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 13/25] macintosh/mediabay: add a const qualifier
2012-07-23 9:13 ` [PATCH 13/25] macintosh/mediabay: " Uwe Kleine-König
@ 2012-09-05 2:40 ` Benjamin Herrenschmidt
2012-09-05 8:02 ` Uwe Kleine-König
0 siblings, 1 reply; 48+ messages in thread
From: Benjamin Herrenschmidt @ 2012-09-05 2:40 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-K?nig wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> drivers/macintosh/mediabay.c: In function 'media_bay_attach':
> drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
Ack all of these assuming you test built (I didn't). Do you need me to
carry any of this via the powerpc tree ?
Cheers,
Ben.
> drivers/macintosh/mediabay.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
> index 831d751..54bf584 100644
> --- a/drivers/macintosh/mediabay.c
> +++ b/drivers/macintosh/mediabay.c
> @@ -63,7 +63,7 @@ struct media_bay_info {
> int value_count;
> int timer;
> struct macio_dev *mdev;
> - struct mb_ops* ops;
> + const struct mb_ops* ops;
> int index;
> int cached_gpio;
> int sleeping;
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 13/25] macintosh/mediabay: add a const qualifier
2012-09-05 2:40 ` Benjamin Herrenschmidt
@ 2012-09-05 8:02 ` Uwe Kleine-König
2012-09-05 9:23 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-09-05 8:02 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Wed, Sep 05, 2012 at 12:40:17PM +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-K?nig wrote:
> > This prepares *of_device_id.data becoming const. Without this change
> > the following warning would occur:
> >
> > drivers/macintosh/mediabay.c: In function 'media_bay_attach':
> > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
> >
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > ---
>
> Ack all of these assuming you test built (I didn't).
"all" means the two mediabay patches? And yes, they are all built
tested.
> Do you need me to
> carry any of this via the powerpc tree ?
The patch that adds the const to of_device_id depends[1] on this patch.
And the other mediabay is only valid after that const is added. So the
easiest is if the series is pulled in one go. Arnd intended to let Linus
pull it for 3.6-rc1 but it was missed because of a communication
problem. So I intend to get it in during the 3.7 merge window.
Best regards
Uwe
[1] it's only a soft depend, because the result is "only" a warning, but
still.
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 13/25] macintosh/mediabay: add a const qualifier
2012-09-05 8:02 ` Uwe Kleine-König
@ 2012-09-05 9:23 ` Benjamin Herrenschmidt
2012-09-11 6:56 ` Uwe Kleine-König
0 siblings, 1 reply; 48+ messages in thread
From: Benjamin Herrenschmidt @ 2012-09-05 9:23 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 2012-09-05 at 10:02 +0200, Uwe Kleine-K?nig wrote:
> Hello,
>
> On Wed, Sep 05, 2012 at 12:40:17PM +1000, Benjamin Herrenschmidt wrote:
> > On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-K?nig wrote:
> > > This prepares *of_device_id.data becoming const. Without this change
> > > the following warning would occur:
> > >
> > > drivers/macintosh/mediabay.c: In function 'media_bay_attach':
> > > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
> > >
> > > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > > ---
> >
> > Ack all of these assuming you test built (I didn't).
> "all" means the two mediabay patches? And yes, they are all built
> tested.
Yeah, anything powerpc you had in your series, but the two mediabay ones
are what I spotted when digging through stuff today :-)
> > Do you need me to
> > carry any of this via the powerpc tree ?
> The patch that adds the const to of_device_id depends[1] on this patch.
> And the other mediabay is only valid after that const is added. So the
> easiest is if the series is pulled in one go. Arnd intended to let Linus
> pull it for 3.6-rc1 but it was missed because of a communication
> problem. So I intend to get it in during the 3.7 merge window.
Ok, I'm happy for Arnd to carry all of these, I trust his
judgement/review for that stuff including for ppc specific bits.
Cheers,
Ben.
> Best regards
> Uwe
>
> [1] it's only a soft depend, because the result is "only" a warning, but
> still.
>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 13/25] macintosh/mediabay: add a const qualifier
2012-09-05 9:23 ` Benjamin Herrenschmidt
@ 2012-09-11 6:56 ` Uwe Kleine-König
2012-09-11 7:08 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-09-11 6:56 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 05, 2012 at 07:23:43PM +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2012-09-05 at 10:02 +0200, Uwe Kleine-K?nig wrote:
> > Hello,
> >
> > On Wed, Sep 05, 2012 at 12:40:17PM +1000, Benjamin Herrenschmidt wrote:
> > > On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-K?nig wrote:
> > > > This prepares *of_device_id.data becoming const. Without this change
> > > > the following warning would occur:
> > > >
> > > > drivers/macintosh/mediabay.c: In function 'media_bay_attach':
> > > > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
> > > >
> > > > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > > > ---
> > >
> > > Ack all of these assuming you test built (I didn't).
> > "all" means the two mediabay patches? And yes, they are all built
> > tested.
>
> Yeah, anything powerpc you had in your series, but the two mediabay ones
> are what I spotted when digging through stuff today :-)
I added that to
serial/mpc52xx_uart: add a const qualifier
gpio/mpc8xxx: add a const qualifier
i2c/mpc: add a const qualifier
macintosh/mediabay: add a const qualifier
powerpc/83xx: add a const qualifier
powerpc/fsl_msi: add a const qualifier
powerpc/celleb_pci: add a const qualifier
watchdog/mpc8xxx: add a const qualifier
powerpc/fsl_msi: drop unneeded cast to non-const pointer
i2c/mpc: make data used as *of_device_id.data const
macintosh/mediabay: make data used as *of_device_id.data const
can: mpc5xxx_can: make data used as *of_device_id.data const
in the hope I didn't interpret "anything powerpc" too wide. Please tell
me if I did.
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 14/25] powerpc/83xx: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (12 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 13/25] macintosh/mediabay: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 15/25] powerpc/fsl_msi: " Uwe Kleine-König
` (12 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
arch/powerpc/platforms/83xx/suspend.c: In function 'pmc_probe':
arch/powerpc/platforms/83xx/suspend.c:336:7: error: assignment discards 'const' qualifier from pointer target type [-Werror]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
arch/powerpc/platforms/83xx/suspend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 1a04671..1d769a2 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -326,7 +326,7 @@ static int pmc_probe(struct platform_device *ofdev)
const struct of_device_id *match;
struct device_node *np = ofdev->dev.of_node;
struct resource res;
- struct pmc_type *type;
+ const struct pmc_type *type;
int ret = 0;
match = of_match_device(pmc_match, &ofdev->dev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 15/25] powerpc/fsl_msi: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (13 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 14/25] powerpc/83xx: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-10-15 16:14 ` Tabi Timur-B04825
2012-07-23 9:13 ` [PATCH 16/25] powerpc/celleb_pci: " Uwe Kleine-König
` (11 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
arch/powerpc/sysdev/fsl_msi.c: In function 'fsl_of_msi_probe':
arch/powerpc/sysdev/fsl_msi.c:379:11: error: assignment discards 'const' qualifier from pointer target type [-Werror]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
arch/powerpc/sysdev/fsl_msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 6e097de..a40acd6 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -368,7 +368,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
int err, i, j, irq_index, count;
int rc;
const u32 *p;
- struct fsl_msi_feature *features;
+ const struct fsl_msi_feature *features;
int len;
u32 offset;
static const u32 all_avail[] = { 0, NR_MSI_IRQS };
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 15/25] powerpc/fsl_msi: add a const qualifier
2012-07-23 9:13 ` [PATCH 15/25] powerpc/fsl_msi: " Uwe Kleine-König
@ 2012-10-15 16:14 ` Tabi Timur-B04825
0 siblings, 0 replies; 48+ messages in thread
From: Tabi Timur-B04825 @ 2012-10-15 16:14 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 4:13 AM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> This prepares *of_device_id.data becoming const. Without this change
> the following warning would occur:
>
> arch/powerpc/sysdev/fsl_msi.c: In function 'fsl_of_msi_probe':
> arch/powerpc/sysdev/fsl_msi.c:379:11: error: assignment discards 'const' qualifier from pointer target type [-Werror]
>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 16/25] powerpc/celleb_pci: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (14 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 15/25] powerpc/fsl_msi: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 17/25] watchdog/mpc8xxx: " Uwe Kleine-König
` (10 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
arch/powerpc/platforms/cell/celleb_pci.c: In function 'celleb_setup_phb':
arch/powerpc/platforms/cell/celleb_pci.c:485:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
arch/powerpc/platforms/cell/celleb_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c
index 5822141..abc8af4 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.c
+++ b/arch/powerpc/platforms/cell/celleb_pci.c
@@ -472,7 +472,7 @@ int __init celleb_setup_phb(struct pci_controller *phb)
{
struct device_node *dev = phb->dn;
const struct of_device_id *match;
- struct celleb_phb_spec *phb_spec;
+ const struct celleb_phb_spec *phb_spec;
int rc;
match = of_match_node(celleb_phb_match, dev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 17/25] watchdog/mpc8xxx: add a const qualifier
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (15 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 16/25] powerpc/celleb_pci: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 18/25] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Uwe Kleine-König
` (9 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
This prepares *of_device_id.data becoming const. Without this change
the following warning would occur:
drivers/watchdog/mpc8xxx_wdt.c: In function 'mpc8xxx_wdt_probe':
drivers/watchdog/mpc8xxx_wdt.c:203:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[ukl: split Arnd's patch by driver and add changelog]
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/watchdog/mpc8xxx_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 40f7bf1..e6a038a 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -193,7 +193,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev)
int ret;
const struct of_device_id *match;
struct device_node *np = ofdev->dev.of_node;
- struct mpc8xxx_wdt_type *wdt_type;
+ const struct mpc8xxx_wdt_type *wdt_type;
u32 freq = fsl_get_sys_freq();
bool enabled;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 18/25] can: mpc5xxx_can: make data in mpc5xxx_can_probe const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (16 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 17/25] watchdog/mpc8xxx: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:17 ` Marc Kleine-Budde
2012-07-23 9:13 ` [PATCH 19/25] of: add const to struct *of_device_id.data Uwe Kleine-König
` (8 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/net/can/mscan/mpc5xxx_can.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 5caa572..06adf88 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -251,7 +251,7 @@ static struct of_device_id mpc5xxx_can_table[];
static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
{
const struct of_device_id *match;
- struct mpc5xxx_can_data *data;
+ const struct mpc5xxx_can_data *data;
struct device_node *np = ofdev->dev.of_node;
struct net_device *dev;
struct mscan_priv *priv;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 18/25] can: mpc5xxx_can: make data in mpc5xxx_can_probe const
2012-07-23 9:13 ` [PATCH 18/25] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Uwe Kleine-König
@ 2012-07-23 9:17 ` Marc Kleine-Budde
0 siblings, 0 replies; 48+ messages in thread
From: Marc Kleine-Budde @ 2012-07-23 9:17 UTC (permalink / raw)
To: linux-arm-kernel
On 07/23/2012 11:13 AM, Uwe Kleine-K?nig wrote:
> From: Marc Kleine-Budde <mkl@pengutronix.de>
>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Note: this patch is already upstream in David Miller's net-next tree.
0e84eb0 can: mpc5xxx_can: make data in mpc5xxx_can_probe const
cheers, Marc
> ---
> drivers/net/can/mscan/mpc5xxx_can.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
> index 5caa572..06adf88 100644
> --- a/drivers/net/can/mscan/mpc5xxx_can.c
> +++ b/drivers/net/can/mscan/mpc5xxx_can.c
> @@ -251,7 +251,7 @@ static struct of_device_id mpc5xxx_can_table[];
> static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
> {
> const struct of_device_id *match;
> - struct mpc5xxx_can_data *data;
> + const struct mpc5xxx_can_data *data;
> struct device_node *np = ofdev->dev.of_node;
> struct net_device *dev;
> struct mscan_priv *priv;
>
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120723/63d43310/attachment-0001.sig>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 19/25] of: add const to struct *of_device_id.data
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (17 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 18/25] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 15:32 ` Greg Kroah-Hartman
2012-07-23 9:13 ` [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const Uwe Kleine-König
` (7 subsequent siblings)
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
Drivers should never need to modify the data of a device id. So it can
be const which in turn allows more consts in the driver.
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
include/linux/mod_devicetable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5db9382..98fb3fe 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -224,7 +224,7 @@ struct of_device_id
char type[32];
char compatible[128];
#ifdef __KERNEL__
- void *data;
+ const void *data;
#else
kernel_ulong_t data;
#endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (18 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 19/25] of: add const to struct *of_device_id.data Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-29 16:15 ` Linus Walleij
2012-07-29 21:27 ` Shilimkar, Santosh
2012-07-23 9:13 ` [PATCH 21/25] powerpc/fsl_msi: drop unneeded cast to non-const pointer Uwe Kleine-König
` (6 subsequent siblings)
26 siblings, 2 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/gpio/gpio-omap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 019cb7b..12ab547 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1430,19 +1430,19 @@ static struct omap_gpio_reg_offs omap4_gpio_regs = {
.fallingdetect = OMAP4_GPIO_FALLINGDETECT,
};
-static struct omap_gpio_platform_data omap2_pdata = {
+const static struct omap_gpio_platform_data omap2_pdata = {
.regs = &omap2_gpio_regs,
.bank_width = 32,
.dbck_flag = false,
};
-static struct omap_gpio_platform_data omap3_pdata = {
+const static struct omap_gpio_platform_data omap3_pdata = {
.regs = &omap2_gpio_regs,
.bank_width = 32,
.dbck_flag = true,
};
-static struct omap_gpio_platform_data omap4_pdata = {
+const static struct omap_gpio_platform_data omap4_pdata = {
.regs = &omap4_gpio_regs,
.bank_width = 32,
.dbck_flag = true,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const
2012-07-23 9:13 ` [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const Uwe Kleine-König
@ 2012-07-29 16:15 ` Linus Walleij
2012-07-29 21:27 ` Shilimkar, Santosh
1 sibling, 0 replies; 48+ messages in thread
From: Linus Walleij @ 2012-07-29 16:15 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
FWIW:
Acked-by: Linus Walleij <linus.walleij@linaro.org>
But Kevin+Santosh maintains this driver so you need their ACK on the
patch.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const
2012-07-23 9:13 ` [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const Uwe Kleine-König
2012-07-29 16:15 ` Linus Walleij
@ 2012-07-29 21:27 ` Shilimkar, Santosh
2012-07-30 7:17 ` Uwe Kleine-König
1 sibling, 1 reply; 48+ messages in thread
From: Shilimkar, Santosh @ 2012-07-29 21:27 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
A line of description at least in the change log would be good otherwise
patch is fine to me. Thanks.
Acked-by: Santosh.shilimkar<santosh.shilimkar@ti.com>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const
2012-07-29 21:27 ` Shilimkar, Santosh
@ 2012-07-30 7:17 ` Uwe Kleine-König
2012-07-30 7:20 ` Shilimkar, Santosh
0 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-30 7:17 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Jul 29, 2012 at 11:27:57PM +0200, Shilimkar, Santosh wrote:
> On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-K?nig
> <u.kleine-koenig@pengutronix.de> wrote:
> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > ---
> A line of description at least in the change log would be good otherwise
> patch is fine to me. Thanks.
I added:
Since of_device_id.data is declared as a pointer to const data a
few more consts can be added in this driver.
> Acked-by: Santosh.shilimkar<santosh.shilimkar@ti.com>
I assume your real name is "Santosh Shilimkar" and not
"Santosh.shilimkar", isn't it?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const
2012-07-30 7:17 ` Uwe Kleine-König
@ 2012-07-30 7:20 ` Shilimkar, Santosh
0 siblings, 0 replies; 48+ messages in thread
From: Shilimkar, Santosh @ 2012-07-30 7:20 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 30, 2012 at 9:17 AM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> On Sun, Jul 29, 2012 at 11:27:57PM +0200, Shilimkar, Santosh wrote:
>> On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-K?nig
>> <u.kleine-koenig@pengutronix.de> wrote:
>> > Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>> > ---
>> A line of description at least in the change log would be good otherwise
>> patch is fine to me. Thanks.
> I added:
>
> Since of_device_id.data is declared as a pointer to const data a
> few more consts can be added in this driver.
>
ok.
>> Acked-by: Santosh.shilimkar<santosh.shilimkar@ti.com>
> I assume your real name is "Santosh Shilimkar" and not
> "Santosh.shilimkar", isn't it?
>
Yes :-)
Thanks for correcting it.
Regards
Santosh
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH 21/25] powerpc/fsl_msi: drop unneeded cast to non-const pointer
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (19 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 20/25] gpio/gpio-omap: make platformdata used as *of_device_id.data const Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 22/25] mfd/da9052: make i2c_device_id array const Uwe Kleine-König
` (5 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
This cast is unneeded since *of_device_id.data became const.
[ukl: split Arnd's patch by driver and add changelog]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
arch/powerpc/sysdev/fsl_msi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index a40acd6..51ffafa 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -502,15 +502,15 @@ static const struct fsl_msi_feature vmpic_msi_feature = {
static const struct of_device_id fsl_of_msi_ids[] = {
{
.compatible = "fsl,mpic-msi",
- .data = (void *)&mpic_msi_feature,
+ .data = &mpic_msi_feature,
},
{
.compatible = "fsl,ipic-msi",
- .data = (void *)&ipic_msi_feature,
+ .data = &ipic_msi_feature,
},
{
.compatible = "fsl,vmpic-msi",
- .data = (void *)&vmpic_msi_feature,
+ .data = &vmpic_msi_feature,
},
{}
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 22/25] mfd/da9052: make i2c_device_id array const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (20 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 21/25] powerpc/fsl_msi: drop unneeded cast to non-const pointer Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 23/25] i2c/mpc: make data used as *of_device_id.data const Uwe Kleine-König
` (4 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
This is possible since *of_device_id.data became const. While at it also
drop a cast to const that was never needed.
[ukl: split Arnd's patch by driver and add changlog]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/mfd/da9052-i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c
index 82c9d64..352c58b 100644
--- a/drivers/mfd/da9052-i2c.c
+++ b/drivers/mfd/da9052-i2c.c
@@ -46,7 +46,7 @@ static int da9052_i2c_enable_multiwrite(struct da9052 *da9052)
return 0;
}
-static struct i2c_device_id da9052_i2c_id[] = {
+static const struct i2c_device_id da9052_i2c_id[] = {
{"da9052", DA9052},
{"da9053-aa", DA9053_AA},
{"da9053-ba", DA9053_BA},
@@ -104,7 +104,7 @@ static int __devinit da9052_i2c_probe(struct i2c_client *client,
const struct of_device_id *deviceid;
deviceid = of_match_node(dialog_dt_ids, np);
- id = (const struct i2c_device_id *)deviceid->data;
+ id = deviceid->data;
}
#endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 23/25] i2c/mpc: make data used as *of_device_id.data const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (21 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 22/25] mfd/da9052: make i2c_device_id array const Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 24/25] macintosh/mediabay: " Uwe Kleine-König
` (3 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
[ukl: split Arnd's patch by driver]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/i2c/busses/i2c-mpc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 775062c..57f7703 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -730,24 +730,24 @@ static int mpc_i2c_resume(struct device *dev)
SIMPLE_DEV_PM_OPS(mpc_i2c_pm_ops, mpc_i2c_suspend, mpc_i2c_resume);
#endif
-static struct mpc_i2c_data mpc_i2c_data_512x __devinitdata = {
+static const struct mpc_i2c_data mpc_i2c_data_512x __devinitdata = {
.setup = mpc_i2c_setup_512x,
};
-static struct mpc_i2c_data mpc_i2c_data_52xx __devinitdata = {
+static const struct mpc_i2c_data mpc_i2c_data_52xx __devinitdata = {
.setup = mpc_i2c_setup_52xx,
};
-static struct mpc_i2c_data mpc_i2c_data_8313 __devinitdata = {
+static const struct mpc_i2c_data mpc_i2c_data_8313 __devinitdata = {
.setup = mpc_i2c_setup_8xxx,
};
-static struct mpc_i2c_data mpc_i2c_data_8543 __devinitdata = {
+static const struct mpc_i2c_data mpc_i2c_data_8543 __devinitdata = {
.setup = mpc_i2c_setup_8xxx,
.prescaler = 2,
};
-static struct mpc_i2c_data mpc_i2c_data_8544 __devinitdata = {
+static const struct mpc_i2c_data mpc_i2c_data_8544 __devinitdata = {
.setup = mpc_i2c_setup_8xxx,
.prescaler = 3,
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 24/25] macintosh/mediabay: make data used as *of_device_id.data const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (22 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 23/25] i2c/mpc: make data used as *of_device_id.data const Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:13 ` [PATCH 25/25] can: mpc5xxx_can: " Uwe Kleine-König
` (2 subsequent siblings)
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
[ukl: split Arnd's patch by driver]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/macintosh/mediabay.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 54bf584..3f8d032 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -669,7 +669,7 @@ static int media_bay_resume(struct macio_dev *mdev)
/* Definitions of "ops" structures.
*/
-static struct mb_ops ohare_mb_ops = {
+static const struct mb_ops ohare_mb_ops = {
.name = "Ohare",
.content = ohare_mb_content,
.power = ohare_mb_power,
@@ -678,7 +678,7 @@ static struct mb_ops ohare_mb_ops = {
.un_reset_ide = ohare_mb_un_reset_ide,
};
-static struct mb_ops heathrow_mb_ops = {
+static const struct mb_ops heathrow_mb_ops = {
.name = "Heathrow",
.content = heathrow_mb_content,
.power = heathrow_mb_power,
@@ -687,7 +687,7 @@ static struct mb_ops heathrow_mb_ops = {
.un_reset_ide = heathrow_mb_un_reset_ide,
};
-static struct mb_ops keylargo_mb_ops = {
+static const struct mb_ops keylargo_mb_ops = {
.name = "KeyLargo",
.init = keylargo_mb_init,
.content = keylargo_mb_content,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 25/25] can: mpc5xxx_can: make data used as *of_device_id.data const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (23 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 24/25] macintosh/mediabay: " Uwe Kleine-König
@ 2012-07-23 9:13 ` Uwe Kleine-König
2012-07-23 9:20 ` Marc Kleine-Budde
2012-07-24 15:01 ` [PATCH v2 00/25] make *struct of_device_id.data const Arnd Bergmann
2012-08-05 8:54 ` Uwe Kleine-König
26 siblings, 1 reply; 48+ messages in thread
From: Uwe Kleine-König @ 2012-07-23 9:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
[ukl: split Arnd's patch by driver]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/net/can/mscan/mpc5xxx_can.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 06adf88..8a8df82 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -380,12 +380,12 @@ static int mpc5xxx_can_resume(struct platform_device *ofdev)
}
#endif
-static struct mpc5xxx_can_data __devinitdata mpc5200_can_data = {
+static const struct mpc5xxx_can_data __devinitdata mpc5200_can_data = {
.type = MSCAN_TYPE_MPC5200,
.get_clock = mpc52xx_can_get_clock,
};
-static struct mpc5xxx_can_data __devinitdata mpc5121_can_data = {
+static const struct mpc5xxx_can_data __devinitdata mpc5121_can_data = {
.type = MSCAN_TYPE_MPC5121,
.get_clock = mpc512x_can_get_clock,
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 48+ messages in thread
* [PATCH 25/25] can: mpc5xxx_can: make data used as *of_device_id.data const
2012-07-23 9:13 ` [PATCH 25/25] can: mpc5xxx_can: " Uwe Kleine-König
@ 2012-07-23 9:20 ` Marc Kleine-Budde
0 siblings, 0 replies; 48+ messages in thread
From: Marc Kleine-Budde @ 2012-07-23 9:20 UTC (permalink / raw)
To: linux-arm-kernel
On 07/23/2012 11:13 AM, Uwe Kleine-K?nig wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> [ukl: split Arnd's patch by driver]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Marc
> ---
> drivers/net/can/mscan/mpc5xxx_can.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
> index 06adf88..8a8df82 100644
> --- a/drivers/net/can/mscan/mpc5xxx_can.c
> +++ b/drivers/net/can/mscan/mpc5xxx_can.c
> @@ -380,12 +380,12 @@ static int mpc5xxx_can_resume(struct platform_device *ofdev)
> }
> #endif
>
> -static struct mpc5xxx_can_data __devinitdata mpc5200_can_data = {
> +static const struct mpc5xxx_can_data __devinitdata mpc5200_can_data = {
> .type = MSCAN_TYPE_MPC5200,
> .get_clock = mpc52xx_can_get_clock,
> };
>
> -static struct mpc5xxx_can_data __devinitdata mpc5121_can_data = {
> +static const struct mpc5xxx_can_data __devinitdata mpc5121_can_data = {
> .type = MSCAN_TYPE_MPC5121,
> .get_clock = mpc512x_can_get_clock,
> };
>
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120723/afe9dcd6/attachment-0001.sig>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH v2 00/25] make *struct of_device_id.data const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (24 preceding siblings ...)
2012-07-23 9:13 ` [PATCH 25/25] can: mpc5xxx_can: " Uwe Kleine-König
@ 2012-07-24 15:01 ` Arnd Bergmann
2012-08-05 8:54 ` Uwe Kleine-König
26 siblings, 0 replies; 48+ messages in thread
From: Arnd Bergmann @ 2012-07-24 15:01 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 23 July 2012, Uwe Kleine-K?nig wrote:
> this is the 2nd version of this series whose goal is to make struct
> of_device_id.data const. Conceptually a driver must not modify the data
> contained there so making it const is the right thing.
>
> v1 of this series was sent with Message-id:
> 1342182734-321-1-git-send-email-y. Changes since then are:
> - powerpc fixes
> - several new consts that were found by Arnd that are possible after
> patch 19.
>
> Arnd suggested to take this series via arm-soc late for 3.6 in one go
> because patch 19 depends on the former patches but is a precondition to
> the latter and it fixes a few warnings. So getting it in via the
> respective maintainer trees would need a much bigger coordination
> effort. That means I prefer getting Acks over you taking the patch.
>
> Vinod Koul already took
> dmaengine: at_hdmac: add a few const qualifiers
> that is in next-20120723 as 7fd63ccdad72 now. Vinod, I don't follow your
> pull requests, but assuming you didn't let it already pull for 3.6 I
> suggest you drop it from your queue and I just take your Ack.
>
> This series was build tested for arm (all defconfigs) and powerpc (all
> defconfigs and an allyesconfig) and grep didn't find more issues. As
> before it introduces a warning in drivers/regulator/twl-regulator.c.
> This driver does modify its .of_match_table when a device is bound which
> doesn't fits the concept of independant devices. Arnd noticed another
> new warning in drivers/scsi/qlogicpti.c that isn't that easy to resolve,
> because the pointer to (now) const data is passed as first argument to
> scsi_host_alloc. To fix that properly struct Scsi_Host.hostt needs to
> get a const, too. Alternatively I could introduce a cast removing the
> const, but I don't like that.
>
> This series is also available at:
>
> git://git.pengutronix.de/git/ukl/linux.git ofdeviceiddata
>
> and I will modify it there for the Acks I'm getting.
Pulled the entire series into arm-soc/late/warnings. Thanks everyone
who provided Acks. I'll wait for a few more days to let this sit
in linux-next and if nobody complains, Olof or I will forward it
to Linus.
Arnd
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH v2 00/25] make *struct of_device_id.data const
2012-07-23 9:13 [PATCH v2 00/25] make *struct of_device_id.data const Uwe Kleine-König
` (25 preceding siblings ...)
2012-07-24 15:01 ` [PATCH v2 00/25] make *struct of_device_id.data const Arnd Bergmann
@ 2012-08-05 8:54 ` Uwe Kleine-König
26 siblings, 0 replies; 48+ messages in thread
From: Uwe Kleine-König @ 2012-08-05 8:54 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
> this is the 2nd version of this series whose goal is to make struct
> of_device_id.data const. Conceptually a driver must not modify the data
> contained there so making it const is the right thing.
I rebased my branch at:
git://git.pengutronix.de/git/ukl/linux.git ofdeviceiddata
on top of v3.6-rc1 and retested the arm and powerpc defconfigs and a
powerpc allyesconfig. The result is still the same, i.e. a new warning
in drivers/regulator/twl-regulator.c because the probe routine modifies
the of_match table.
The series was contained in next up to next-20120725 (as commit
100e8f5 (Merge branch 'ofdeviceiddata' of git://git.pengutronix.de/git/ukl/linux into late/warnings)
with an encoding error in the commit log btw). Don't know why it was
dropped from next. (late/warnings didn't show up in next-20120725's
arch/arm/arm-soc-for-next-contents.txt, maybe that's the reason?)
Compared to v2 of the series this drops two patches that made it in
during the v3.6 merge window.
The following changes since commit 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee:
Linux 3.6-rc1 (2012-08-02 16:38:10 -0700)
are available in the git repository at:
git://git.pengutronix.de/git/ukl/linux.git ofdeviceiddata
for you to fetch changes up to e22bd8177efeec9463dc2fc40bd172c717d0bd07:
can: mpc5xxx_can: make data used as *of_device_id.data const (2012-08-03 13:58:41 +0200)
----------------------------------------------------------------
Arnd Bergmann (6):
watchdog/mpc8xxx: add a const qualifier
powerpc/fsl_msi: drop unneeded cast to non-const pointer
mfd/da9052: make i2c_device_id array const
i2c/mpc: make data used as *of_device_id.data const
macintosh/mediabay: make data used as *of_device_id.data const
can: mpc5xxx_can: make data used as *of_device_id.data const
Uwe Kleine-K?nig (17):
spi/imx: make spi_imx_data.devtype_data member point to const data
spi/spi-omap2-mcspi: add a const qualifier
serial/imx: make imx_port.devdata member point to const data
serial/mpc52xx_uart: add a const qualifier
ARM: cache-l2x0: add a const qualifier
misc/atmel_tc: make atmel_tc.tcb_config member point to const data
gpio/gpio-omap.c: add a const qualifier
gpio/mpc8xxx: add a const qualifier
i2c/i2c-omap: add a const qualifier
i2c/mpc: add a const qualifier
mmc/omap_hsmmc: add a const qualifier
macintosh/mediabay: add a const qualifier
powerpc/83xx: add a const qualifier
powerpc/fsl_msi: add a const qualifier
powerpc/celleb_pci: add a const qualifier
of: add const to struct *of_device_id.data
gpio/gpio-omap: make platformdata used as *of_device_id.data const
arch/arm/mm/cache-l2x0.c | 2 +-
arch/powerpc/platforms/83xx/suspend.c | 2 +-
arch/powerpc/platforms/cell/celleb_pci.c | 2 +-
arch/powerpc/sysdev/fsl_msi.c | 8 ++++----
drivers/gpio/gpio-mpc8xxx.c | 2 +-
drivers/gpio/gpio-omap.c | 8 ++++----
drivers/i2c/busses/i2c-mpc.c | 12 ++++++------
drivers/i2c/busses/i2c-omap.c | 3 ++-
drivers/macintosh/mediabay.c | 8 ++++----
drivers/mfd/da9052-i2c.c | 4 ++--
drivers/mmc/host/omap_hsmmc.c | 2 +-
drivers/net/can/mscan/mpc5xxx_can.c | 4 ++--
drivers/spi/spi-imx.c | 2 +-
drivers/spi/spi-omap2-mcspi.c | 2 +-
drivers/tty/serial/imx.c | 2 +-
drivers/tty/serial/mpc52xx_uart.c | 2 +-
drivers/watchdog/mpc8xxx_wdt.c | 2 +-
include/linux/atmel_tc.h | 2 +-
include/linux/mod_devicetable.h | 2 +-
19 files changed, 36 insertions(+), 35 deletions(-)
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 48+ messages in thread