Skip to content

Commit 3c54672

Browse files
Colin Ian Kingdavem330
authored andcommitted
wimax/i2400m: remove redundant variables ack_status, bcf and protocol
Variables ack_status, bcf and protocol are being assigned but are never used hence they are redundant and can be removed. Also declare ack_type as unsigned int rather than unsigned to clean up a checkpatch warning. Cleans up clang warnings: warning: variable 'ack_status' set but not used [-Wunused-but-set-variable] warning: variable 'bcf' set but not used [-Wunused-but-set-variable] warning: variable 'protocol' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 01e866b commit 3c54672

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

drivers/net/wimax/i2400m/control.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,12 @@ static void i2400m_msg_ack_hook(struct i2400m *i2400m,
566566
{
567567
int result;
568568
struct device *dev = i2400m_dev(i2400m);
569-
unsigned ack_type, ack_status;
569+
unsigned int ack_type;
570570
char strerr[32];
571571

572572
/* Chew on the message, we might need some information from
573573
* here */
574574
ack_type = le16_to_cpu(l3l4_hdr->type);
575-
ack_status = le16_to_cpu(l3l4_hdr->status);
576575
switch (ack_type) {
577576
case I2400M_MT_CMD_ENTER_POWERSAVE:
578577
/* This is just left here for the sake of example, as

drivers/net/wimax/i2400m/fw.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,6 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags)
15521552
int ret, itr;
15531553
struct device *dev = i2400m_dev(i2400m);
15541554
struct i2400m_fw *i2400m_fw;
1555-
const struct i2400m_bcf_hdr *bcf; /* Firmware data */
15561555
const struct firmware *fw;
15571556
const char *fw_name;
15581557

@@ -1574,7 +1573,7 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags)
15741573
}
15751574

15761575
/* Load firmware files to memory. */
1577-
for (itr = 0, bcf = NULL, ret = -ENOENT; ; itr++) {
1576+
for (itr = 0, ret = -ENOENT; ; itr++) {
15781577
fw_name = i2400m->bus_fw_names[itr];
15791578
if (fw_name == NULL) {
15801579
dev_err(dev, "Could not find a usable firmware image\n");

drivers/net/wimax/i2400m/netdev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,14 +535,12 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb,
535535
{
536536
struct net_device *net_dev = i2400m->wimax_dev.net_dev;
537537
struct device *dev = i2400m_dev(i2400m);
538-
int protocol;
539538

540539
d_fnstart(2, dev, "(i2400m %p skb %p [%u] cs %d)\n",
541540
i2400m, skb, skb->len, cs);
542541
switch(cs) {
543542
case I2400M_CS_IPV4_0:
544543
case I2400M_CS_IPV4:
545-
protocol = ETH_P_IP;
546544
i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev,
547545
skb->data - ETH_HLEN,
548546
cpu_to_be16(ETH_P_IP));

0 commit comments

Comments
 (0)