diff mbox series

[v3,1/3] spi: Fix condition in the __spi_register_driver()

Message ID 20211123170034.41253-1-andriy.shevchenko@linux.intel.com
State Accepted
Commit b79332ef9d61513d0ccda74a5161bb7c31851e9c
Headers show
Series [v3,1/3] spi: Fix condition in the __spi_register_driver() | expand

Commit Message

Andy Shevchenko Nov. 23, 2021, 5 p.m. UTC
The recent commit 3f07657506df ("spi: deduplicate spi_match_id()
in __spi_register_driver()") inadvertently inverted a condition
that provokes a (harmless) warning:

  WARNING KERN SPI driver mtd_dataflash has no spi_device_id for atmel,at45

Restore logic to avoid such warning to be issued.

Fixes: 3f07657506df ("spi: deduplicate spi_match_id() in __spi_register_driver()")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: a fix-patch instead of previously applied one (Jon)
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Nov. 23, 2021, 5:02 p.m. UTC | #1
On Tue, Nov 23, 2021 at 7:01 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
>   /*
>    * Fix multi-line comment style as in this short example. Pay attention
>    * to the capitalization, period and starting line of the text.
>    */
>
> While at it, split the (supposedly short) description of couple of functions
> to summary (short description) and (long) description.

This one is already applied, seconds before I have sent it.
Mark Brown Nov. 24, 2021, 5:37 p.m. UTC | #2
On Tue, 23 Nov 2021 19:00:32 +0200, Andy Shevchenko wrote:
> The recent commit 3f07657506df ("spi: deduplicate spi_match_id()
> in __spi_register_driver()") inadvertently inverted a condition
> that provokes a (harmless) warning:
> 
>   WARNING KERN SPI driver mtd_dataflash has no spi_device_id for atmel,at45
> 
> Restore logic to avoid such warning to be issued.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/3] spi: Fix condition in the __spi_register_driver()
      commit: b79332ef9d61513d0ccda74a5161bb7c31851e9c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 9d19d9bae253..15688acc952c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -474,7 +474,7 @@  int __spi_register_driver(struct module *owner, struct spi_driver *sdrv)
 				const struct spi_device_id *spi_id;
 
 				spi_id = spi_match_id(sdrv->id_table, of_name);
-				if (!spi_id)
+				if (spi_id)
 					continue;
 			} else {
 				if (strcmp(sdrv->driver.name, of_name) == 0)