All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:59 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:59 UTC (permalink / raw)
  To: Vinod Koul, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, dmaengine, linux-kernel, linux-arm-kernel,
	linux-arm-msm
  Cc: Andi Shyti, Krzysztof Kozlowski

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

  hidma.c:748:8: error: cast to smaller integer type 'enum hidma_cap' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

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

diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index b5e3633e6a5e..499df3c83976 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -745,7 +745,7 @@ static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
 {
 	enum hidma_cap cap;
 
-	cap = (enum hidma_cap) device_get_match_data(dev);
+	cap = (uintptr_t) device_get_match_data(dev);
 	return cap ? ((cap & test_cap) > 0) : 0;
 }
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:59 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:59 UTC (permalink / raw)
  To: Vinod Koul, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, dmaengine, linux-kernel, linux-arm-kernel,
	linux-arm-msm
  Cc: Andi Shyti, Krzysztof Kozlowski

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

  hidma.c:748:8: error: cast to smaller integer type 'enum hidma_cap' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

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

diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index b5e3633e6a5e..499df3c83976 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -745,7 +745,7 @@ static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
 {
 	enum hidma_cap cap;
 
-	cap = (enum hidma_cap) device_get_match_data(dev);
+	cap = (uintptr_t) device_get_match_data(dev);
 	return cap ? ((cap & test_cap) > 0) : 0;
 }
 
-- 
2.34.1


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

* [PATCH 2/2] dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning
  2023-08-10  9:59 ` Krzysztof Kozlowski
@ 2023-08-10 10:00   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 10:00 UTC (permalink / raw)
  To: Vinod Koul, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, dmaengine, linux-kernel, linux-arm-kernel,
	linux-arm-msm
  Cc: Andi Shyti, Krzysztof Kozlowski

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

  mmp_tdma.c:649:10: error: cast to smaller integer type 'enum mmp_tdma_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

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

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index d49fa6bc6775..52b726fc5f04 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -646,7 +646,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
 
 	of_id = of_match_device(mmp_tdma_dt_ids, &pdev->dev);
 	if (of_id)
-		type = (enum mmp_tdma_type) of_id->data;
+		type = (uintptr_t) of_id->data;
 	else
 		type = platform_get_device_id(pdev)->driver_data;
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10 10:00   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 10:00 UTC (permalink / raw)
  To: Vinod Koul, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, dmaengine, linux-kernel, linux-arm-kernel,
	linux-arm-msm
  Cc: Andi Shyti, Krzysztof Kozlowski

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

  mmp_tdma.c:649:10: error: cast to smaller integer type 'enum mmp_tdma_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

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

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index d49fa6bc6775..52b726fc5f04 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -646,7 +646,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
 
 	of_id = of_match_device(mmp_tdma_dt_ids, &pdev->dev);
 	if (of_id)
-		type = (enum mmp_tdma_type) of_id->data;
+		type = (uintptr_t) of_id->data;
 	else
 		type = platform_get_device_id(pdev)->driver_data;
 
-- 
2.34.1


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

* Re: [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
  2023-08-10  9:59 ` Krzysztof Kozlowski
@ 2023-10-04 14:29   ` Vinod Koul
  -1 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2023-10-04 14:29 UTC (permalink / raw)
  To: Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
	Krzysztof Kozlowski
  Cc: Andi Shyti


On Thu, 10 Aug 2023 11:59:59 +0200, Krzysztof Kozlowski wrote:
> 'cap' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
> 
>   hidma.c:748:8: error: cast to smaller integer type 'enum hidma_cap' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> 
> 

Applied, thanks!

[1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
      commit: 9a2136b60cc1a5ba9c5878f08a41f41271c4cd17
[2/2] dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning
      commit: 094f9ee5fb547c31486801a017a07d7f1c1e7881

Best regards,
-- 
~Vinod



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

* Re: [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
@ 2023-10-04 14:29   ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2023-10-04 14:29 UTC (permalink / raw)
  To: Sinan Kaya, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
	Krzysztof Kozlowski
  Cc: Andi Shyti


On Thu, 10 Aug 2023 11:59:59 +0200, Krzysztof Kozlowski wrote:
> 'cap' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
> 
>   hidma.c:748:8: error: cast to smaller integer type 'enum hidma_cap' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> 
> 

Applied, thanks!

[1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
      commit: 9a2136b60cc1a5ba9c5878f08a41f41271c4cd17
[2/2] dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning
      commit: 094f9ee5fb547c31486801a017a07d7f1c1e7881

Best regards,
-- 
~Vinod



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-10-04 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10  9:59 [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10  9:59 ` Krzysztof Kozlowski
2023-08-10 10:00 ` [PATCH 2/2] dmaengine: mmp: " Krzysztof Kozlowski
2023-08-10 10:00   ` Krzysztof Kozlowski
2023-10-04 14:29 ` [PATCH 1/2] dmaengine: qcom: " Vinod Koul
2023-10-04 14:29   ` Vinod Koul

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.