wifi: mt76: Remove unnecessary (void*) conversions
authorWu Yunchuan <yunchuan@nfschina.com>
Fri, 20 Oct 2023 09:34:32 +0000 (17:34 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 7 Dec 2023 17:50:19 +0000 (18:50 +0100)
No need cast (void *) to (struct mt7615_phy *).

Signed-off-by: Wu Yunchuan <yunchuan@nfschina.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
drivers/net/wireless/mediatek/mt76/mt7915/mac.c
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
drivers/net/wireless/mediatek/mt76/mt792x_mac.c
drivers/net/wireless/mediatek/mt76/mt7996/mac.c

index 955974a82180fdb45b7a334c1dff9fda76112680..ae34d019e58838a53b5a8ad021b657def8a81bfd 100644 (file)
@@ -453,7 +453,7 @@ mt7615_mcu_scan_event(struct mt7615_dev *dev, struct sk_buff *skb)
        else
                mphy = &dev->mt76.phy;
 
-       phy = (struct mt7615_phy *)mphy->priv;
+       phy = mphy->priv;
 
        spin_lock_bh(&dev->mt76.lock);
        __skb_queue_tail(&phy->scan_event_list, skb);
@@ -481,7 +481,7 @@ mt7615_mcu_roc_event(struct mt7615_dev *dev, struct sk_buff *skb)
 
        ieee80211_ready_on_channel(mphy->hw);
 
-       phy = (struct mt7615_phy *)mphy->priv;
+       phy = mphy->priv;
        phy->roc_grant = true;
        wake_up(&phy->roc_wait);
 
index 2222fb9aa103ef3aed6358e98c008d2e55befbb4..f12008244db39ccf66f5a0c257fd3193448e5037 100644 (file)
@@ -1247,7 +1247,7 @@ mt7915_phy_get_nf(struct mt7915_phy *phy, int idx)
 
 void mt7915_update_channel(struct mt76_phy *mphy)
 {
-       struct mt7915_phy *phy = (struct mt7915_phy *)mphy->priv;
+       struct mt7915_phy *phy = mphy->priv;
        struct mt76_channel_state *state = mphy->chan_state;
        int nf;
 
index b22f06d4411a821c4dd8d54d62428dd018a0a403..c67c4f6ca2aae1c44dda0d18e88ee29400c44f08 100644 (file)
@@ -269,7 +269,7 @@ mt7915_mcu_rx_thermal_notify(struct mt7915_dev *dev, struct sk_buff *skb)
            dev->mt76.phys[MT_BAND1])
                mphy = dev->mt76.phys[MT_BAND1];
 
-       phy = (struct mt7915_phy *)mphy->priv;
+       phy = mphy->priv;
        phy->throttle_state = t->ctrl.duty.duty_cycle;
 }
 
index 94fc3eb4023488c2dc8e203d0c436778eb4c9028..a9056b55b0a4cf66ef0b516dc1957083e837b9fa 100644 (file)
@@ -160,7 +160,7 @@ static void
 mt7921_mcu_scan_event(struct mt792x_dev *dev, struct sk_buff *skb)
 {
        struct mt76_phy *mphy = &dev->mt76.phy;
-       struct mt792x_phy *phy = (struct mt792x_phy *)mphy->priv;
+       struct mt792x_phy *phy = mphy->priv;
 
        spin_lock_bh(&dev->mt76.lock);
        __skb_queue_tail(&phy->scan_event_list, skb);
index 9c0e397537acf55f24d12d1d4a68253a6c881e53..c5fd7116929b74414a3e982d9e7222934689497c 100644 (file)
@@ -345,7 +345,7 @@ static void
 mt7925_mcu_scan_event(struct mt792x_dev *dev, struct sk_buff *skb)
 {
        struct mt76_phy *mphy = &dev->mt76.phy;
-       struct mt792x_phy *phy = (struct mt792x_phy *)mphy->priv;
+       struct mt792x_phy *phy = mphy->priv;
 
        spin_lock_bh(&dev->mt76.lock);
        __skb_queue_tail(&phy->scan_event_list, skb);
index 5d1f8229fdc1daa0ba57afcd73673dbc6ad700b8..eb29434abee1bc5dbd80faf6abf4714febafdc78 100644 (file)
@@ -223,7 +223,7 @@ static void
 mt792x_phy_update_channel(struct mt76_phy *mphy, int idx)
 {
        struct mt792x_dev *dev = container_of(mphy->dev, struct mt792x_dev, mt76);
-       struct mt792x_phy *phy = (struct mt792x_phy *)mphy->priv;
+       struct mt792x_phy *phy = mphy->priv;
        struct mt76_channel_state *state;
        u64 busy_time, tx_time, rx_time, obss_time;
        int nf;
index 59ab07b89087075510bc404ab1257f570e392807..53a78d971326260d369bd1ee147c9126a8cb8a69 100644 (file)
@@ -1525,7 +1525,7 @@ mt7996_phy_get_nf(struct mt7996_phy *phy, u8 band_idx)
 
 void mt7996_update_channel(struct mt76_phy *mphy)
 {
-       struct mt7996_phy *phy = (struct mt7996_phy *)mphy->priv;
+       struct mt7996_phy *phy = mphy->priv;
        struct mt76_channel_state *state = mphy->chan_state;
        int nf;