netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Colin King <colin.king@canonical.com>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Marek Vasut <marex@denx.de>,
	Tristram Ha <Tristram.Ha@microchip.com>,
	netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] net: dsa: ksz: Make reg_mib_cnt a u8 as it never exceeds 255
Date: Wed, 28 Apr 2021 08:50:54 -0700	[thread overview]
Message-ID: <61ccfbdd-c1d5-a91a-d651-90e6cae1a48e@gmail.com> (raw)
In-Reply-To: <20210428120010.337959-1-colin.king@canonical.com>



On 4/28/2021 5:00 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently the for-loop in ksz8_port_init_cnt is causing a static
> analysis infinite loop warning with the comparison of
> mib->cnt_ptr < dev->reg_mib_cnt. This occurs because mib->cnt_ptr
> is a u8 and dev->reg_mib_cnt is an int and the analyzer determines
> that mib->cnt_ptr potentially can wrap around to zero if the value
> in dev->reg_mib_cnt is > 255. However, this value is never this
> large, it is always less than 256 so make reg_mib_cnt a u8.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

  reply	other threads:[~2021-04-28 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 12:00 [PATCH][next] net: dsa: ksz: Make reg_mib_cnt a u8 as it never exceeds 255 Colin King
2021-04-28 15:50 ` Florian Fainelli [this message]
2021-04-28 21:10 ` patchwork-bot+netdevbpf

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=61ccfbdd-c1d5-a91a-d651-90e6cae1a48e@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.com \
    /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).