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: <20240406163155.799f515a@jic23-huawei>
Date: Sat, 6 Apr 2024 16:31:55 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Arnd Bergmann <arnd@...nel.org>, linux-kernel@...r.kernel.org,
 Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich
 <Michael.Hennerich@...log.com>, Arnd Bergmann <arnd@...db.de>,
 linux-iio@...r.kernel.org
Subject: Re: [PATCH 16/34] iio: ad5755: hook up of_device_id lookup to
 platform driver

On Wed, 3 Apr 2024 11:55:06 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:

> On 03/04/2024 10:06, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> > 
> > When the driver is built-in, 'make W=1' warns about an unused
> > ID table:
> > 
> > drivers/iio/dac/ad5755.c:866:34: error: 'ad5755_of_match' defined but not used [-Werror=unused-const-variable=]
> >   866 | static const struct of_device_id ad5755_of_match[] = {
> > 
> > While the data is duplicated in the spi_device_id, it's common
> > to use the actual OF compatible strings in the driver.
> > 
> > Since there are no in-tree users of plain platform devices, the
> > spi_device_id table could actually be dropped entirely with this.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > ---
> >  drivers/iio/dac/ad5755.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
> > index 404865e35460..5c1e7f428c25 100644
> > --- a/drivers/iio/dac/ad5755.c
> > +++ b/drivers/iio/dac/ad5755.c
> > @@ -876,6 +876,7 @@ MODULE_DEVICE_TABLE(of, ad5755_of_match);
> >  static struct spi_driver ad5755_driver = {
> >  	.driver = {
> >  		.name = "ad5755",
> > +		.of_match_table = ad5755_of_match,  
> 
> I was working on this as well and have a bit bigger solution, following
> Jonathan's preference (I think):
> 
> https://lore.kernel.org/all/20240226192555.14aa178e@jic23-huawei/
> 
> I need to send v3, somehow I missed his comments.
> 
> Jonathan,
> Do you want me to still work on this according to your comments (which I
> missed, I am sorry).

No problem on missing the reply! (I'd forgotten all about this!)
I would prefer that solution to this one that relies on the two
tables having equivalent entries.  So I'll not pick up this patch.

Thanks,

Jonathan

> 
> Best regards,
> Krzysztof
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ