Commit 3c546728 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01e866bf
...@@ -566,13 +566,12 @@ static void i2400m_msg_ack_hook(struct i2400m *i2400m, ...@@ -566,13 +566,12 @@ static void i2400m_msg_ack_hook(struct i2400m *i2400m,
{ {
int result; int result;
struct device *dev = i2400m_dev(i2400m); struct device *dev = i2400m_dev(i2400m);
unsigned ack_type, ack_status; unsigned int ack_type;
char strerr[32]; char strerr[32];
/* Chew on the message, we might need some information from /* Chew on the message, we might need some information from
* here */ * here */
ack_type = le16_to_cpu(l3l4_hdr->type); ack_type = le16_to_cpu(l3l4_hdr->type);
ack_status = le16_to_cpu(l3l4_hdr->status);
switch (ack_type) { switch (ack_type) {
case I2400M_MT_CMD_ENTER_POWERSAVE: case I2400M_MT_CMD_ENTER_POWERSAVE:
/* This is just left here for the sake of example, as /* This is just left here for the sake of example, as
......
...@@ -1552,7 +1552,6 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags) ...@@ -1552,7 +1552,6 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags)
int ret, itr; int ret, itr;
struct device *dev = i2400m_dev(i2400m); struct device *dev = i2400m_dev(i2400m);
struct i2400m_fw *i2400m_fw; struct i2400m_fw *i2400m_fw;
const struct i2400m_bcf_hdr *bcf; /* Firmware data */
const struct firmware *fw; const struct firmware *fw;
const char *fw_name; const char *fw_name;
...@@ -1574,7 +1573,7 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags) ...@@ -1574,7 +1573,7 @@ int i2400m_dev_bootstrap(struct i2400m *i2400m, enum i2400m_bri flags)
} }
/* Load firmware files to memory. */ /* Load firmware files to memory. */
for (itr = 0, bcf = NULL, ret = -ENOENT; ; itr++) { for (itr = 0, ret = -ENOENT; ; itr++) {
fw_name = i2400m->bus_fw_names[itr]; fw_name = i2400m->bus_fw_names[itr];
if (fw_name == NULL) { if (fw_name == NULL) {
dev_err(dev, "Could not find a usable firmware image\n"); dev_err(dev, "Could not find a usable firmware image\n");
......
...@@ -535,14 +535,12 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb, ...@@ -535,14 +535,12 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb,
{ {
struct net_device *net_dev = i2400m->wimax_dev.net_dev; struct net_device *net_dev = i2400m->wimax_dev.net_dev;
struct device *dev = i2400m_dev(i2400m); struct device *dev = i2400m_dev(i2400m);
int protocol;
d_fnstart(2, dev, "(i2400m %p skb %p [%u] cs %d)\n", d_fnstart(2, dev, "(i2400m %p skb %p [%u] cs %d)\n",
i2400m, skb, skb->len, cs); i2400m, skb, skb->len, cs);
switch(cs) { switch(cs) {
case I2400M_CS_IPV4_0: case I2400M_CS_IPV4_0:
case I2400M_CS_IPV4: case I2400M_CS_IPV4:
protocol = ETH_P_IP;
i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev, i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev,
skb->data - ETH_HLEN, skb->data - ETH_HLEN,
cpu_to_be16(ETH_P_IP)); cpu_to_be16(ETH_P_IP));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment