drivers/net/ethernet/broadcom/bnxt/bnxt.c:5662:5-7: Unneeded variable: "rc". Return " 0" on line 5677
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d0b3c8aa5e37775cd7c3ac07b256218df0fd6678 commit: 96c9bedc755ed1fa6e35d37328ddbcb439c93c4c [11866/12403] bnxt_en: Refactor L2 filter alloc/free firmware commands. config: arm64-randconfig-r053-20240104 (https://download.01.org/0day-ci/archive/20240104/[email protected]/config) compiler: aarch64-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:5662:5-7: Unneeded variable: "rc". Return " 0" on line 5677
vim +5662 drivers/net/ethernet/broadcom/bnxt/bnxt.c
5658
5659 static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp)
5660 {
5661 u16 i, j, num_of_vnics = 1; /* only vnic 0 supported */
> 5662 int rc = 0;
5663
5664 /* Any associated ntuple filters will also be cleared by firmware. */
5665 for (i = 0; i < num_of_vnics; i++) {
5666 struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
5667
5668 for (j = 0; j < vnic->uc_filter_count; j++) {
5669 struct bnxt_l2_filter *fltr = vnic->l2_filters[j];
5670
5671 bnxt_hwrm_l2_filter_free(bp, fltr);
5672 bnxt_del_l2_filter(bp, fltr);
5673 }
5674 vnic->uc_filter_count = 0;
5675 }
5676
> 5677 return rc; 5678 }
5679
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki