[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2023122020-tastiness-counting-788f@gregkh>
Date: Wed, 20 Dec 2023 08:24:17 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Russell King <linux@...linux.org.uk>, Arnd Bergmann <arnd@...db.de>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH] [ARM] locomo: make locomo_bus_type constant and static
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@...linux.org.uk>
> > Cc: Arnd Bergmann <arnd@...db.de>
> > Cc: "Uwe Kleine-König" <u.kleine-koenig@...gutronix.de>
> > Cc: Randy Dunlap <rdunlap@...radead.org>
> > Cc: linux-arm-kernel@...ts.infradead.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.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
Powered by blists - more mailing lists