Skip to content

Commit

Permalink
mt7601u: simplify mt7601u_mcu_msg_alloc signature
Browse files Browse the repository at this point in the history
Remove mt7601u_dev parameter from mt7601u_mcu_msg_alloc signature since
dev pointer is never used in routine body

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Lorenzo Bianconi authored and Kalle Valo committed Mar 13, 2018
1 parent fbae9c7 commit 2f04652
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/wireless/mediatek/mt7601u/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ static inline void trace_mt_mcu_msg_send_cs(struct mt7601u_dev *dev,
trace_mt_mcu_msg_send(dev, skb, csum, need_resp);
}

static struct sk_buff *
mt7601u_mcu_msg_alloc(struct mt7601u_dev *dev, const void *data, int len)
static struct sk_buff *mt7601u_mcu_msg_alloc(const void *data, int len)
{
struct sk_buff *skb;

Expand Down Expand Up @@ -171,7 +170,7 @@ static int mt7601u_mcu_function_select(struct mt7601u_dev *dev,
.value = cpu_to_le32(val),
};

skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg));
skb = mt7601u_mcu_msg_alloc(&msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt7601u_mcu_msg_send(dev, skb, CMD_FUN_SET_OP, func == 5);
Expand Down Expand Up @@ -208,7 +207,7 @@ mt7601u_mcu_calibrate(struct mt7601u_dev *dev, enum mcu_calibrate cal, u32 val)
.value = cpu_to_le32(val),
};

skb = mt7601u_mcu_msg_alloc(dev, &msg, sizeof(msg));
skb = mt7601u_mcu_msg_alloc(&msg, sizeof(msg));
if (!skb)
return -ENOMEM;
return mt7601u_mcu_msg_send(dev, skb, CMD_CALIBRATION_OP, true);
Expand Down

0 comments on commit 2f04652

Please sign in to comment.