lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ccjng5mrvqngfg6eujq6mtl6dj2sz5vsqvjoqz6gm5ntcibduz@wqoc6zhchrvv>
Date: Tue, 25 Feb 2025 21:17:35 +0100
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Arnd Bergmann <arnd@...nel.org>, 
	Dmitry Torokhov <dmitry.torokhov@...il.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, 
	Alexandre Torgue <alexandre.torgue@...s.st.com>, Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, 
	Yu Jiaoliang <yujiaoliang@...o.com>, Oliver Graute <oliver.graute@...oconnector.com>, 
	linux-input@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] Input: stmpe-ts - mark OF related data as maybe
 unused

Hello Arnd,

On Tue, Feb 25, 2025 at 05:25:05PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 25, 2025, at 16:47, Uwe Kleine-König wrote:
> > On Tue, Feb 25, 2025 at 03:53:26PM +0100, Arnd Bergmann wrote:
> >> diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/
> >
> > With 
> >
> > diff --git a/include/linux/module.h b/include/linux/module.h
> > index 30e5b19bafa9..014f033ef1ba 100644
> > --- a/include/linux/module.h
> > +++ b/include/linux/module.h
> > @@ -250,7 +250,8 @@ extern void cleanup_module(void);
> >  extern typeof(name) __mod_device_table__##type##__##name		\
> >    __attribute__ ((unused, alias(__stringify(name))))
> >  #else  /* !MODULE */
> > -#define MODULE_DEVICE_TABLE(type, name)
> > +#define MODULE_DEVICE_TABLE(type, name)					\
> > +static const typeof(name) *__mod_device_table__##type##__##name##_ptr 
> > __attribute__((unused)) = &(name)
> >  #endif
> > 
> >  /* Version of form [<epoch>:]<version>[-<extra-version>].

Hu?

> > the warning goes away and stmpe_ts_ids isn't included in the .o file
> > without having to add __maybe_unused to the driver.
> >
> > I would consider that a superior approach.
> 
> Not sure, I can see how this avoids some warnings, but this is
> currently the only remaining instance of this problem (I fixed
> another two recently), and in most cases a MODULE_DEVICE_TABLE()
> entry that is completely unused ends up pointing to a real bug,
> where there is a table but it's not also part of the
> device_driver definition.

It might be the only instance without __maybe_unused and so triggering a
warning. But there is also:

$ git grep -E 'of_device_id.*__maybe_unused' | wc -l
231

$ git grep -E 'mdio_device_id.*__maybe_unused' | wc -l
58

Best regards
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ