From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Bruce Allan <bruce.w.allan@intel.com>,
netdev@vger.kernel.org, sassmann@redhat.com,
anthony.l.nguyen@intel.com,
Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net-next 13/15] ice: suppress false cppcheck issues
Date: Wed, 14 Apr 2021 17:30:11 -0700 [thread overview]
Message-ID: <20210415003013.19717-14-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210415003013.19717-1-anthony.l.nguyen@intel.com>
From: Bruce Allan <bruce.w.allan@intel.com>
Silence false errors, warnings and style issues reported by cppcheck.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 3 +++
drivers/net/ethernet/intel/ice/ice_nvm.c | 1 +
drivers/net/ethernet/intel/ice/ice_sched.c | 1 +
3 files changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
index 4b83960876f4..06ac9badee77 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
@@ -334,6 +334,7 @@ ice_boost_tcam_handler(u32 sect_type, void *section, u32 index, u32 *offset)
if (sect_type != ICE_SID_RXPARSER_BOOST_TCAM)
return NULL;
+ /* cppcheck-suppress nullPointer */
if (index > ICE_MAX_BST_TCAMS_IN_BUF)
return NULL;
@@ -404,6 +405,7 @@ ice_label_enum_handler(u32 __always_unused sect_type, void *section, u32 index,
if (!section)
return NULL;
+ /* cppcheck-suppress nullPointer */
if (index > ICE_MAX_LABELS_IN_BUF)
return NULL;
@@ -2067,6 +2069,7 @@ ice_match_prop_lst(struct list_head *list1, struct list_head *list2)
count++;
list_for_each_entry(tmp2, list2, list)
chk_count++;
+ /* cppcheck-suppress knownConditionTrueFalse */
if (!count || count != chk_count)
return false;
diff --git a/drivers/net/ethernet/intel/ice/ice_nvm.c b/drivers/net/ethernet/intel/ice/ice_nvm.c
index 75ccbfc07f99..fee37a5844cf 100644
--- a/drivers/net/ethernet/intel/ice/ice_nvm.c
+++ b/drivers/net/ethernet/intel/ice/ice_nvm.c
@@ -644,6 +644,7 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
/* Verify that the simple checksum is zero */
for (i = 0; i < sizeof(tmp); i++)
+ /* cppcheck-suppress objectIndex */
sum += ((u8 *)&tmp)[i];
if (sum) {
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
index 97562051fe14..2f097637e405 100644
--- a/drivers/net/ethernet/intel/ice/ice_sched.c
+++ b/drivers/net/ethernet/intel/ice/ice_sched.c
@@ -988,6 +988,7 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
*num_nodes_added = 0;
while (*num_nodes_added < num_nodes) {
u16 max_child_nodes, num_added = 0;
+ /* cppcheck-suppress unusedVariable */
u32 temp;
status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent,
--
2.26.2
next prev parent reply other threads:[~2021-04-15 0:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 0:29 [PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-14 Tony Nguyen
2021-04-15 0:29 ` [PATCH net-next 01/15] ice: use kernel definitions for IANA protocol ports and ether-types Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 02/15] ice: Drop leading underscores in enum ice_pf_state Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 03/15] ice: Add new VSI states to track netdev alloc/registration Tony Nguyen
2021-04-15 16:39 ` Jakub Kicinski
2021-04-15 0:30 ` [PATCH net-next 04/15] ice: refactor interrupt moderation writes Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 05/15] ice: replace custom AIM algorithm with kernel's DIM library Tony Nguyen
2021-04-15 16:46 ` Jakub Kicinski
2021-04-15 17:03 ` Keller, Jacob E
2021-04-15 17:07 ` Jakub Kicinski
2021-04-15 0:30 ` [PATCH net-next 06/15] ice: manage interrupts during poll exit Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 07/15] ice: refactor ITR data structures Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 08/15] ice: Reimplement module reads used by ethtool Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 09/15] ice: print name in /proc/iomem Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 10/15] ice: use local for consistency Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 11/15] ice: remove unused struct member Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 12/15] ice: Set vsi->vf_id as ICE_INVAL_VFID for non VF VSI types Tony Nguyen
2021-04-15 0:30 ` Tony Nguyen [this message]
2021-04-15 0:30 ` [PATCH net-next 14/15] ice: remove return variable Tony Nguyen
2021-04-15 0:30 ` [PATCH net-next 15/15] ice: reduce scope of variable Tony Nguyen
2021-04-15 23:50 ` [PATCH net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2021-04-14 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=20210415003013.19717-14-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=tonyx.brelinski@intel.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).