diff mbox series

[net-next,1/3] bnxt_en: Remove unneeded variable in bnxt_hwrm_clear_vnic_filter()

Message ID 20240105235439.28282-2-michael.chan@broadcom.com (mailing list archive)
State Accepted
Commit 1ef4cacaae2f907db79faea4110ef90545467b7c
Delegated to: Netdev Maintainers
Headers show
Series bnxt_en: ntuple filter fixes | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1082 this patch: 1082
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1109 this patch: 1109
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1111 this patch: 1111
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Michael Chan Jan. 5, 2024, 11:54 p.m. UTC
After recent refactoring, this function doesn't return error any
more.  Remove the unneeded rc variable and change the function to
void.  The caller is not checking for the return value.

Fixes: 96c9bedc755e ("bnxt_en: Refactor L2 filter alloc/free firmware commands.")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401041942.qrB1amZM-lkp@intel.com/
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Simon Horman Jan. 8, 2024, 10:23 a.m. UTC | #1
On Fri, Jan 05, 2024 at 03:54:37PM -0800, Michael Chan wrote:
> After recent refactoring, this function doesn't return error any
> more.  Remove the unneeded rc variable and change the function to
> void.  The caller is not checking for the return value.
> 
> Fixes: 96c9bedc755e ("bnxt_en: Refactor L2 filter alloc/free firmware commands.")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202401041942.qrB1amZM-lkp@intel.com/
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>

Hi Michael,

I'm not sure this is a bug fix, so I might have cited
the commit using something like "Introduced by commit ..."
rather than a Fixes tag.

But the fix isn't going to propagate very far anyway,
as the cited commit is currently only in net-next.
So perhaps it is fine as is.

In any case, I agree that this is a nice update to the code.

Reviewed-by: Simon Horman <horms@kernel.org>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index b70ddd33e9ed..fb5af8a34c8f 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -5752,10 +5752,9 @@  static int bnxt_hwrm_set_vnic_filter(struct bnxt *bp, u16 vnic_id, u16 idx,
 	return rc;
 }
 
-static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp)
+static void bnxt_hwrm_clear_vnic_filter(struct bnxt *bp)
 {
 	u16 i, j, num_of_vnics = 1; /* only vnic 0 supported */
-	int rc = 0;
 
 	/* Any associated ntuple filters will also be cleared by firmware. */
 	for (i = 0; i < num_of_vnics; i++) {
@@ -5769,8 +5768,6 @@  static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp)
 		}
 		vnic->uc_filter_count = 0;
 	}
-
-	return rc;
 }
 
 #define BNXT_DFLT_TUNL_TPA_BMAP				\