mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Ricardo B. Marliere" <ricardo@marliere.net>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvmem: core: make nvmem_layout_bus_type const
Date: Thu, 15 Feb 2024 08:49:14 +0100	[thread overview]
Message-ID: <2024021503-eardrum-manhandle-3f65@gregkh> (raw)
In-Reply-To: <20240214-bus_cleanup-nvmem2-v1-1-97960007da18@marliere.net>

On Wed, Feb 14, 2024 at 04:04:57PM -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> a const *"), the driver core can properly handle constant struct
> bus_type, move the nvmem_layout_bus_type variable to be a constant
> structure as well, placing it into read-only memory which can not be
> modified at runtime.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> ---
>  drivers/nvmem/layouts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvmem/layouts.c b/drivers/nvmem/layouts.c
> index 6a6aa58369ff..8b5e2de138eb 100644
> --- a/drivers/nvmem/layouts.c
> +++ b/drivers/nvmem/layouts.c
> @@ -45,7 +45,7 @@ static void nvmem_layout_bus_remove(struct device *dev)
>  	return drv->remove(layout);
>  }
>  
> -static struct bus_type nvmem_layout_bus_type = {
> +static const struct bus_type nvmem_layout_bus_type = {
>  	.name		= "nvmem-layout",
>  	.match		= nvmem_layout_bus_match,
>  	.probe		= nvmem_layout_bus_probe,
> 
> ---
> base-commit: 2c8df24cc166478910c4e9e870adf44d157330fa
> change-id: 20240214-bus_cleanup-nvmem2-b77804172a0b
> 


Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

  reply	other threads:[~2024-02-15  7:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 19:04 Ricardo B. Marliere
2024-02-15  7:49 ` Greg Kroah-Hartman [this message]
2024-02-21  7:10 ` Srinivas Kandagatla

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=2024021503-eardrum-manhandle-3f65@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ricardo@marliere.net \
    --cc=srinivas.kandagatla@linaro.org \
    /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

all inboxes | Powered by JetHome®