>Hello Suman Ghosh, > >The patch ec87f05402f5: "octeontx2-af: Install TC filter rules in >hardware based on priority" from Jul 21, 2023 (linux-next), leads to the >following Smatch static checker warning: > > drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c:860 >otx2_tc_update_mcam_table_del_req() > error: uninitialized symbol 'cntr_val'. [Suman] Hi Dan, I will push a patch fixing the same. > >drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c > 837 static int otx2_tc_update_mcam_table_del_req(struct otx2_nic >*nic, > 838 struct >otx2_flow_config *flow_cfg, > 839 struct otx2_tc_flow >*node) > 840 { > 841 struct list_head *pos, *n; > 842 struct otx2_tc_flow *tmp; > 843 int i = 0, index = 0; > 844 u16 cntr_val; > 845 > 846 /* Find and delete the entry from the list and re- >install > 847 * all the entries from beginning to the index of the > 848 * deleted entry to higher mcam indexes. > 849 */ > 850 list_for_each_safe(pos, n, &flow_cfg->flow_list_tc) { > 851 tmp = list_entry(pos, struct otx2_tc_flow, >list); > 852 if (node == tmp) { > 853 list_del(&tmp->list); > 854 break; > 855 } > 856 > 857 otx2_del_mcam_flow_entry(nic, tmp->entry, >&cntr_val); > >otx2_del_mcam_flow_entry() looks like it can fail. > > 858 tmp->entry++; > 859 tmp->req.entry = tmp->entry; >--> 860 tmp->req.cntr_val = cntr_val; > 861 index++; > 862 } > 863 > 864 list_for_each_safe(pos, n, &flow_cfg->flow_list_tc) { > 865 if (i == index) > 866 break; > 867 > 868 tmp = list_entry(pos, struct otx2_tc_flow, >list); > 869 otx2_add_mcam_flow_entry(nic, &tmp->req); > 870 i++; > 871 } > 872 > 873 return 0; > 874 } > >regards, >dan carpenter