DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 1/1] net/qede: fix redundant condition in debug code
@ 2021-11-30 16:59 Anatoly Burakov
  2022-01-10  7:19 ` Jerin Jacob
  2022-01-10  8:43 ` [EXT] " Rasesh Mody
  0 siblings, 2 replies; 6+ messages in thread
From: Anatoly Burakov @ 2021-11-30 16:59 UTC (permalink / raw)
  To: dev, Rasesh Mody, Devendra Singh Rawat, Igor Russkikh; +Cc: stable

Expression "a && 1" is equivalent to just "a", so fix the accidental
inclusion of a literal in code.

Cc: stable@dpdk.org

Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
Cc: rmody@marvell.com

Signed-off-by: Anatoly Burakov <anatoly.burakov@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 1/1] net/qede: fix redundant condition in debug code
  2021-11-30 16:59 [PATCH v1 1/1] net/qede: fix redundant condition in debug code Anatoly Burakov
@ 2022-01-10  7:19 ` Jerin Jacob
  2022-01-10  7:35   ` [EXT] " Devendra Singh Rawat
  2022-01-10  8:15   ` Igor Russkikh
  2022-01-10  8:43 ` [EXT] " Rasesh Mody
  1 sibling, 2 replies; 6+ messages in thread
From: Jerin Jacob @ 2022-01-10  7:19 UTC (permalink / raw)
  To: Anatoly Burakov
  Cc: dpdk-dev, Rasesh Mody, Devendra Singh Rawat, Igor Russkikh, dpdk stable

On Tue, Nov 30, 2021 at 10:29 PM Anatoly Burakov
<anatoly.burakov@intel.com> wrote:
>
> Expression "a && 1" is equivalent to just "a", so fix the accidental
> inclusion of a literal in code.
>
> Cc: stable@dpdk.org
>
> Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
> Cc: rmody@marvell.com

Hi @Rasesh Mody @Devendra Singh Rawat  @Igor Russkikh

Please review this patch to merge.


>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] Re: [PATCH v1 1/1] net/qede: fix redundant condition in debug code
  2022-01-10  7:19 ` Jerin Jacob
@ 2022-01-10  7:35   ` Devendra Singh Rawat
  2022-01-10  8:15   ` Igor Russkikh
  1 sibling, 0 replies; 6+ messages in thread
From: Devendra Singh Rawat @ 2022-01-10  7:35 UTC (permalink / raw)
  To: Jerin Jacob, Anatoly Burakov; +Cc: dpdk-dev, Rasesh Mody, dpdk stable



> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Monday, January 10, 2022 12:50 PM
> To: Anatoly Burakov <anatoly.burakov@intel.com>
> Cc: dpdk-dev <dev@dpdk.org>; Rasesh Mody <rmody@marvell.com>;
> Devendra Singh Rawat <dsinghrawat@marvell.com>; Igor Russkikh
> <irusskikh@marvell.com>; dpdk stable <stable@dpdk.org>
> Subject: [EXT] Re: [PATCH v1 1/1] net/qede: fix redundant condition in debug
> code
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Tue, Nov 30, 2021 at 10:29 PM Anatoly Burakov
> <anatoly.burakov@intel.com> wrote:
> >
> > Expression "a && 1" is equivalent to just "a", so fix the accidental
> > inclusion of a literal in code.
> >
> > Cc: stable@dpdk.org
> >
> > Fixes: ec55c118792b ("net/qede: add infrastructure for debug data
> collection")
> > Cc: rmody@marvell.com
> 
> Hi @Rasesh Mody @Devendra Singh Rawat  @Igor Russkikh
> 
> Please review this patch to merge.
> 
> 
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@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://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_IntelLabs_control-
> 2Dflag&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=iWi6e5iy4mFBFqTG1Ch
> Syc_IBZ4tMsC6Dc-2s-Bibs0&m=WqaBCeO-fo40cdvFLvtypkt6kdMjkQjWb5ye-
> OKaU6_NyhRAIa826WfjkJPsGWzE&s=HCbK75ncfGCoqDF4S3h8Ik_HVKwTzN8
> bL4DOGgILGeE&e=
> >
> >  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
> >

Thanks.

Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [EXT] Re: [PATCH v1 1/1] net/qede: fix redundant condition in debug code
  2022-01-10  7:19 ` Jerin Jacob
  2022-01-10  7:35   ` [EXT] " Devendra Singh Rawat
@ 2022-01-10  8:15   ` Igor Russkikh
  1 sibling, 0 replies; 6+ messages in thread
From: Igor Russkikh @ 2022-01-10  8:15 UTC (permalink / raw)
  To: Jerin Jacob, Anatoly Burakov
  Cc: dpdk-dev, Rasesh Mody, Devendra Singh Rawat, dpdk stable


> On Tue, Nov 30, 2021 at 10:29 PM Anatoly Burakov
> <anatoly.burakov@intel.com> wrote:
>>
>> Expression "a && 1" is equivalent to just "a", so fix the accidental
>> inclusion of a literal in code.
>>
>> Cc: stable@dpdk.org
>>
>> Fixes: ec55c118792b ("net/qede: add infrastructure for debug data 
>> collection")
>> Cc: rmody@marvell.com
> 
> Hi @Rasesh Mody @Devendra Singh Rawat  @Igor Russkikh
> 
> Please review this patch to merge.
> 
> 
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

Reviewed-by: Igor Russkikh <irusskikh@marvell.com>

Thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [EXT] [PATCH v1 1/1] net/qede: fix redundant condition in debug code
  2021-11-30 16:59 [PATCH v1 1/1] net/qede: fix redundant condition in debug code Anatoly Burakov
  2022-01-10  7:19 ` Jerin Jacob
@ 2022-01-10  8:43 ` Rasesh Mody
  2022-01-11 12:04   ` Jerin Jacob
  1 sibling, 1 reply; 6+ messages in thread
From: Rasesh Mody @ 2022-01-10  8:43 UTC (permalink / raw)
  To: 'Anatoly Burakov', dev, Devendra Singh Rawat, Igor Russkikh
  Cc: stable

> From: Anatoly Burakov <anatoly.burakov@intel.com>
> Sent: Tuesday, November 30, 2021 10:29 PM
> 
> External Email
> 
> ----------------------------------------------------------------------
> Expression "a && 1" is equivalent to just "a", so fix the accidental inclusion of
> a literal in code.
> 
> Cc: stable@dpdk.org
> 
> Fixes: ec55c118792b ("net/qede: add infrastructure for debug data
> collection")
> Cc: rmody@marvell.com
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

Acked-by: Rasesh Mody <rmody@marvell.com>

Thanks! 

> ---
> 
> 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://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_IntelLabs_control-
> 2Dflag&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Vhi2FR3R84xPMUtUhj
> NPxoiMSxcj1IW0xDKEoZ0F00o&m=OrZLdoVFyT0inpO-NpRW-
> bqCiG9lrnzODBoic5Pwb8qrKh_6y0JbHFKrzJ6vHBQH&s=d76wgQiSey5O9D5N7
> HhUGNvReAzVZpe4wmjHgXhJI78&e=
> 
>  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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [EXT] [PATCH v1 1/1] net/qede: fix redundant condition in debug code
  2022-01-10  8:43 ` [EXT] " Rasesh Mody
@ 2022-01-11 12:04   ` Jerin Jacob
  0 siblings, 0 replies; 6+ messages in thread
From: Jerin Jacob @ 2022-01-11 12:04 UTC (permalink / raw)
  To: Rasesh Mody, Ferruh Yigit
  Cc: Anatoly Burakov, dev, Devendra Singh Rawat, Igor Russkikh, stable

On Mon, Jan 10, 2022 at 2:13 PM Rasesh Mody <rmody@marvell.com> wrote:
>
> > From: Anatoly Burakov <anatoly.burakov@intel.com>
> > Sent: Tuesday, November 30, 2021 10:29 PM
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Expression "a && 1" is equivalent to just "a", so fix the accidental inclusion of
> > a literal in code.
> >
> > Cc: stable@dpdk.org
> >
> > Fixes: ec55c118792b ("net/qede: add infrastructure for debug data
> > collection")
> > Cc: rmody@marvell.com
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
> Acked-by: Rasesh Mody <rmody@marvell.com>

Applied to dpdk-next-net-mrvl/for-next-net. Thanks


>
> Thanks!
>
> > ---
> >
> > 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://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__github.com_IntelLabs_control-
> > 2Dflag&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Vhi2FR3R84xPMUtUhj
> > NPxoiMSxcj1IW0xDKEoZ0F00o&m=OrZLdoVFyT0inpO-NpRW-
> > bqCiG9lrnzODBoic5Pwb8qrKh_6y0JbHFKrzJ6vHBQH&s=d76wgQiSey5O9D5N7
> > HhUGNvReAzVZpe4wmjHgXhJI78&e=
> >
> >  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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-11 12:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 16:59 [PATCH v1 1/1] net/qede: fix redundant condition in debug code Anatoly Burakov
2022-01-10  7:19 ` Jerin Jacob
2022-01-10  7:35   ` [EXT] " Devendra Singh Rawat
2022-01-10  8:15   ` Igor Russkikh
2022-01-10  8:43 ` [EXT] " Rasesh Mody
2022-01-11 12:04   ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).