From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Colin King <colin.king@canonical.com>,
"David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] drivers/net: appletalk/cops: remove redundant if statement and mask
Date: Tue, 25 Dec 2018 11:06:08 +0300 [thread overview]
Message-ID: <322fb722-cf17-896a-cbf4-27ac796d0c7a@cogentembedded.com> (raw)
In-Reply-To: <20181224194146.11511-1-colin.king@canonical.com>
On 24.12.2018 22:41, Colin King wrote:
> 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.
Removed. :-)
> 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>
[...]
MBR, Sergei
prev parent reply other threads:[~2018-12-25 8:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-24 19:41 Colin King
2018-12-24 22:49 ` David Miller
2018-12-25 8:06 ` Sergei Shtylyov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=322fb722-cf17-896a-cbf4-27ac796d0c7a@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®