public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Chen-Yu Tsai <wens@csie.org>,
	Samuel Holland <samuel@sholland.org>,
	"Ricardo B. Marliere" <ricardo@marliere.net>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Ricardo B. Marliere" <ricardo@marliere.net>
Subject: Re: [PATCH] bus: sunxi-rsb: make sunxi_rsb_bus const
Date: Mon, 05 Feb 2024 19:14:09 +0100	[thread overview]
Message-ID: <10412979.nUPlyArG6x@jernej-laptop> (raw)
In-Reply-To: <20240204-bus_cleanup-bus-v1-1-bda309c4b829@marliere.net>

Dne nedelja, 04. februar 2024 ob 16:56:44 CET je Ricardo B. Marliere napisal(a):
> Now that the driver core can properly handle constant struct bus_type,
> move the sunxi_rsb_bus 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>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/bus/sunxi-rsb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
> index fd3e9d82340a..1e29ba76615d 100644
> --- a/drivers/bus/sunxi-rsb.c
> +++ b/drivers/bus/sunxi-rsb.c
> @@ -128,7 +128,7 @@ struct sunxi_rsb {
>  };
>  
>  /* bus / slave device related functions */
> -static struct bus_type sunxi_rsb_bus;
> +static const struct bus_type sunxi_rsb_bus;
>  
>  static int sunxi_rsb_device_match(struct device *dev, struct device_driver *drv)
>  {
> @@ -177,7 +177,7 @@ static int sunxi_rsb_device_modalias(const struct device *dev, struct kobj_ueven
>  	return of_device_uevent_modalias(dev, env);
>  }
>  
> -static struct bus_type sunxi_rsb_bus = {
> +static const struct bus_type sunxi_rsb_bus = {
>  	.name		= RSB_CTRL_NAME,
>  	.match		= sunxi_rsb_device_match,
>  	.probe		= sunxi_rsb_device_probe,
> 
> ---
> base-commit: 38ed19495066966979ba821b9e0f549ad5ea620d
> change-id: 20240204-bus_cleanup-bus-de90b25d7ce6
> 
> Best regards,
> 





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-02-05 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 15:56 [PATCH] bus: sunxi-rsb: make sunxi_rsb_bus const Ricardo B. Marliere
2024-02-05 12:50 ` Greg Kroah-Hartman
2024-02-05 18:14 ` Jernej Škrabec [this message]
2024-02-11 20:25 ` Jernej Škrabec

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=10412979.nUPlyArG6x@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=ricardo@marliere.net \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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