* [PATCH v2 wireless-next 7/9] wifi: ath12k: Remove unnecessary (void*) conversions
@ 2023-09-19 4:51 Wu Yunchuan
2023-09-20 14:52 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: Wu Yunchuan @ 2023-09-19 4:51 UTC (permalink / raw)
To: kvalo, quic_jjohnson
Cc: ath12k, linux-wireless, linux-kernel, kernel-janitors,
Wu Yunchuan
No need cast (void*) to (struct hal_rx_ppdu_end_user_stats *),
(struct ath12k_rx_desc_info *) or (struct hal_tx_msdu_ext_desc *).
Change the prototype to remove the local variable.
Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com>
Suggested-by: Jeff Johnson <quic_jjohnson@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 9 +++------
drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +-
drivers/net/wireless/ath/ath12k/dp_tx.c | 5 ++---
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index f1e57e98bdc6..86aa397c074f 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -13,8 +13,7 @@
static void ath12k_dp_mon_rx_handle_ofdma_info(void *rx_tlv,
struct hal_rx_user_status *rx_user_status)
{
- struct hal_rx_ppdu_end_user_stats *ppdu_end_user =
- (struct hal_rx_ppdu_end_user_stats *)rx_tlv;
+ struct hal_rx_ppdu_end_user_stats *ppdu_end_user = rx_tlv;
rx_user_status->ul_ofdma_user_v0_word0 =
__le32_to_cpu(ppdu_end_user->usr_resp_ref);
@@ -23,11 +22,9 @@ static void ath12k_dp_mon_rx_handle_ofdma_info(void *rx_tlv,
}
static void
-ath12k_dp_mon_rx_populate_byte_count(void *rx_tlv, void *ppduinfo,
- struct hal_rx_user_status *rx_user_status)
+ath12k_dp_mon_rx_populate_byte_count(const struct hal_rx_ppdu_end_user_stats *ppdu_end_user,
+ void *ppduinfo, struct hal_rx_user_status *rx_user_status)
{
- struct hal_rx_ppdu_end_user_stats *ppdu_end_user =
- (struct hal_rx_ppdu_end_user_stats *)rx_tlv;
u32 mpdu_ok_byte_count = __le32_to_cpu(ppdu_end_user->mpdu_ok_cnt);
u32 mpdu_err_byte_count = __le32_to_cpu(ppdu_end_user->mpdu_err_cnt);
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index e6e64d437c47..ff5f66ca7783 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -3730,7 +3730,7 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
continue;
}
- desc_info = (struct ath12k_rx_desc_info *)err_info.rx_desc;
+ desc_info = err_info.rx_desc;
/* retry manual desc retrieval if hw cc is not done */
if (!desc_info) {
diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
index 8874c815d7fa..41a93320b036 100644
--- a/drivers/net/wireless/ath/ath12k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
@@ -106,11 +106,10 @@ static struct ath12k_tx_desc_info *ath12k_dp_tx_assign_buffer(struct ath12k_dp *
return desc;
}
-static void ath12k_hal_tx_cmd_ext_desc_setup(struct ath12k_base *ab, void *cmd,
+static void ath12k_hal_tx_cmd_ext_desc_setup(struct ath12k_base *ab,
+ struct hal_tx_msdu_ext_desc *tcl_ext_cmd,
struct hal_tx_info *ti)
{
- struct hal_tx_msdu_ext_desc *tcl_ext_cmd = (struct hal_tx_msdu_ext_desc *)cmd;
-
tcl_ext_cmd->info0 = le32_encode_bits(ti->paddr,
HAL_TX_MSDU_EXT_INFO0_BUF_PTR_LO);
tcl_ext_cmd->info1 = le32_encode_bits(0x0,
--
2.30.2
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 wireless-next 7/9] wifi: ath12k: Remove unnecessary (void*) conversions
2023-09-19 4:51 [PATCH v2 wireless-next 7/9] wifi: ath12k: Remove unnecessary (void*) conversions Wu Yunchuan
@ 2023-09-20 14:52 ` Kalle Valo
2023-09-20 18:03 ` Jeff Johnson
0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2023-09-20 14:52 UTC (permalink / raw)
To: Wu Yunchuan
Cc: quic_jjohnson, ath12k, linux-wireless, linux-kernel,
kernel-janitors, Wu Yunchuan
Wu Yunchuan <yunchuan@nfschina.com> wrote:
> No need cast (void*) to (struct hal_rx_ppdu_end_user_stats *),
> (struct ath12k_rx_desc_info *) or (struct hal_tx_msdu_ext_desc *).
> Change the prototype to remove the local variable.
>
> Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com>
> Suggested-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
This added new warnings:
drivers/net/wireless/ath/ath12k/dp_mon.c:25: line length of 92 exceeds 90 columns
drivers/net/wireless/ath/ath12k/dp_mon.c:26: line length of 95 exceeds 90 columns
I fixed them in the pending branch by renaming ppdu_end_user to stats and
moving rx_user_status to it's own line:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=5c0910fdf1d800f1aeb8ab3e860e61bebec0091b
No need to resend because of this.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230919045142.524226-1-yunchuan@nfschina.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 wireless-next 7/9] wifi: ath12k: Remove unnecessary (void*) conversions
2023-09-20 14:52 ` Kalle Valo
@ 2023-09-20 18:03 ` Jeff Johnson
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2023-09-20 18:03 UTC (permalink / raw)
To: Kalle Valo, Wu Yunchuan
Cc: ath12k, linux-wireless, linux-kernel, kernel-janitors
On 9/20/2023 7:52 AM, Kalle Valo wrote:
> Wu Yunchuan <yunchuan@nfschina.com> wrote:
>
>> No need cast (void*) to (struct hal_rx_ppdu_end_user_stats *),
>> (struct ath12k_rx_desc_info *) or (struct hal_tx_msdu_ext_desc *).
>> Change the prototype to remove the local variable.
>>
>> Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com>
>> Suggested-by: Jeff Johnson <quic_jjohnson@quicinc.com>
>> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
For the Pending change:
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-20 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-19 4:51 [PATCH v2 wireless-next 7/9] wifi: ath12k: Remove unnecessary (void*) conversions Wu Yunchuan
2023-09-20 14:52 ` Kalle Valo
2023-09-20 18:03 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox