From: Andrew Lunn <andrew@lunn.ch>
To: Colin King <colin.king@canonical.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][net-next] net: phy: check if advertising is zero using linkmode_empty
Date: Tue, 13 Nov 2018 01:18:01 +0100 [thread overview]
Message-ID: <20181113001801.GD14047@lunn.ch> (raw)
In-Reply-To: <20181112234556.5291-1-colin.king@canonical.com>
On Mon, Nov 12, 2018 at 11:45:56PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> A recent change modified variable advertising from a u32 to a link mode
> array and left the u32 zero comparison, so essential we now have an array
> being compared to null which is not the intention. Fix this by using the
> call to linkmode_empty to check if advertising is all zero.
>
> Detected by CoverityScan, CID#1475424 ("Array compared against 0")
>
> Fixes: 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks Colin.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2018-11-13 0:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 23:45 [PATCH][net-next] net: phy: check if advertising is zero using linkmode_empty Colin King
2018-11-13 0:18 ` Andrew Lunn [this message]
2018-11-13 0:26 ` David Miller
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=20181113001801.GD14047@lunn.ch \
--to=andrew@lunn.ch \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).