forked from kevintraynor/dpdk-stable-queue-1811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/nfp: remove useless range checks
[ upstream commit a52c79642ab4296763189dd8efadbb679d32c9a0 ] Reported by code analysis tool C++test (version 10.4): > /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: c7e9729 ("net/nfp: support CPP") Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com> Reviewed-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
- Loading branch information
Showing
1 changed file
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters