Re: [PATCH] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread Colin Ian King
On 24/12/2018 18:08, David Miller wrote: > From: Colin King > Date: Sat, 22 Dec 2018 16:58:41 + > >> @@ -777,10 +777,7 @@ static void cops_rx(struct net_device *dev) >> } >> >> /* Get response length. */ >> -if(lp->board==DAYNA) >> -pkt_len = inb(ioaddr) &

Re: [PATCH] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-24 Thread David Miller
From: Colin King Date: Sat, 22 Dec 2018 16:58:41 + > @@ -777,10 +777,7 @@ static void cops_rx(struct net_device *dev) > } > > /* Get response length. */ > - if(lp->board==DAYNA) > - pkt_len = inb(ioaddr) & 0xFF; > - else > - pkt_len = inb(io

[PATCH] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-22 Thread Colin King
From: Colin Ian King The two different assignments for pkt_len are actually the same and so the if statement is redundant and can be removed. Masking a u8 return value from inb() with 0xFF is also redundant and can also be emoved. Remove the redundant code. Detected by CoverityScan, CID#147563