linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>,
	Michael Walle <michael@walle.cc>,
	Guenter Roeck <linux@roeck-us.net>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] net: phy: bcm54140: fix less than zero comparison on an unsigned
Date: Thu, 23 Apr 2020 15:38:08 +0100	[thread overview]
Message-ID: <5551f51e-8f86-f9df-0efe-7ff27a0d309f@canonical.com> (raw)
In-Reply-To: <20200423143712.GA1020784@lunn.ch>

On 23/04/2020 15:37, Andrew Lunn wrote:
> On Thu, Apr 23, 2020 at 03:10:16PM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Currently the unsigned variable tmp is being checked for an negative
>> error return from the call to bcm_phy_read_rdb and this can never
>> be true since tmp is unsigned.  Fix this by making tmp a plain int.
>>
>> Addresses-Coverity: ("Unsigned compared against 0")
> 
> I thought 0 was unsigned?

yeah, misleading message from the static analyzer methinks

> 
>> Fixes: 4406d36dfdf1 ("net: phy: bcm54140: add hwmon support")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew
> 


  reply	other threads:[~2020-04-23 14:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 14:10 [PATCH][next] net: phy: bcm54140: fix less than zero comparison on an unsigned Colin King
2020-04-23 14:37 ` Andrew Lunn
2020-04-23 14:38   ` Colin Ian King [this message]
2020-04-23 14:48 ` Michael Walle
2020-04-23 22:57 ` 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=5551f51e-8f86-f9df-0efe-7ff27a0d309f@canonical.com \
    --to=colin.king@canonical.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=michael@walle.cc \
    --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).