linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] spi: Fix condition in the __spi_register_driver()
Date: Tue, 23 Nov 2021 17:34:05 +0000	[thread overview]
Message-ID: <051e22b4-49c0-5ef5-709c-015fe3f20cee@nvidia.com> (raw)
In-Reply-To: <20211123170034.41253-1-andriy.shevchenko@linux.intel.com>


On 23/11/2021 17:00, 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.
> 
> 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(-)
> 
> 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)
> 


Thanks for the quick fix. Works for me!

Tested-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

  parent reply	other threads:[~2021-11-23 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 17:00 [PATCH v3 1/3] spi: Fix condition in the __spi_register_driver() Andy Shevchenko
2021-11-23 17:00 ` [PATCH v3 2/3] spi: Replace memset() with __GFP_ZERO Andy Shevchenko
2021-11-23 17:02   ` Andy Shevchenko
2021-11-23 17:00 ` [PATCH v3 3/3] spi: Fix multi-line comment style Andy Shevchenko
2021-11-23 17:02   ` Andy Shevchenko
2021-11-23 17:34 ` Jon Hunter [this message]
2021-11-24 17:37 ` (subset) [PATCH v3 1/3] spi: Fix condition in the __spi_register_driver() Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=051e22b4-49c0-5ef5-709c-015fe3f20cee@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).