[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023051703-evident-repaint-52c9@gregkh>
Date: Wed, 17 May 2023 10:53:45 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Abhijit Gangurde <abhijit.gangurde@....com>
Cc: nikhil.agarwal@....com, Nipun.Gupta@....com, geert@...ux-m68k.org,
linux-kernel@...r.kernel.org, git@....com, michal.simek@....com
Subject: Re: [PATCH 1/1] cdx: Rename MCDI_LOGGING to CDX_MCDI_LOGGING
On Wed, May 17, 2023 at 02:14:03PM +0530, Abhijit Gangurde wrote:
> MCDI_LOGGING is too generic considering other MCDI users
> SFC_MCDI_LOGGING and SFC_SIENA_MCDI_LOGGING. Rename it to
> CDX_MCDI_LOGGING makes it more domain specific.
>
> Signed-off-by: Abhijit Gangurde <abhijit.gangurde@....com>
> Suggested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
> drivers/cdx/controller/Kconfig | 2 +-
> drivers/cdx/controller/mcdi.c | 16 ++++++++--------
> drivers/cdx/controller/mcdi.h | 2 +-
> 3 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/cdx/controller/Kconfig b/drivers/cdx/controller/Kconfig
> index c3e3b9ff8dfe..e7014e9819ea 100644
> --- a/drivers/cdx/controller/Kconfig
> +++ b/drivers/cdx/controller/Kconfig
> @@ -18,7 +18,7 @@ config CDX_CONTROLLER
>
> If unsure, say N.
>
> -config MCDI_LOGGING
> +config CDX_MCDI_LOGGING
This is fine, but:
> bool "MCDI Logging for the CDX controller"
> depends on CDX_CONTROLLER
> help
> diff --git a/drivers/cdx/controller/mcdi.c b/drivers/cdx/controller/mcdi.c
> index a211a2ca762e..3a1fbc3d409e 100644
> --- a/drivers/cdx/controller/mcdi.c
> +++ b/drivers/cdx/controller/mcdi.c
> @@ -31,7 +31,7 @@ struct cdx_mcdi_copy_buffer {
> struct cdx_dword buffer[DIV_ROUND_UP(MCDI_CTL_SDU_LEN_MAX, 4)];
> };
>
> -#ifdef CONFIG_MCDI_LOGGING
> +#ifdef CONFIG_CDX_MCDI_LOGGING
> #define LOG_LINE_MAX (1024 - 32)
> #endif
>
> @@ -119,7 +119,7 @@ int cdx_mcdi_init(struct cdx_mcdi *cdx)
> mcdi = cdx_mcdi_if(cdx);
> mcdi->cdx = cdx;
>
> -#ifdef CONFIG_MCDI_LOGGING
> +#ifdef CONFIG_CDX_MCDI_LOGGING
> mcdi->logging_buffer = kmalloc(LOG_LINE_MAX, GFP_KERNEL);
> if (!mcdi->logging_buffer)
> goto fail2;
This mess of #ifdef in the .c files is not ok.
Please move all of this "logging" stuff out into proper .h definitions
so that it's not in the .c code at all.
thanks,
greg k-h
Powered by blists - more mailing lists