From: Dave Jiang <dave.jiang@intel.com>
To: "Ricardo B. Marliere" <ricardo@marliere.net>,
Jon Mason <jdmason@kudzu.us>, Allen Hubbe <allenbh@gmail.com>
Cc: ntb@lists.linux.dev, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/2] ntb: ntb_transport: make ntb_transport_bus const
Date: Mon, 5 Feb 2024 10:23:24 -0700 [thread overview]
Message-ID: <98ff5cce-a0bb-4ee6-839f-ce64589ffee6@intel.com> (raw)
In-Reply-To: <20240204-bus_cleanup-ntb-v1-1-155184f60d5f@marliere.net>
On 2/4/24 9:22 AM, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the ntb_transport_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>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/ntb/ntb_transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
> index f9e7847a378e..0291d80611dc 100644
> --- a/drivers/ntb/ntb_transport.c
> +++ b/drivers/ntb/ntb_transport.c
> @@ -314,7 +314,7 @@ static void ntb_transport_bus_remove(struct device *dev)
> put_device(dev);
> }
>
> -static struct bus_type ntb_transport_bus = {
> +static const struct bus_type ntb_transport_bus = {
> .name = "ntb_transport",
> .match = ntb_transport_bus_match,
> .probe = ntb_transport_bus_probe,
>
next prev parent reply other threads:[~2024-02-05 17:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-04 16:21 [PATCH 0/2] ntb: struct bus_type cleanup Ricardo B. Marliere
2024-02-04 16:22 ` [PATCH 1/2] ntb: ntb_transport: make ntb_transport_bus const Ricardo B. Marliere
2024-02-05 17:23 ` Dave Jiang [this message]
2024-02-04 16:22 ` [PATCH 2/2] ntb: core: make ntb_bus const Ricardo B. Marliere
2024-02-05 17:24 ` Dave Jiang
2024-02-05 12:49 ` [PATCH 0/2] ntb: struct bus_type cleanup Greg Kroah-Hartman
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=98ff5cce-a0bb-4ee6-839f-ce64589ffee6@intel.com \
--to=dave.jiang@intel.com \
--cc=allenbh@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jdmason@kudzu.us \
--cc=linux-kernel@vger.kernel.org \
--cc=ntb@lists.linux.dev \
--cc=ricardo@marliere.net \
/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