* [PATCH net-next 2/2] wifi: ath10k: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:12 [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
@ 2023-08-10 9:12 ` Krzysztof Kozlowski
2023-08-10 13:36 ` Jeff Johnson
2023-08-10 13:36 ` [PATCH net-next 1/2] wifi: ath11k: " Jeff Johnson
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 9:12 UTC (permalink / raw)
To: Kalle Valo, Jeff Johnson, ath10k, linux-wireless, linux-kernel, ath11k
Cc: Andi Shyti, Krzysztof Kozlowski
'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
ath10k/ahb.c:736:11: error: cast to smaller integer type 'enum ath10k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/net/wireless/ath/ath10k/ahb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
index 4a006fb4d424..95bcf54ddc3f 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -733,7 +733,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
int ret;
struct ath10k_bus_params bus_params = {};
- hw_rev = (enum ath10k_hw_rev)of_device_get_match_data(&pdev->dev);
+ hw_rev = (uintptr_t)of_device_get_match_data(&pdev->dev);
if (!hw_rev) {
dev_err(&pdev->dev, "OF data missing\n");
return -EINVAL;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] wifi: ath10k: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:12 ` [PATCH net-next 2/2] wifi: ath10k: " Krzysztof Kozlowski
@ 2023-08-10 13:36 ` Jeff Johnson
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Johnson @ 2023-08-10 13:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Kalle Valo, ath10k, linux-wireless,
linux-kernel, ath11k
Cc: Andi Shyti
On 8/10/2023 2:12 AM, Krzysztof Kozlowski wrote:
> 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> ath10k/ahb.c:736:11: error: cast to smaller integer type 'enum ath10k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> ---
> drivers/net/wireless/ath/ath10k/ahb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
> index 4a006fb4d424..95bcf54ddc3f 100644
> --- a/drivers/net/wireless/ath/ath10k/ahb.c
> +++ b/drivers/net/wireless/ath/ath10k/ahb.c
> @@ -733,7 +733,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
> int ret;
> struct ath10k_bus_params bus_params = {};
>
> - hw_rev = (enum ath10k_hw_rev)of_device_get_match_data(&pdev->dev);
> + hw_rev = (uintptr_t)of_device_get_match_data(&pdev->dev);
> if (!hw_rev) {
> dev_err(&pdev->dev, "OF data missing\n");
> return -EINVAL;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:12 [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10 9:12 ` [PATCH net-next 2/2] wifi: ath10k: " Krzysztof Kozlowski
@ 2023-08-10 13:36 ` Jeff Johnson
2023-08-22 12:58 ` Kalle Valo
2023-08-23 14:10 ` Kalle Valo
3 siblings, 0 replies; 6+ messages in thread
From: Jeff Johnson @ 2023-08-10 13:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Kalle Valo, ath10k, linux-wireless,
linux-kernel, ath11k
Cc: Andi Shyti
On 8/10/2023 2:12 AM, Krzysztof Kozlowski wrote:
> 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> ---
> drivers/net/wireless/ath/ath11k/ahb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index 139da578831a..ada4d68c7421 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -1121,7 +1121,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
> return -EINVAL;
> }
>
> - hw_rev = (enum ath11k_hw_rev)of_id->data;
> + hw_rev = (uintptr_t)of_id->data;
>
> switch (hw_rev) {
> case ATH11K_HW_IPQ8074:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:12 [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10 9:12 ` [PATCH net-next 2/2] wifi: ath10k: " Krzysztof Kozlowski
2023-08-10 13:36 ` [PATCH net-next 1/2] wifi: ath11k: " Jeff Johnson
@ 2023-08-22 12:58 ` Kalle Valo
2023-08-23 14:10 ` Kalle Valo
3 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2023-08-22 12:58 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jeff Johnson, ath10k, linux-wireless, linux-kernel, ath11k, Andi Shyti
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes:
> 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
ath11k patches go to my ath.git tree, not net-next. But no need to
resend because of this.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:12 [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-08-22 12:58 ` Kalle Valo
@ 2023-08-23 14:10 ` Kalle Valo
3 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2023-08-23 14:10 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jeff Johnson, ath10k, linux-wireless, linux-kernel, ath11k,
Andi Shyti, Krzysztof Kozlowski
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
2 patches applied to ath-next branch of ath.git, thanks.
6763ef191d67 wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
de43b07db2a1 wifi: ath10k: fix Wvoid-pointer-to-enum-cast warning
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230810091224.70088-1-krzysztof.kozlowski@linaro.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread