* [PATCH] ath11k: Fix uninitialized symbol 'rx_buf_sz'
@ 2022-01-19 15:23 Anilkumar Kolli
2022-01-31 14:00 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Anilkumar Kolli @ 2022-01-19 15:23 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, Anilkumar Kolli
Add missing else statement in ath11k_dp_rx_process_mon_status()
to fix below smatch warnings,
drivers/net/wireless/ath/ath11k/dp_rx.c:3105
ath11k_dp_rx_process_mon_status()
error: uninitialized symbol 'rx_buf_sz'.
Fixes: ab18e3bc1c13 ("ath11k: Fix pktlog lite rx events")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anilkumar Kolli <quic_akolli@quicinc.com>
---
drivers/net/wireless/ath/ath11k/debugfs.h | 1 +
drivers/net/wireless/ath/ath11k/dp_rx.c | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/debugfs.h b/drivers/net/wireless/ath/ath11k/debugfs.h
index 4c0740394c95..71525d786bdf 100644
--- a/drivers/net/wireless/ath/ath11k/debugfs.h
+++ b/drivers/net/wireless/ath/ath11k/debugfs.h
@@ -88,6 +88,7 @@ enum ath11k_pktlog_mode {
};
enum ath11k_pktlog_enum {
+ ATH11K_PKTLOG_TYPE_INVALID = 0,
ATH11K_PKTLOG_TYPE_TX_CTRL = 1,
ATH11K_PKTLOG_TYPE_TX_STAT = 2,
ATH11K_PKTLOG_TYPE_TX_MSDU_ID = 3,
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 89b77b94bb20..99dc9b5bbf4b 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -5054,7 +5054,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
struct ath11k_sta *arsta;
int num_buffs_reaped = 0;
u32 rx_buf_sz;
- u16 log_type = 0;
+ u16 log_type;
struct ath11k_mon_data *pmon = (struct ath11k_mon_data *)&ar->dp.mon_data;
struct ath11k_pdev_mon_stats *rx_mon_stats = &pmon->rx_mon_stats;
struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
@@ -5076,9 +5076,12 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
} else if (ath11k_debugfs_is_pktlog_rx_stats_enabled(ar)) {
log_type = ATH11K_PKTLOG_TYPE_RX_STATBUF;
rx_buf_sz = DP_RX_BUFFER_SIZE;
+ } else {
+ log_type = ATH11K_PKTLOG_TYPE_INVALID;
+ rx_buf_sz = 0;
}
- if (log_type)
+ if (log_type != ATH11K_PKTLOG_TYPE_INVALID)
trace_ath11k_htt_rxdesc(ar, skb->data, log_type, rx_buf_sz);
hal_status = ath11k_hal_rx_parse_mon_status(ab, ppdu_info, skb);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: Fix uninitialized symbol 'rx_buf_sz'
2022-01-19 15:23 [PATCH] ath11k: Fix uninitialized symbol 'rx_buf_sz' Anilkumar Kolli
@ 2022-01-31 14:00 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-01-31 14:00 UTC (permalink / raw)
To: Anilkumar Kolli; +Cc: ath11k, linux-wireless, Anilkumar Kolli
Anilkumar Kolli <quic_akolli@quicinc.com> wrote:
> Add missing else statement in ath11k_dp_rx_process_mon_status()
> to fix below smatch warnings,
> drivers/net/wireless/ath/ath11k/dp_rx.c:3105
> ath11k_dp_rx_process_mon_status()
> error: uninitialized symbol 'rx_buf_sz'.
>
> Fixes: ab18e3bc1c13 ("ath11k: Fix pktlog lite rx events")
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Anilkumar Kolli <quic_akolli@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
dca857f07dc1 ath11k: Fix uninitialized symbol 'rx_buf_sz'
--
https://patchwork.kernel.org/project/linux-wireless/patch/1642605793-13518-1-git-send-email-quic_akolli@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-31 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 15:23 [PATCH] ath11k: Fix uninitialized symbol 'rx_buf_sz' Anilkumar Kolli
2022-01-31 14:00 ` 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).