Commit b370245b authored by Bruce Allan's avatar Bruce Allan Committed by Tony Nguyen

ice: suppress false cppcheck issues

Silence false errors, warnings and style issues reported by cppcheck.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent c931c782
...@@ -334,6 +334,7 @@ ice_boost_tcam_handler(u32 sect_type, void *section, u32 index, u32 *offset) ...@@ -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) if (sect_type != ICE_SID_RXPARSER_BOOST_TCAM)
return NULL; return NULL;
/* cppcheck-suppress nullPointer */
if (index > ICE_MAX_BST_TCAMS_IN_BUF) if (index > ICE_MAX_BST_TCAMS_IN_BUF)
return NULL; return NULL;
...@@ -404,6 +405,7 @@ ice_label_enum_handler(u32 __always_unused sect_type, void *section, u32 index, ...@@ -404,6 +405,7 @@ ice_label_enum_handler(u32 __always_unused sect_type, void *section, u32 index,
if (!section) if (!section)
return NULL; return NULL;
/* cppcheck-suppress nullPointer */
if (index > ICE_MAX_LABELS_IN_BUF) if (index > ICE_MAX_LABELS_IN_BUF)
return NULL; return NULL;
...@@ -2067,6 +2069,7 @@ ice_match_prop_lst(struct list_head *list1, struct list_head *list2) ...@@ -2067,6 +2069,7 @@ ice_match_prop_lst(struct list_head *list1, struct list_head *list2)
count++; count++;
list_for_each_entry(tmp2, list2, list) list_for_each_entry(tmp2, list2, list)
chk_count++; chk_count++;
/* cppcheck-suppress knownConditionTrueFalse */
if (!count || count != chk_count) if (!count || count != chk_count)
return false; return false;
......
...@@ -644,6 +644,7 @@ ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank, ...@@ -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 */ /* Verify that the simple checksum is zero */
for (i = 0; i < sizeof(tmp); i++) for (i = 0; i < sizeof(tmp); i++)
/* cppcheck-suppress objectIndex */
sum += ((u8 *)&tmp)[i]; sum += ((u8 *)&tmp)[i];
if (sum) { if (sum) {
......
...@@ -988,6 +988,7 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi, ...@@ -988,6 +988,7 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
*num_nodes_added = 0; *num_nodes_added = 0;
while (*num_nodes_added < num_nodes) { while (*num_nodes_added < num_nodes) {
u16 max_child_nodes, num_added = 0; u16 max_child_nodes, num_added = 0;
/* cppcheck-suppress unusedVariable */
u32 temp; u32 temp;
status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent, status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment