[PATCH v1 1/1] net/qede: fix redundant condition in debug code
Jerin Jacob
jerinjacobk at gmail.com
Mon Jan 10 08:19:58 CET 2022
On Tue, Nov 30, 2021 at 10:29 PM Anatoly Burakov
<anatoly.burakov at intel.com> wrote:
>
> Expression "a && 1" is equivalent to just "a", so fix the accidental
> inclusion of a literal in code.
>
> Cc: stable at dpdk.org
>
> Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
> Cc: rmody at marvell.com
Hi @Rasesh Mody @Devendra Singh Rawat @Igor Russkikh
Please review this patch to merge.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>
> Notes:
> This isn't a bug, this is just a syntactic anomaly, likely a remnant of some
> kind of debugging code.
>
> This issue was found with Control Flag [1], which i ran on DPDK codebase just
> out of curiosity. This was the only issue worth addressing that the tool
> produced output for.
>
> [1] https://github.com/IntelLabs/control-flag
>
> drivers/net/qede/qede_debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
> index 2297d245c4..ba807ea680 100644
> --- a/drivers/net/qede/qede_debug.c
> +++ b/drivers/net/qede/qede_debug.c
> @@ -3522,7 +3522,7 @@ static enum dbg_status qed_grc_dump(struct ecore_hwfn *p_hwfn,
>
> /* Dump MCP HW Dump */
> if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MCP_HW_DUMP) &&
> - !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP) && 1)
> + !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP))
> offset += qed_grc_dump_mcp_hw_dump(p_hwfn,
> p_ptt,
> dump_buf + offset, dump);
> --
> 2.25.1
>
More information about the stable
mailing list