public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Abhijit Gangurde <abhijit.gangurde@amd.com>
Cc: nikhil.agarwal@amd.com, Nipun.Gupta@amd.com,
	geert@linux-m68k.org, linux-kernel@vger.kernel.org, git@amd.com,
	michal.simek@amd.com
Subject: Re: [PATCH 1/1] cdx: Rename MCDI_LOGGING to CDX_MCDI_LOGGING
Date: Wed, 17 May 2023 10:53:45 +0200	[thread overview]
Message-ID: <2023051703-evident-repaint-52c9@gregkh> (raw)
In-Reply-To: <20230517084404.187463-1-abhijit.gangurde@amd.com>

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@amd.com>
> Suggested-by: Geert Uytterhoeven <geert@linux-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

  reply	other threads:[~2023-05-17  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  8:44 [PATCH 1/1] cdx: Rename MCDI_LOGGING to CDX_MCDI_LOGGING Abhijit Gangurde
2023-05-17  8:53 ` Greg KH [this message]
2023-05-24  7:07   ` Gangurde, Abhijit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023051703-evident-repaint-52c9@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Nipun.Gupta@amd.com \
    --cc=abhijit.gangurde@amd.com \
    --cc=geert@linux-m68k.org \
    --cc=git@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=nikhil.agarwal@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox