All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] make struct of_device_id.data const
@ 2012-07-13 12:32 y at pengutronix.de
  2012-07-13 12:32 ` [PATCH 0/9] " y at pengutronix.de
                   ` (32 more replies)
  0 siblings, 33 replies; 56+ messages in thread
From: y at pengutronix.de @ 2012-07-13 12:32 UTC (permalink / raw)
  To: linux-arm-kernel

From: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Hello,

this series' 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.

This change might introduce warnings because drivers don't use const to
access the data pointed to by of_device_id.data. In most cases the fix
is to add some consts.

This series (apart from adding this const in patch 10) fixes all drivers
covered by all arm defconfigs (based on v3.5-rc6).

There is one exception though:
drivers/regulator/twl-regulator.c (build in omap2plus_defconfig) now
issues:

	drivers/regulator/twl-regulator.c: In function 'twlreg_probe':
	drivers/regulator/twl-regulator.c:1181: warning: assignment discards qualifiers from pointer target type
	drivers/regulator/twl-regulator.c:1190: warning: assignment discards qualifiers from pointer target type

that is because this driver really modifies his .of_match_table in the
precence of a traditionally probed device.
I didn't check deeply, but probably the easiest fix is to remove
traditional platform support. Don't know if omap is ready for that
though.

And also patch 11 adds some more consts that are possible now after
patch 10.

This series is available in my git tree at:

	git://git.pengutronix.de/git/ukl/linux.git ofdeviceiddata

Best regards
Uwe

Uwe Kleine-K?nig (11):
  spi/imx: make spi_imx_data.devtype_data member point to const data
  serial/imx: make imx_port.devdata member point to const data
  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
  i2c/i2c-omap: add a const qualifier
  dmaengine: at_hdmac: add a few const qualifiers
  spi/spi-omap2-mcspi: add a const qualifier
  mmc/omap_hsmmc: 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 +-
 drivers/dma/at_hdmac.c          |    4 ++--
 drivers/gpio/gpio-omap.c        |    8 ++++----
 drivers/i2c/busses/i2c-omap.c   |    3 ++-
 drivers/mmc/host/omap_hsmmc.c   |    2 +-
 drivers/spi/spi-imx.c           |    2 +-
 drivers/spi/spi-omap2-mcspi.c   |    2 +-
 drivers/tty/serial/imx.c        |    2 +-
 include/linux/atmel_tc.h        |    2 +-
 include/linux/mod_devicetable.h |    2 +-
 10 files changed, 15 insertions(+), 14 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2012-07-16  6:38 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13 12:32 [PATCH 00/11] make struct of_device_id.data const y at pengutronix.de
2012-07-13 12:32 ` [PATCH 0/9] " y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 01/11] spi/imx: make spi_imx_data.devtype_data member point to const data y
2012-07-13 12:32 ` y
2012-07-13 12:32 ` y at pengutronix.de
2012-07-13 12:32 ` [PATCH 02/11] serial/imx: make imx_port.devdata " y
2012-07-13 12:32 ` y
2012-07-13 12:32 ` y at pengutronix.de
2012-07-13 12:32 ` [PATCH 03/11] ARM: cache-l2x0: add a const qualifier y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 04/11] misc/atmel_tc: make atmel_tc.tcb_config member point to const data y
2012-07-13 12:32 ` y at pengutronix.de
2012-07-13 13:40   ` Nicolas Ferre
2012-07-13 13:40     ` Nicolas Ferre
2012-07-13 12:32 ` [PATCH 05/11] gpio/gpio-omap.c: add a const qualifier y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 06/11] i2c/i2c-omap: " y
2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
2012-07-13 12:32 ` y at pengutronix.de
2012-07-13 12:32 ` [PATCH 07/11] dmaengine: at_hdmac: add a few const qualifiers y at pengutronix.de
2012-07-13 13:54   ` Nicolas Ferre
2012-07-13 13:54     ` Nicolas Ferre
2012-07-16  6:38   ` Vinod Koul
2012-07-16  6:38     ` Vinod Koul
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 08/11] spi/spi-omap2-mcspi: add a const qualifier y
2012-07-13 12:32 ` y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 09/11] mmc/omap_hsmmc: " y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 10/11] of: add const to struct of_device_id.data y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:32 ` [PATCH 11/11] gpio/gpio-omap: make platformdata used as of_device_id.data const y at pengutronix.de
2012-07-13 12:32 ` y
2012-07-13 12:39 ` [PATCH 00/11] make struct " Uwe Kleine-König
2012-07-13 12:39   ` Uwe Kleine-König
2012-07-13 12:41 ` Rob Herring
2012-07-13 12:41   ` Rob Herring
     [not found]   ` <5000175E.4070702-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-07-13 13:46     ` Uwe Kleine-König
2012-07-13 13:46       ` Uwe Kleine-König
     [not found]       ` <20120713134638.GH592-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-13 16:24         ` Arnd Bergmann
2012-07-13 16:24           ` Arnd Bergmann
     [not found]           ` <201207131624.27266.arnd-r2nGTMty4D4@public.gmane.org>
2012-07-13 17:49             ` Uwe Kleine-König
2012-07-13 17:49               ` Uwe Kleine-König
     [not found]               ` <20120713174935.GN592-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-13 18:56                 ` Arnd Bergmann
2012-07-13 18:56                   ` Arnd Bergmann
2012-07-13 19:48                 ` Rob Herring
2012-07-13 19:48                   ` Rob Herring
2012-07-13 19:36     ` Grant Likely
2012-07-13 19:36       ` Grant Likely
     [not found]       ` <CACxGe6tXvz+rt2yrHHaD=j94-=JQEh06sHW0FWGiHb2=9GS2pA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-14 18:31         ` Uwe Kleine-König
2012-07-14 18:31           ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.