mbox series

[0/6] spi: struct spi_device constification

Message ID cover.1678704562.git.geert+renesas@glider.be (mailing list archive)
Headers show
Series spi: struct spi_device constification | expand

Message

Geert Uytterhoeven March 13, 2023, 10:58 a.m. UTC
Hi all,

After noticing new cases of casting away constness, I went over all
spi_get_*() functions and their callers, and made the following changes:
  1. Make all pointer parameters const where possible,
  2. Remove unneeded casts, some not even related to constness.

Patches 1-5 do not have any dependencies.
Patch 6 depends on patch 5 (and current spi/for-next).

Thanks for your comments!

Geert Uytterhoeven (6):
  mfd: rsmu_spi: Remove unneeded casts of void *
  spi: fsl-dspi: Remove unneeded cast to same type
  spi: Constify spi_get_ctldata()'s spi parameter
  spi: Constify spi_get_drvdata()'s spi parameter
  spi: Constify spi parameters of chip select APIs
  spi: sh-msiof: Remove casts to drop constness

 drivers/mfd/rsmu_spi.c     | 4 ++--
 drivers/spi/spi-fsl-dspi.c | 2 +-
 drivers/spi/spi-sh-msiof.c | 4 ++--
 include/linux/spi/spi.h    | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

Comments

Mark Brown March 13, 2023, 6:20 p.m. UTC | #1
On Mon, 13 Mar 2023 11:58:32 +0100, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> After noticing new cases of casting away constness, I went over all
> spi_get_*() functions and their callers, and made the following changes:
>   1. Make all pointer parameters const where possible,
>   2. Remove unneeded casts, some not even related to constness.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[2/6] spi: fsl-dspi: Remove unneeded cast to same type
      commit: 9c8400e3795decefe6390646ece820a310b37b79
[3/6] spi: Constify spi_get_ctldata()'s spi parameter
      commit: cc4b15670340315fb0b25d886c06bffb5f128f02
[4/6] spi: Constify spi_get_drvdata()'s spi parameter
      commit: 38dca04d659a422d842f7edcecd32253c7a6fb5e
[5/6] spi: Constify spi parameters of chip select APIs
      commit: d2f19eec510424caa55ea949f016ddabe2d8173a
[6/6] spi: sh-msiof: Remove casts to drop constness
      commit: 7859ad5a401b73bf2ddfa274950b5722492c3150

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark