f42b021375b654d9cc9ce6bf07cd704f401c30c1
[openwrt/staging/stintel.git] /
1 From 6763ef191d672ff3c2db0622652d49b0c0a60c4a Mon Sep 17 00:00:00 2001
2 From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
3 Date: Thu, 10 Aug 2023 11:12:23 +0200
4 Subject: [PATCH] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
5
6 'hw_rev' is an enum, thus cast of pointer on 64-bit compile test with W=1
7 causes:
8
9 h11k/ahb.c:1124:11: error: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
10
11 Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
12 Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
13 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
14 Link: https://lore.kernel.org/r/20230810091224.70088-1-krzysztof.kozlowski@linaro.org
15 ---
16 drivers/net/wireless/ath/ath11k/ahb.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/drivers/net/wireless/ath/ath11k/ahb.c
20 +++ b/drivers/net/wireless/ath/ath11k/ahb.c
21 @@ -1096,7 +1096,7 @@ static int ath11k_ahb_probe(struct platf
22 return -EINVAL;
23 }
24
25 - hw_rev = (enum ath11k_hw_rev)of_id->data;
26 + hw_rev = (uintptr_t)of_id->data;
27
28 switch (hw_rev) {
29 case ATH11K_HW_IPQ8074: