mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
|
From 6763ef191d672ff3c2db0622652d49b0c0a60c4a Mon Sep 17 00:00:00 2001
|
||
|
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||
|
Date: Thu, 10 Aug 2023 11:12:23 +0200
|
||
|
Subject: [PATCH] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
|
||
|
|
||
|
'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>
|
||
|
Link: https://lore.kernel.org/r/20230810091224.70088-1-krzysztof.kozlowski@linaro.org
|
||
|
---
|
||
|
drivers/net/wireless/ath/ath11k/ahb.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||
|
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||
|
@@ -1096,7 +1096,7 @@ static int ath11k_ahb_probe(struct platf
|
||
|
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:
|