diff mbox series

[2/2] wifi: ath9k: use unsigned long for activity check timestamp

Message ID 20250115171750.259917-2-dmantipov@yandex.ru
State New
Headers show
Series [1/2] wifi: ath9k: cleanup struct ath_tx_control and ath_tx_prepare() | expand

Commit Message

Dmitry Antipov Jan. 15, 2025, 5:17 p.m. UTC
Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
prefer 'unsigned long' over 'u32' to avoid possible truncation in
'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
compile tested only.

Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath9k/ath9k.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Toke Høiland-Jørgensen Jan. 16, 2025, 11:05 a.m. UTC | #1
Dmitry Antipov <dmantipov@yandex.ru> writes:

> Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
> prefer 'unsigned long' over 'u32' to avoid possible truncation in
> 'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
> compile tested only.
>
> Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Kalle Valo Jan. 16, 2025, 11:20 a.m. UTC | #2
Dmitry Antipov <dmantipov@yandex.ru> writes:

> Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
> prefer 'unsigned long' over 'u32' to avoid possible truncation in
> 'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
> compile tested only.
>
> Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

I don't think this should have a Fixes either. Jeff, can you remove
these during commit?
Jeff Johnson Jan. 16, 2025, 5:41 p.m. UTC | #3
On 1/16/2025 3:20 AM, Kalle Valo wrote:
> Dmitry Antipov <dmantipov@yandex.ru> writes:
> 
>> Since 'rx_active_check_time' of 'struct ath_softc' is in jiffies,
>> prefer 'unsigned long' over 'u32' to avoid possible truncation in
>> 'ath_hw_rx_inactive_check()'. Found with clang's -Wshorten-64-to-32,
>> compile tested only.
>>
>> Fixes: b5f871ab4913 ("wifi: ath9k: Add RX inactivity detection and reset chip when it occurs")
>> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> 
> I don't think this should have a Fixes either. Jeff, can you remove
> these during commit?
> 
ACK
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 65c2250db33d..62442be6dd56 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -1017,7 +1017,7 @@  struct ath_softc {
 
 	u8 gtt_cnt;
 	u32 intrstatus;
-	u32 rx_active_check_time;
+	unsigned long rx_active_check_time;
 	u32 rx_active_count;
 	u16 ps_flags; /* PS_* */
 	bool ps_enabled;