linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:12 Krzysztof Kozlowski
  2023-08-10  9:12 ` [PATCH net-next 2/3] spi: pxa2xx: " Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:12 UTC (permalink / raw)
  To: Sanjay R Mehta, Mark Brown, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel
  Cc: Andi Shyti, Krzysztof Kozlowski

'id' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  spi-sc18is602.c:269:12: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/spi/spi-sc18is602.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sc18is602.c b/drivers/spi/spi-sc18is602.c
index c67a24daaaf9..9f98bf350697 100644
--- a/drivers/spi/spi-sc18is602.c
+++ b/drivers/spi/spi-sc18is602.c
@@ -266,7 +266,7 @@ static int sc18is602_probe(struct i2c_client *client)
 	hw->ctrl = 0xff;
 
 	if (client->dev.of_node)
-		hw->id = (enum chips)of_device_get_match_data(&client->dev);
+		hw->id = (uintptr_t)of_device_get_match_data(&client->dev);
 	else
 		hw->id = id->driver_data;
 
-- 
2.34.1


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

* [PATCH net-next 2/3] spi: pxa2xx: fix Wvoid-pointer-to-enum-cast warning
  2023-08-10  9:12 [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
@ 2023-08-10  9:12 ` Krzysztof Kozlowski
  2023-08-10  9:12 ` [PATCH net-next 3/3] spi: amd: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:12 UTC (permalink / raw)
  To: Sanjay R Mehta, Mark Brown, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel
  Cc: Andi Shyti, Krzysztof Kozlowski

'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  spi-pxa2xx.c:1347:10: error: cast to smaller integer type 'enum pxa_ssp_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/spi/spi-pxa2xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 1bab18a0f262..21f156587669 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1344,7 +1344,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
 
 	match = device_get_match_data(dev);
 	if (match)
-		type = (enum pxa_ssp_type)match;
+		type = (uintptr_t)match;
 	else if (is_lpss_priv) {
 		u32 value;
 
-- 
2.34.1


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

* [PATCH net-next 3/3] spi: amd: fix Wvoid-pointer-to-enum-cast warning
  2023-08-10  9:12 [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
  2023-08-10  9:12 ` [PATCH net-next 2/3] spi: pxa2xx: " Krzysztof Kozlowski
@ 2023-08-10  9:12 ` Krzysztof Kozlowski
  2023-08-10 11:21 ` [PATCH net-next 1/3] spi: sc18is602: " Krzysztof Kozlowski
  2023-08-14 20:58 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:12 UTC (permalink / raw)
  To: Sanjay R Mehta, Mark Brown, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel
  Cc: Andi Shyti, Krzysztof Kozlowski

'version' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  spi-amd.c:401:21: error: cast to smaller integer type 'enum amd_spi_versions' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/spi/spi-amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index b19766571f28..8b3eabb4cb38 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -398,7 +398,7 @@ static int amd_spi_probe(struct platform_device *pdev)
 
 	dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr);
 
-	amd_spi->version = (enum amd_spi_versions) device_get_match_data(dev);
+	amd_spi->version = (uintptr_t) device_get_match_data(dev);
 
 	/* Initialize the spi_master fields */
 	master->bus_num = 0;
-- 
2.34.1


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

* Re: [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning
  2023-08-10  9:12 [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
  2023-08-10  9:12 ` [PATCH net-next 2/3] spi: pxa2xx: " Krzysztof Kozlowski
  2023-08-10  9:12 ` [PATCH net-next 3/3] spi: amd: " Krzysztof Kozlowski
@ 2023-08-10 11:21 ` Krzysztof Kozlowski
  2023-08-14 20:58 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 11:21 UTC (permalink / raw)
  To: Sanjay R Mehta, Mark Brown, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel
  Cc: Andi Shyti

On 10/08/2023 11:12, Krzysztof Kozlowski wrote:
> 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
> 
>   spi-sc18is602.c:269:12: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

The "net-next" patch subject prefix is not correct. My mistake.

Best regards,
Krzysztof


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

* Re: [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning
  2023-08-10  9:12 [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-08-10 11:21 ` [PATCH net-next 1/3] spi: sc18is602: " Krzysztof Kozlowski
@ 2023-08-14 20:58 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-08-14 20:58 UTC (permalink / raw)
  To: Sanjay R Mehta, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	linux-spi, linux-kernel, linux-arm-kernel, Krzysztof Kozlowski
  Cc: Andi Shyti

On Thu, 10 Aug 2023 11:12:45 +0200, Krzysztof Kozlowski wrote:
> 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
> 
>   spi-sc18is602.c:269:12: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> 
> 

Applied to

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

Thanks!

[1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning
      commit: 0f9440a646fd1245a9206f171a4de25e6b092d42
[2/3] spi: pxa2xx: fix Wvoid-pointer-to-enum-cast warning
      commit: 94d6cf7e72a3ef90d7e16d770c3dc1b9cd40d8dd
[3/3] spi: amd: fix Wvoid-pointer-to-enum-cast warning
      commit: 675b8e35b5cbf4aaa1339079f44b88b9f1bb2f1b

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


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

end of thread, other threads:[~2023-08-14 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10  9:12 [PATCH net-next 1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10  9:12 ` [PATCH net-next 2/3] spi: pxa2xx: " Krzysztof Kozlowski
2023-08-10  9:12 ` [PATCH net-next 3/3] spi: amd: " Krzysztof Kozlowski
2023-08-10 11:21 ` [PATCH net-next 1/3] spi: sc18is602: " Krzysztof Kozlowski
2023-08-14 20:58 ` Mark Brown

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).