[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61ccfbdd-c1d5-a91a-d651-90e6cae1a48e@gmail.com>
Date: Wed, 28 Apr 2021 08:50:54 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Colin King <colin.king@...onical.com>,
Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Marek Vasut <marex@...x.de>,
Tristram Ha <Tristram.Ha@...rochip.com>, netdev@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] net: dsa: ksz: Make reg_mib_cnt a u8 as it never
exceeds 255
On 4/28/2021 5:00 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.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@...il.com>
--
Florian
Powered by blists - more mailing lists