* [bug report] wifi: ath12k: unnecessary div_u64()
@ 2023-02-16 14:00 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2023-02-16 14:00 UTC (permalink / raw)
To: quic_kvalo; +Cc: ath12k
Hello Kalle Valo,
The patch d889913205cf: "wifi: ath12k: driver for Qualcomm Wi-Fi 7
devices" from Nov 28, 2022, leads to the following Smatch static
checker warning:
drivers/net/wireless/ath/ath12k/wmi.c:5857 ath12k_chan_info_event() warn: div_u64() expects 'ullong' got 'uint'
drivers/net/wireless/ath/ath12k/wmi.c:5858 ath12k_chan_info_event() warn: div_u64() expects 'ullong' got 'uint'
drivers/net/wireless/ath/ath12k/wmi.c
5851 if (ch_info_ev.cmd_flags == WMI_CHAN_INFO_START_RESP) {
5852 survey = &ar->survey[idx];
5853 memset(survey, 0, sizeof(*survey));
5854 survey->noise = le32_to_cpu(ch_info_ev.noise_floor);
5855 survey->filled = SURVEY_INFO_NOISE_DBM | SURVEY_INFO_TIME |
5856 SURVEY_INFO_TIME_BUSY;
--> 5857 survey->time = div_u64(le32_to_cpu(ch_info_ev.cycle_count), cc_freq_hz);
5858 survey->time_busy = div_u64(le32_to_cpu(ch_info_ev.rx_clear_count),
5859 cc_freq_hz);
What's the point of using div_u64() on u32 variables?
5860 }
5861 exit:
5862 spin_unlock_bh(&ar->data_lock);
5863 rcu_read_unlock();
5864 }
regards,
dan carpenter
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-16 14:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 14:00 [bug report] wifi: ath12k: unnecessary div_u64() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox