2023-09-19 04:53:47

by Wu Yunchuan

[permalink] [raw]
Subject: [PATCH v2 wireless-next 6/9] wifi: ath10k: Remove unnecessary (void*) conversions

No need cast (void*) to (struct htt_rx_ring_setup_ring32 *),
(struct htt_rx_ring_setup_ring64 *). Change the prototype to
remove the local variable.

Signed-off-by: Wu Yunchuan <[email protected]>
Suggested-by: Jeff Johnson <[email protected]>
---
drivers/net/wireless/ath/ath10k/htt_tx.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index bd603feb7953..be4d4536aaa8 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -796,20 +796,16 @@ static int ath10k_htt_send_frag_desc_bank_cfg_64(struct ath10k_htt *htt)
return 0;
}

-static void ath10k_htt_fill_rx_desc_offset_32(struct ath10k_hw_params *hw, void *rx_ring)
+static void ath10k_htt_fill_rx_desc_offset_32(struct ath10k_hw_params *hw,
+ struct htt_rx_ring_setup_ring32 *rx_ring)
{
- struct htt_rx_ring_setup_ring32 *ring =
- (struct htt_rx_ring_setup_ring32 *)rx_ring;
-
- ath10k_htt_rx_desc_get_offsets(hw, &ring->offsets);
+ ath10k_htt_rx_desc_get_offsets(hw, &rx_ring->offsets);
}

-static void ath10k_htt_fill_rx_desc_offset_64(struct ath10k_hw_params *hw, void *rx_ring)
+static void ath10k_htt_fill_rx_desc_offset_64(struct ath10k_hw_params *hw,
+ struct htt_rx_ring_setup_ring64 *rx_ring)
{
- struct htt_rx_ring_setup_ring64 *ring =
- (struct htt_rx_ring_setup_ring64 *)rx_ring;
-
- ath10k_htt_rx_desc_get_offsets(hw, &ring->offsets);
+ ath10k_htt_rx_desc_get_offsets(hw, &rx_ring->offsets);
}

static int ath10k_htt_send_rx_ring_cfg_32(struct ath10k_htt *htt)
--
2.30.2


2023-09-20 20:28:32

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH v2 wireless-next 6/9] wifi: ath10k: Remove unnecessary (void*) conversions

On 9/18/2023 9:50 PM, Wu Yunchuan wrote:
> No need cast (void*) to (struct htt_rx_ring_setup_ring32 *),
> (struct htt_rx_ring_setup_ring64 *). Change the prototype to
> remove the local variable.
>
> Signed-off-by: Wu Yunchuan <[email protected]>
> Suggested-by: Jeff Johnson <[email protected]>

Ideally your Signed-off-by: should be the last tag you add, but in this
context I don't think it matters.

Acked-by: Jeff Johnson <[email protected]>