[v2,03/14] net/dpaa: remove broken debug macros

Message ID 20240912082643.1532679-4-david.marchand@redhat.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers
Series Use RTE_LOG_LINE in drivers |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Sept. 12, 2024, 8:26 a.m. UTC
Those debug macros never worked as existing callers never passed a
'level' argument.
Remove them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/dpaa/fmlib/fm_ext.h | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)
  

Comments

Thomas Monjalon Oct. 1, 2024, 10:18 a.m. UTC | #1
12/09/2024 10:26, David Marchand:
> Those debug macros never worked as existing callers never passed a
> 'level' argument.
> Remove them.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/net/dpaa/fmlib/fm_ext.h | 21 ++-------------------
>  1 file changed, 2 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/net/dpaa/fmlib/fm_ext.h b/drivers/net/dpaa/fmlib/fm_ext.h
> index 8e7153bdaf..4666fa3b0b 100644
> --- a/drivers/net/dpaa/fmlib/fm_ext.h
> +++ b/drivers/net/dpaa/fmlib/fm_ext.h
> @@ -15,25 +15,8 @@
>  #define MODULE_FM		0x00010000
>  #define __ERR_MODULE__		MODULE_FM
>  
> -/* #define FM_LIB_DBG */
> -
> -#if defined(FM_LIB_DBG)
> -	#define _fml_dbg(fmt, args...) \
> -	rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmlib:%s(): " fmt "\n", \
> -			__func__, ##args)
> -#else
> -	#define _fml_dbg(arg...)
> -#endif
> -
> -/*#define FM_IOCTL_DBG*/
> -
> -#if defined(FM_IOCTL_DBG)
> -	#define _fm_ioctl_dbg(fmt, args...) \
> -	rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmioc:%s(): " fmt "\n", \
> -				__func__, ##args)
> -#else
> -	#define _fm_ioctl_dbg(arg...)
> -#endif
> +#define _fml_dbg(...)
> +#define _fm_ioctl_dbg(...)

Why not removing the calls to these macros?
  
David Marchand Oct. 1, 2024, 12:08 p.m. UTC | #2
On Tue, Oct 1, 2024 at 12:19 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> 12/09/2024 10:26, David Marchand:
> > Those debug macros never worked as existing callers never passed a
> > 'level' argument.
> > Remove them.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Why not removing the calls to these macros?

I was unclear if the fmlib enters the "base driver" category.
So I simply removed macros from the header providing wrappers to dpdk API.

Relooking, I see other changes in this directory, so I agree I may as
well remove those calls.

Hemant, opinion?
  
Hemant Agrawal Oct. 1, 2024, 1 p.m. UTC | #3
On 01-10-2024 17:38, David Marchand wrote:
> On Tue, Oct 1, 2024 at 12:19 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>> 12/09/2024 10:26, David Marchand:
>>> Those debug macros never worked as existing callers never passed a
>>> 'level' argument.
>>> Remove them.
>>>
>>> Signed-off-by: David Marchand <david.marchand@redhat.com>
>> Why not removing the calls to these macros?
> I was unclear if the fmlib enters the "base driver" category.
> So I simply removed macros from the header providing wrappers to dpdk API.
>
> Relooking, I see other changes in this directory, so I agree I may as
> well remove those calls.
>
> Hemant, opinion?
>
Yes, fmlib is a common base library. So, it is better to not remove the 
calls.  Otherwise, we have to maintain the changes from base.

with that

Reviewed-by:  Hemant Agrawal <hemant.agrawal@nxp.com>
  

Patch

diff --git a/drivers/net/dpaa/fmlib/fm_ext.h b/drivers/net/dpaa/fmlib/fm_ext.h
index 8e7153bdaf..4666fa3b0b 100644
--- a/drivers/net/dpaa/fmlib/fm_ext.h
+++ b/drivers/net/dpaa/fmlib/fm_ext.h
@@ -15,25 +15,8 @@ 
 #define MODULE_FM		0x00010000
 #define __ERR_MODULE__		MODULE_FM
 
-/* #define FM_LIB_DBG */
-
-#if defined(FM_LIB_DBG)
-	#define _fml_dbg(fmt, args...) \
-	rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmlib:%s(): " fmt "\n", \
-			__func__, ##args)
-#else
-	#define _fml_dbg(arg...)
-#endif
-
-/*#define FM_IOCTL_DBG*/
-
-#if defined(FM_IOCTL_DBG)
-	#define _fm_ioctl_dbg(fmt, args...) \
-	rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmioc:%s(): " fmt "\n", \
-				__func__, ##args)
-#else
-	#define _fm_ioctl_dbg(arg...)
-#endif
+#define _fml_dbg(...)
+#define _fm_ioctl_dbg(...)
 
 /*
  * @Group	lnx_ioctl_ncsw_grp	NetCommSw Linux User-Space (IOCTL) API