[PATCH 01/20] mtd: rawnand: txx9ndfmc: Mark driver struct with __refdata to prevent section mismatch warning

Masahiro Yamada masahiroy at kernel.org
Tue Oct 17 03:20:19 PDT 2023


On Mon, Oct 16, 2023 at 7:21 PM Uwe Kleine-König
<u.kleine-koenig at pengutronix.de> wrote:
>
> On Mon, Oct 16, 2023 at 11:25:44AM +0200, Arnd Bergmann wrote:
> > On Mon, Oct 9, 2023, at 12:30, Uwe Kleine-König wrote:
> > > On Mon, Oct 09, 2023 at 10:43:46AM +0200, Arnd Bergmann wrote:
> > >
> > > only a slight correction: As not having a remove callback can be fine
> > > and platform_remove() only calls .remove (or .remove_new) when non-NULL
> > > we're not hitting a NULL pointer dereference in the presence of
> > >
> > >     .remove = __exit_p(somefunc),
> > >
> > > But a problem can arise later if some resource isn't properly freed and
> > > so it might be used at a later point in time which then most likely
> > > oopses.
> > >
> > > I didn't double check Arnd's list, but otherwise I agree to his
> > > analysis.
> >
> > Hi Uwe,
> >
> > Based on a few days of randconfig build testing, the patch
> > below addresses the remaining warnings I get for arm, arm64 and
> > x86 on linux-next. This is a shorter list than the ones that
> > I found in theory, possibly because some of the other ones
> > are only used in built-in code, or because they are never used
> > on these three architectures.
> >
> > Have you already sent patches for (some of) these?
> >
> >       Arnd
> >
> >  drivers/char/hw_random/mxc-rnga.c                                 | 2 +-
> >  drivers/gpu/drm/bridge/ti-tpd12s015.c                             | 4 ++--
> >  drivers/hwmon/smsc47m1.c                                          | 2 +-
> >  drivers/hwtracing/coresight/coresight-etm4x-core.c                | 8 ++++----
> >  drivers/media/i2c/et8ek8/et8ek8_driver.c                          | 4 ++--
> >  drivers/memory/emif.c                                             | 2 +-
> >  drivers/mmc/host/davinci_mmc.c                                    | 2 +-
> >  drivers/mtd/nand/raw/txx9ndfmc.c                                  | 2 +-
>
> The txx9ndfmc driver was fixed as part of this series, but Miquèl didn't
> take the patch, I guess because he wants it to be converted to
> module_platform_driver().


So, there are two ways for fixing, and it is
up to subsystem maintainers?




A question is, is module_platform_driver_probe()
still worth supporting?






-- 
Best Regards
Masahiro Yamada



More information about the linux-mtd mailing list