All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Mark Brown <broonie@kernel.org>, Mark Brown <broonie@kernel.org>,
	kernel-janitors@vger.kernel.org, Barry Song <baohua@kernel.org>,
	linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Applied "spi: sirf: account for const type of of_device_id.data" to the spi tree
Date: Wed, 03 Jan 2018 12:15:23 +0000	[thread overview]
Message-ID: <E1eWhx5-0002II-8d@debutante> (raw)
In-Reply-To: <1514899688-27844-4-git-send-email-Julia.Lawall@lip6.fr>

The patch

   spi: sirf: account for const type of of_device_id.data

has been applied to the spi tree at

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

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

>From 9e327ce71f3894e7e6b57f5c15a0dfa5be79f44e Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Tue, 2 Jan 2018 14:27:59 +0100
Subject: [PATCH] spi: sirf: account for const type of of_device_id.data

This driver creates various const structures that it stores in the
data field of an of_device_id array.

Adding const to the declaration of the location that receives the
const value from the data field ensures that the compiler will
continue to check that the value is not modified.  Furthermore, the
const-discarding cast on the extraction from the data field is no
longer needed.

Done using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-sirf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index bbb1a275f718..f009d76f96b1 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -1072,7 +1072,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	struct sirfsoc_spi *sspi;
 	struct spi_master *master;
 	struct resource *mem_res;
-	struct sirf_spi_comp_data *spi_comp_data;
+	const struct sirf_spi_comp_data *spi_comp_data;
 	int irq;
 	int ret;
 	const struct of_device_id *match;
@@ -1092,7 +1092,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, master);
 	sspi = spi_master_get_devdata(master);
 	sspi->fifo_full_offset = ilog2(sspi->fifo_size);
-	spi_comp_data = (struct sirf_spi_comp_data *)match->data;
+	spi_comp_data = match->data;
 	sspi->regs = spi_comp_data->regs;
 	sspi->type = spi_comp_data->type;
 	sspi->fifo_level_chk_mask = (sspi->fifo_size / 4) - 1;
-- 
2.15.1

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Applied "spi: sirf: account for const type of of_device_id.data" to the spi tree
Date: Wed, 03 Jan 2018 12:15:23 +0000	[thread overview]
Message-ID: <E1eWhx5-0002II-8d@debutante> (raw)
In-Reply-To: <1514899688-27844-4-git-send-email-Julia.Lawall@lip6.fr>

The patch

   spi: sirf: account for const type of of_device_id.data

has been applied to the spi tree at

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

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

From 9e327ce71f3894e7e6b57f5c15a0dfa5be79f44e Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Tue, 2 Jan 2018 14:27:59 +0100
Subject: [PATCH] spi: sirf: account for const type of of_device_id.data

This driver creates various const structures that it stores in the
data field of an of_device_id array.

Adding const to the declaration of the location that receives the
const value from the data field ensures that the compiler will
continue to check that the value is not modified.  Furthermore, the
const-discarding cast on the extraction from the data field is no
longer needed.

Done using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-sirf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index bbb1a275f718..f009d76f96b1 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -1072,7 +1072,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	struct sirfsoc_spi *sspi;
 	struct spi_master *master;
 	struct resource *mem_res;
-	struct sirf_spi_comp_data *spi_comp_data;
+	const struct sirf_spi_comp_data *spi_comp_data;
 	int irq;
 	int ret;
 	const struct of_device_id *match;
@@ -1092,7 +1092,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, master);
 	sspi = spi_master_get_devdata(master);
 	sspi->fifo_full_offset = ilog2(sspi->fifo_size);
-	spi_comp_data = (struct sirf_spi_comp_data *)match->data;
+	spi_comp_data = match->data;
 	sspi->regs = spi_comp_data->regs;
 	sspi->type = spi_comp_data->type;
 	sspi->fifo_level_chk_mask = (sspi->fifo_size / 4) - 1;
-- 
2.15.1


WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: Applied "spi: sirf: account for const type of of_device_id.data" to the spi tree
Date: Wed, 03 Jan 2018 12:15:23 +0000	[thread overview]
Message-ID: <E1eWhx5-0002II-8d@debutante> (raw)
In-Reply-To: <1514899688-27844-4-git-send-email-Julia.Lawall@lip6.fr>

The patch

   spi: sirf: account for const type of of_device_id.data

has been applied to the spi tree at

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

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

>From 9e327ce71f3894e7e6b57f5c15a0dfa5be79f44e Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Tue, 2 Jan 2018 14:27:59 +0100
Subject: [PATCH] spi: sirf: account for const type of of_device_id.data

This driver creates various const structures that it stores in the
data field of an of_device_id array.

Adding const to the declaration of the location that receives the
const value from the data field ensures that the compiler will
continue to check that the value is not modified.  Furthermore, the
const-discarding cast on the extraction from the data field is no
longer needed.

Done using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-sirf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index bbb1a275f718..f009d76f96b1 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -1072,7 +1072,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	struct sirfsoc_spi *sspi;
 	struct spi_master *master;
 	struct resource *mem_res;
-	struct sirf_spi_comp_data *spi_comp_data;
+	const struct sirf_spi_comp_data *spi_comp_data;
 	int irq;
 	int ret;
 	const struct of_device_id *match;
@@ -1092,7 +1092,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, master);
 	sspi = spi_master_get_devdata(master);
 	sspi->fifo_full_offset = ilog2(sspi->fifo_size);
-	spi_comp_data = (struct sirf_spi_comp_data *)match->data;
+	spi_comp_data = match->data;
 	sspi->regs = spi_comp_data->regs;
 	sspi->type = spi_comp_data->type;
 	sspi->fifo_level_chk_mask = (sspi->fifo_size / 4) - 1;
-- 
2.15.1

  reply	other threads:[~2018-01-03 12:15 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 13:27 [PATCH 00/12] account for const type of of_device_id.data Julia Lawall
2018-01-02 13:27 ` Julia Lawall
2018-01-02 13:27 ` Julia Lawall
2018-01-02 13:27 ` Julia Lawall
2018-01-02 13:27 ` [PATCH 01/12] PM / AVS: rockchip-io: " Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-02 13:27 ` [PATCH 02/12] pinctrl: at91-pio4: " Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-03  7:58   ` Linus Walleij
2018-01-03  7:58     ` Linus Walleij
2018-01-03  7:58     ` Linus Walleij
2018-01-02 13:27 ` [PATCH 03/12] spi: sirf: " Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-02 13:27   ` Julia Lawall
2018-01-03 12:15   ` Mark Brown [this message]
2018-01-03 12:15     ` Applied "spi: sirf: account for const type of of_device_id.data" to the spi tree Mark Brown
2018-01-03 12:15     ` Mark Brown
2018-01-03 12:22   ` Mark Brown
2018-01-03 12:22     ` Mark Brown
2018-01-03 12:22     ` Mark Brown
2018-01-02 13:28 ` [PATCH 04/12] PCI: qcom: account for const type of of_device_id.data Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-03 12:22   ` Lorenzo Pieralisi
2018-01-03 12:22     ` Lorenzo Pieralisi
2018-01-03 12:38     ` Stanimir Varbanov
2018-01-03 12:38       ` Stanimir Varbanov
2018-01-03 12:38     ` Julia Lawall
2018-01-03 12:38       ` Julia Lawall
2018-01-03 18:23       ` Lorenzo Pieralisi
2018-01-03 18:23         ` Lorenzo Pieralisi
2018-01-02 13:28 ` [PATCH 05/12] pinctrl: armada-37xx: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-02 15:36   ` Gregory CLEMENT
2018-01-02 15:36     ` Gregory CLEMENT
2018-01-02 15:36     ` Gregory CLEMENT
2018-01-03  8:03   ` Linus Walleij
2018-01-03  8:03     ` Linus Walleij
2018-01-03  8:03     ` Linus Walleij
2018-01-02 13:28 ` [PATCH 06/12] power: supply: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-09 16:22   ` Sebastian Reichel
2018-01-09 16:22     ` Sebastian Reichel
2018-01-02 13:28 ` [PATCH 07/12] i2c: rk3x: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-15 18:24   ` Wolfram Sang
2018-01-15 18:24     ` Wolfram Sang
2018-01-15 18:24     ` Wolfram Sang
2018-01-17 11:00     ` Heiko Stuebner
2018-01-17 11:00       ` Heiko Stuebner
2018-01-17 11:00       ` Heiko Stuebner
2018-01-17 23:12   ` Wolfram Sang
2018-01-17 23:12     ` Wolfram Sang
2018-01-17 23:12     ` Wolfram Sang
2018-01-02 13:28 ` [PATCH 08/12] pinctrl: axp209: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-03  7:59   ` Linus Walleij
2018-01-03  7:59     ` Linus Walleij
2018-01-02 13:28 ` [PATCH 09/12] mtd: fsl-quadspi: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-07 18:08   ` Cyrille Pitchen
2018-01-07 18:08     ` Cyrille Pitchen
2018-01-02 13:28 ` [PATCH 10/12] spi: spi-fsl-dspi: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-03 12:22   ` Applied "spi: spi-fsl-dspi: account for const type of of_device_id.data" to the spi tree Mark Brown
2018-01-03 12:22     ` Mark Brown
2018-01-03 12:22     ` Mark Brown
2018-01-02 13:28 ` [PATCH 11/12] iio: common: ssp_sensors: account for const type of of_device_id.data Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-06 12:23   ` Jonathan Cameron
2018-01-06 12:23     ` Jonathan Cameron
2018-01-02 13:28 ` [PATCH 12/12] power: reset: " Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-02 13:28   ` Julia Lawall
2018-01-05 13:24   ` Alexandre Belloni
2018-01-05 13:24     ` Alexandre Belloni
2018-01-05 13:24     ` Alexandre Belloni
2018-01-09 16:22   ` Sebastian Reichel
2018-01-09 16:22     ` Sebastian Reichel
2018-01-09 16:22     ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1eWhx5-0002II-8d@debutante \
    --to=broonie@kernel.org \
    --cc=Julia.Lawall@lip6.fr \
    --cc=baohua@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.