Skip to content

Commit e084a1c

Browse files
ColinIanKingkuba-moo
authored andcommitted
xirc2ps_cs: remove redundant assignment to variable okay, clean up freespace
The variable okay is being initialized with a value that is never read, it is being re-assigned later on. The initialization is redundant and can be removed. Also clean up assignment to variable freespace using an assignment and mask operation. Cleans up clang scan build warning: drivers/net/ethernet/xircom/xirc2ps_cs.c:1244:5: warning: Value stored to 'okay' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 36f75f7 commit e084a1c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/xircom/xirc2ps_cs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,9 +1240,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev)
12401240
netif_stop_queue(dev);
12411241
SelectPage(0);
12421242
PutWord(XIRCREG0_TRS, (u_short)pktlen+2);
1243-
freespace = GetWord(XIRCREG0_TSO);
1244-
okay = freespace & 0x8000;
1245-
freespace &= 0x7fff;
1243+
freespace = GetWord(XIRCREG0_TSO) & 0x7fff;
12461244
/* TRS doesn't work - (indeed it is eliminated with sil-rev 1) */
12471245
okay = pktlen +2 < freespace;
12481246
pr_debug("%s: avail. tx space=%u%s\n",

0 commit comments

Comments
 (0)