summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuman Ghosh <sumang@marvell.com>2023-07-27 22:01:01 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-08 08:51:18 +0100
commit10c3d86fea040d4123e569d83a8431a71e36d3d7 (patch)
treef9ba37b3201bb4e5e2a512979a7b5255be4fd8ad
parent1c8f75ee92334d89f1ddada26d47f9caa955f1a4 (diff)
downloadlinux-10c3d86fea040d4123e569d83a8431a71e36d3d7.tar.gz
linux-10c3d86fea040d4123e569d83a8431a71e36d3d7.tar.bz2
linux-10c3d86fea040d4123e569d83a8431a71e36d3d7.zip
octeontx2-af: Initialize 'cntr_val' to fix uninitialized symbol error
commit 222a6c42e9ef131fd20463bf95d7ce7b39bee2f8 upstream. drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c:860 otx2_tc_update_mcam_table_del_req() error: uninitialized symbol 'cntr_val'. Fixes: ec87f05402f5 ("octeontx2-af: Install TC filter rules in hardware based on priority") Signed-off-by: Suman Ghosh <sumang@marvell.com> Link: https://lore.kernel.org/r/20230727163101.2793453-1-sumang@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
index 8e67409af537..bb77ab7ddfef 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
@@ -842,7 +842,7 @@ static int otx2_tc_update_mcam_table_del_req(struct otx2_nic *nic,
struct list_head *pos, *n;
struct otx2_tc_flow *tmp;
int i = 0, index = 0;
- u16 cntr_val;
+ u16 cntr_val = 0;
/* Find and delete the entry from the list and re-install
* all the entries from beginning to the index of the
@@ -881,7 +881,7 @@ static int otx2_tc_update_mcam_table_add_req(struct otx2_nic *nic,
int mcam_idx = flow_cfg->max_flows - flow_cfg->nr_flows - 1;
struct otx2_tc_flow *tmp;
int list_idx, i;
- u16 cntr_val;
+ u16 cntr_val = 0;
/* Find the index of the entry(list_idx) whose priority
* is greater than the new entry and re-install all