lkml.org 
[lkml]   [2022]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/18] mtd: tests: fix object shared between several modules
Hi,

masahiroy@kernel.org wrote on Wed, 23 Nov 2022 22:11:49 +0900:

> On Sun, Nov 20, 2022 at 8:08 AM Alexander Lobakin <alobakin@pm.me> wrote:
> >
> > mtd_test.o is linked to 8(!) different test modules:
> >
> > > scripts/Makefile.build:252: ./drivers/mtd/tests/Makefile: mtd_test.o
> > > is added to multiple modules: mtd_nandbiterrs mtd_oobtest mtd_pagetest
> > > mtd_readtest mtd_speedtest mtd_stresstest mtd_subpagetest mtd_torturetest
> >
> > Although all of them share one Kconfig option
> > (CONFIG_MTD_TESTS), it's better to not link one object file into
> > several modules (and/or vmlinux).
> > Under certain circumstances, such can lead to the situation fixed by
> > commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects").
> > In this particular case, there's also no need to duplicate the very
> > same object code 8 times.
> >
> > Convert mtd_test.o to a standalone module which will export its
> > functions to the rest.
> >
> > Fixes: a995c792280d ("mtd: tests: rename sources in order to link a helper object")
> > Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
>
> IMHO, Reported-by might be a better fit.
>
>
> I think they can become static inline functions in mtd_test.h
> (at least, mtdtest_relax() is a static inline there), but I am not sure.
>
> Please send this to the MTD list, and consult the maintainer(s).

TBH I don't really mind. These are test modules that you insert to
harden and profile the stack, so whatever makes the robots happy is
fine. Anyway, they are being slowly replaced by userspace tools so we
might eventually get rid of them.

Thanks,
Miquèl

\
 
 \ /
  Last update: 2022-11-23 18:01    [W:0.162 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site