Message ID | 20211012074645.12864-1-sakiwit@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 50515cac8d0ea2026db2f0cb456bfa51d5e8e85f |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: qed_debug: fix check of false (grc_param < 0) expression | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Single patches do not need cover letters |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 5 of 5 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | No Fixes tag |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | No static functions without inline keyword in header files |
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Tue, 12 Oct 2021 01:46:45 -0600 you wrote: > From: Jean Sacren <sakiwit@gmail.com> > > The type of enum dbg_grc_params has the enumerator list starting from 0. > When grc_param is declared by enum dbg_grc_params, (grc_param < 0) is > always false. We should remove the check of this expression. > > Signed-off-by: Jean Sacren <sakiwit@gmail.com> > > [...] Here is the summary with links: - [net-next] net: qed_debug: fix check of false (grc_param < 0) expression https://git.kernel.org/netdev/net-next/c/50515cac8d0e You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c index f6198b9a1b02..e3edca187ddf 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_debug.c +++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c @@ -5256,7 +5256,7 @@ enum dbg_status qed_dbg_grc_config(struct qed_hwfn *p_hwfn, */ qed_dbg_grc_init_params(p_hwfn); - if (grc_param >= MAX_DBG_GRC_PARAMS || grc_param < 0) + if (grc_param >= MAX_DBG_GRC_PARAMS) return DBG_STATUS_INVALID_ARGS; if (val < s_grc_param_defs[grc_param].min || val > s_grc_param_defs[grc_param].max)