linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] wifi: ath11k: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:12 Krzysztof Kozlowski
  2023-08-10  9:12 ` [PATCH net-next 2/2] wifi: ath10k: " Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 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:

  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>
---
 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:
-- 
2.34.1


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

end of thread, other threads:[~2023-08-23 14:10 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: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-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

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