From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH][net-next] net: phy: check if advertising is zero using linkmode_empty Date: Mon, 12 Nov 2018 16:26:44 -0800 (PST) Message-ID: <20181112.162644.2177457459131295892.davem@davemloft.net> References: <20181112234556.5291-1-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: andrew@lunn.ch, f.fainelli@gmail.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org To: colin.king@canonical.com Return-path: In-Reply-To: <20181112234556.5291-1-colin.king@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Colin King Date: Mon, 12 Nov 2018 23:45:56 +0000 > From: Colin Ian King > > 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 Applied.