From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH] [ARM] locomo: make locomo_bus_type constant and static
Date: Wed, 20 Dec 2023 08:24:17 +0100 [thread overview]
Message-ID: <2023122020-tastiness-counting-788f@gregkh> (raw)
In-Reply-To: <amnspbf2euablvmtl2bpng423cnkbjkvtsf7dhqmoyrzbgtpwb@3rgazgmuqjcx>
On Tue, Dec 19, 2023 at 10:21:20PM +0100, Uwe Kleine-König wrote:
> On Tue, Dec 19, 2023 at 07:33:06PM +0100, Greg Kroah-Hartman wrote:
> > Now that the driver core can properly handle constant struct bus_type,
> > move the locomo_bus_type variable to be a constant structure as well,
> > placing it into read-only memory which can not be modified at runtime.
> >
> > It's also never used outside of arch/arm/common/locomo.c so make it
> > static and don't export it as no one is using it.
> >
> > Cc: Russell King <linux@armlinux.org.uk>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: linux-arm-kernel@lists.infradead.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> > arch/arm/common/locomo.c | 4 +++-
> > arch/arm/include/asm/hardware/locomo.h | 2 --
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
> > index 70480dd9e96d..6d0c9f7268ba 100644
> > --- a/arch/arm/common/locomo.c
> > +++ b/arch/arm/common/locomo.c
> > @@ -68,6 +68,8 @@ struct locomo {
> > #endif
> > };
> >
> > +static const struct bus_type locomo_bus_type;
> > +
>
> If you move up locomo_bus_type together with its three callbacks before
> locomo_init_one_child, you don't need the extra declaration here.
I was trying to go for "least intrusive and most obvious change
possible" here, given that this file hasn't been touched in over a
decade by anyone else for anything other than api changes. And even
then, it was just a tiny fix, this is a very old driver, what's the odds
that it's even used anymore?
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-12-20 7:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 18:33 [PATCH] [ARM] locomo: make locomo_bus_type constant and static Greg Kroah-Hartman
2023-12-19 19:27 ` Arnd Bergmann
2023-12-19 21:21 ` Uwe Kleine-König
2023-12-20 7:24 ` Greg Kroah-Hartman [this message]
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=2023122020-tastiness-counting-788f@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=rdunlap@infradead.org \
--cc=u.kleine-koenig@pengutronix.de \
/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