[PATCH 2/2] net/nfp: remove useless range checks
Ferruh Yigit
ferruh.yigit at intel.com
Fri Jan 21 15:39:31 CET 2022
On 1/11/2022 2:54 PM, Kevin Traynor wrote:
> On 05/01/2022 10:32, Maxime Gouin wrote:
>> reported by code analysis tool C++test (version 10.4):
>>
Hi Maxime,
Can you please give some information on this tool?
Thanks,
ferruh
>>> /build/dpdk-20.11/drivers/net/nfp/nfpcore/nfp_target.h
>>> 375 Condition "island < 1" is always evaluated to false
>>> 415 Condition "island < 1" is always evaluated to false
>>> 547 Condition "target < 0" is always evaluated to false
>>
>> All of these conditions have the same error. They call
>> NFP_CPP_ID_ISLAND_of or NFP_CPP_ID_TARGET_of which return a uint8_t and
>> put the result in "island" or "target" which are integers. These variables
>> can only contain values between 0 and 255.
>>
>> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
>>
>
> Cc: stable at dpdk.org
>
>> Signed-off-by: Maxime Gouin <maxime.gouin at 6wind.com>
>> Reviewed-by: Olivier Matz <olivier.matz at 6wind.com>
>> ---
>
> Acked-by: Kevin Traynor <ktraynor at redhat.com>
>
For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
Series applied to dpdk-next-net/main, thanks.
More information about the dev
mailing list