qlogic: netxen: remove various redundant variables
Variables consumer, cmd_desc, end_cnt and no_of_desc are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'consumer' set but not used [-Wunused-but-set-variable] warning: variable 'cmd_desc' set but not used [-Wunused-but-set-variable] warning: variable 'end_cnt' set but not used [-Wunused-but-set-variable] warning: variable 'no_of_desc' 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>
This commit is contained in:
parent
2e41c380d1
commit
8e15268e3d
|
@ -566,9 +566,8 @@ static int
|
|||
netxen_send_cmd_descs(struct netxen_adapter *adapter,
|
||||
struct cmd_desc_type0 *cmd_desc_arr, int nr_desc)
|
||||
{
|
||||
u32 i, producer, consumer;
|
||||
u32 i, producer;
|
||||
struct netxen_cmd_buffer *pbuf;
|
||||
struct cmd_desc_type0 *cmd_desc;
|
||||
struct nx_host_tx_ring *tx_ring;
|
||||
|
||||
i = 0;
|
||||
|
@ -580,7 +579,6 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
|
|||
__netif_tx_lock_bh(tx_ring->txq);
|
||||
|
||||
producer = tx_ring->producer;
|
||||
consumer = tx_ring->sw_consumer;
|
||||
|
||||
if (nr_desc >= netxen_tx_avail(tx_ring)) {
|
||||
netif_tx_stop_queue(tx_ring->txq);
|
||||
|
@ -595,8 +593,6 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
|
|||
}
|
||||
|
||||
do {
|
||||
cmd_desc = &cmd_desc_arr[i];
|
||||
|
||||
pbuf = &tx_ring->cmd_buf_arr[producer];
|
||||
pbuf->skb = NULL;
|
||||
pbuf->frag_count = 0;
|
||||
|
@ -2350,7 +2346,7 @@ static int netxen_md_entry_err_chk(struct netxen_adapter *adapter,
|
|||
static int netxen_parse_md_template(struct netxen_adapter *adapter)
|
||||
{
|
||||
int num_of_entries, buff_level, e_cnt, esize;
|
||||
int end_cnt = 0, rv = 0, sane_start = 0, sane_end = 0;
|
||||
int rv = 0, sane_start = 0, sane_end = 0;
|
||||
char *dbuff;
|
||||
void *template_buff = adapter->mdump.md_template;
|
||||
char *dump_buff = adapter->mdump.md_capture_buff;
|
||||
|
@ -2386,8 +2382,6 @@ static int netxen_parse_md_template(struct netxen_adapter *adapter)
|
|||
break;
|
||||
case RDEND:
|
||||
entry->hdr.driver_flags |= NX_DUMP_SKIP;
|
||||
if (!sane_end)
|
||||
end_cnt = e_cnt;
|
||||
sane_end += 1;
|
||||
break;
|
||||
case CNTRL:
|
||||
|
|
|
@ -2073,7 +2073,7 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
|||
struct skb_frag_struct *frag;
|
||||
|
||||
u32 producer;
|
||||
int frag_count, no_of_desc;
|
||||
int frag_count;
|
||||
u32 num_txd = tx_ring->num_desc;
|
||||
|
||||
frag_count = skb_shinfo(skb)->nr_frags + 1;
|
||||
|
@ -2093,8 +2093,6 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
|||
|
||||
frag_count = 1 + skb_shinfo(skb)->nr_frags;
|
||||
}
|
||||
/* 4 fragments per cmd des */
|
||||
no_of_desc = (frag_count + 3) >> 2;
|
||||
|
||||
if (unlikely(netxen_tx_avail(tx_ring) <= TX_STOP_THRESH)) {
|
||||
netif_stop_queue(netdev);
|
||||
|
|
Loading…
Reference in New Issue