2023-09-19 04:53:12

by Wu Yunchuan

[permalink] [raw]
Subject: [PATCH v2 wireless-next 5/9] ath6kl: remove unnecessary (void*) conversions

No need cast (void *) to (struct ath6kl *) or
(struct ath6kl_cookie *).

Signed-off-by: Wu Yunchuan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/main.c | 4 ++--
drivers/net/wireless/ath/ath6kl/txrx.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index d3aa9e7a37c2..8f9fe23e9755 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -852,14 +852,14 @@ void ath6kl_tgt_stats_event(struct ath6kl_vif *vif, u8 *ptr, u32 len)

void ath6kl_wakeup_event(void *dev)
{
- struct ath6kl *ar = (struct ath6kl *) dev;
+ struct ath6kl *ar = dev;

wake_up(&ar->event_wq);
}

void ath6kl_txpwr_rx_evt(void *devt, u8 tx_pwr)
{
- struct ath6kl *ar = (struct ath6kl *) devt;
+ struct ath6kl *ar = devt;

ar->tx_pwr = tx_pwr;
wake_up(&ar->event_wq);
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index a56fab6232a9..80e66acc5cf6 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -708,7 +708,7 @@ void ath6kl_tx_complete(struct htc_target *target,
packet->endpoint >= ENDPOINT_MAX))
continue;

- ath6kl_cookie = (struct ath6kl_cookie *)packet->pkt_cntxt;
+ ath6kl_cookie = packet->pkt_cntxt;
if (WARN_ON_ONCE(!ath6kl_cookie))
continue;

--
2.30.2


2023-09-20 20:41:13

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH v2 wireless-next 5/9] ath6kl: remove unnecessary (void*) conversions

On 9/18/2023 9:50 PM, Wu Yunchuan wrote:
> No need cast (void *) to (struct ath6kl *) or
> (struct ath6kl_cookie *).
>
> Signed-off-by: Wu Yunchuan <[email protected]>

Subject should have wifi: prefix added. Kalle can do that when he merges.

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