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]
Date:   Tue, 23 Nov 2021 17:43:20 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Jon Hunter <jonathanh@...dia.com>
Cc:     Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v1 1/2] spi: deduplicate spi_match_id() in
 __spi_register_driver()

On Tue, Nov 23, 2021 at 03:22:38PM +0000, Jon Hunter wrote:
> On 19/11/2021 17:37, Andy Shevchenko wrote:

> > @@ -474,12 +473,8 @@ int __spi_register_driver(struct module *owner, struct spi_driver *sdrv)
> >   			if (sdrv->id_table) {
> >   				const struct spi_device_id *spi_id;
> > -				for (spi_id = sdrv->id_table; spi_id->name[0];
> > -				     spi_id++)
> > -					if (strcmp(spi_id->name, of_name) == 0)
> > -						break;

> > -				if (spi_id->name[0])
> > +				spi_id = spi_match_id(sdrv->id_table, of_name);
> > +				if (!spi_id)

Seems I have inverted condition here. Shouldn't it be

				if (spi_id)

instead?

> >   					continue;
> >   			} else {
> >   				if (strcmp(sdrv->driver.name, of_name) == 0)
> > 
> 
> 
> Following this change I am seeing the following warnings again although most
> of these have now been fixed ...
> 
>  WARNING KERN SPI driver mtd_dataflash has no spi_device_id for atmel,at45
>  WARNING KERN SPI driver mtd_dataflash has no spi_device_id for
> atmel,dataflash
>  WARNING KERN SPI driver spi-nor has no spi_device_id for jedec,spi-nor
>  WARNING KERN SPI driver mmc_spi has no spi_device_id for mmc-spi-slot
>  WARNING KERN SPI driver cros-ec-spi has no spi_device_id for
> google,cros-ec-spi
> 
> I have not looked any further yet, but this appears to cause the SPI ID
> match to fail.

Ah, thanks for testing!
Can you try above?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ