Skip to content

Commit

Permalink
mt7603: mcu: remove unused parameter in mt7603_mcu_msg_alloc() signature
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Nov 16, 2017
1 parent 2895775 commit 1dae8f0
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions mt7603_mcu.c
Expand Up @@ -27,8 +27,7 @@ struct mt7603_fw_trailer {
__le32 dl_len;
} __packed;

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

Expand Down Expand Up @@ -158,7 +157,7 @@ mt7603_mcu_init_download(struct mt7603_dev *dev, u32 addr, u32 len)
.len = cpu_to_le32(len),
.mode = cpu_to_le32(BIT(31)),
};
struct sk_buff *skb = mt7603_mcu_msg_alloc(dev, &req, sizeof(req));
struct sk_buff *skb = mt7603_mcu_msg_alloc(&req, sizeof(req));

return mt7603_mcu_msg_send(dev, skb, -MCU_CMD_TARGET_ADDRESS_LEN_REQ, MCU_Q_NA, NULL);
}
Expand All @@ -172,7 +171,7 @@ mt7603_mcu_send_firmware(struct mt7603_dev *dev, const void *data, int len)
while (len > 0) {
int cur_len = min_t(int, 4096 - sizeof(struct mt7603_mcu_txd), len);

skb = mt7603_mcu_msg_alloc(dev, data, cur_len);
skb = mt7603_mcu_msg_alloc(data, cur_len);
if (!skb)
return -ENOMEM;

Expand All @@ -197,15 +196,15 @@ mt7603_mcu_start_firmware(struct mt7603_dev *dev, u32 addr)
.override = cpu_to_le32(addr ? 1 : 0),
.addr = cpu_to_le32(addr),
};
struct sk_buff *skb = mt7603_mcu_msg_alloc(dev, &req, sizeof(req));
struct sk_buff *skb = mt7603_mcu_msg_alloc(&req, sizeof(req));

return mt7603_mcu_msg_send(dev, skb, -MCU_CMD_FW_START_REQ, MCU_Q_NA, NULL);
}

static int
mt7603_mcu_restart(struct mt7603_dev *dev)
{
struct sk_buff *skb = mt7603_mcu_msg_alloc(dev, NULL, 0);
struct sk_buff *skb = mt7603_mcu_msg_alloc(NULL, 0);

return mt7603_mcu_msg_send(dev, skb, -MCU_CMD_RESTART_DL_REQ, MCU_Q_NA, NULL);
}
Expand Down Expand Up @@ -410,7 +409,7 @@ int mt7603_mcu_set_eeprom(struct mt7603_dev *dev)

BUILD_BUG_ON(ARRAY_SIZE(req_fields) * sizeof(*data) > size);

skb = mt7603_mcu_msg_alloc(dev, NULL, size + sizeof(req_hdr));
skb = mt7603_mcu_msg_alloc(NULL, size + sizeof(req_hdr));
memcpy(skb_put(skb, sizeof(req_hdr)), &req_hdr, sizeof(req_hdr));
data = (struct req_data *) skb_put(skb, size);
memset(data, 0, size);
Expand Down Expand Up @@ -465,7 +464,7 @@ static int mt7603_mcu_set_tx_power(struct mt7603_dev *dev)
memcpy(req.temp_comp_power, eep + MT_EE_STEP_NUM_NEG_6_7,
sizeof(req.temp_comp_power));

skb = mt7603_mcu_msg_alloc(dev, &req, sizeof(req));
skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
return mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_SET_TX_POWER_CTRL, MCU_Q_SET, NULL);
}

Expand All @@ -491,7 +490,7 @@ int mt7603_mcu_set_channel(struct mt7603_dev *dev)
int ret;

memset(req.txpower, 0xff, sizeof(req.txpower));
skb = mt7603_mcu_msg_alloc(dev, &req, sizeof(req));
skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
ret = mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_CHANNEL_SWITCH, MCU_Q_SET, NULL);
if (ret)
return ret;
Expand All @@ -517,7 +516,7 @@ int mt7603_mcu_set_timing(struct mt7603_dev *dev, int slot, int sifs, int rifs,
};
struct sk_buff *skb;

skb = mt7603_mcu_msg_alloc(dev, &req, sizeof(req));
skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
return mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_SLOT_TIME_SET, MCU_Q_SET, NULL);
}

Expand All @@ -535,7 +534,7 @@ int mt7603_mcu_reg_read(struct mt7603_dev *dev, u32 reg, u32 *val, bool rf)
__le32 *res;
int ret;

skb = mt7603_mcu_msg_alloc(dev, &req, sizeof(req));
skb = mt7603_mcu_msg_alloc(&req, sizeof(req));
ret = mt7603_mcu_msg_send(dev, skb, MCU_EXT_CMD_MULTIPLE_REG_ACCESS, MCU_Q_QUERY, &skb);
if (ret)
return ret;
Expand Down

0 comments on commit 1dae8f0

Please sign in to comment.