lkml.org 
[lkml]   [2018]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][V2] drivers/net: appletalk/cops: remove redundant if statement and mask
From
From: Colin King <colin.king@canonical.com>
Date: Mon, 24 Dec 2018 19:41:46 +0000

> From: Colin Ian King <colin.king@canonical.com>
>
> 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.
>
> Similarly, the two different outb calls are identical as the mask
> of 0xff on the second outb is redundant since a u8 is being written,
> so the if statement is also redundant and can be also removed.
>
> Detected by CoverityScan, CID#1475639 ("Identical code for different
> branches")
>
> ---
>
> V2: Remove the if statement for the outb calls, thanks to David
> Miller for spotting this.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Colin, I almost didn't notice how the "---" there is in the wrong spot
and therefore was cutting out your changelog and signoff.

I fixed it up, but please be more careful in the future.

Thanks.

\
 
 \ /
  Last update: 2018-12-24 23:50    [W:0.302 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site