All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Jon Hunter" <jonathanh@nvidia.com>, <tkuw584924@gmail.com>,
	<linux-mtd@lists.infradead.org>
Cc: <tudor.ambarus@linaro.org>, <pratyush@kernel.org>,
	<miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
	<Bacem.Daassi@infineon.com>,
	"Takahiro Kuwano" <Takahiro.Kuwano@infineon.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
Date: Fri, 06 Sep 2024 15:04:08 +0200	[thread overview]
Message-ID: <D3Z80PI18VZB.1ZLQ2TMR10UTG@kernel.org> (raw)
In-Reply-To: <66c8ebb0-1324-4ad9-9926-8d4eb7e1e63a@nvidia.com>


[-- Attachment #1.1: Type: text/plain, Size: 868 bytes --]

Hi Jon,

> Bisect is pointing to this commit and adding the 'name' field does fix
> it. So it would appear the SPI NOR code still wants the name field.

Thanks for the report, could you try the following patch.

-michael

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index d8e551fd2e2a..101ee5b0ddeb 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3281,7 +3281,8 @@ static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,

 	for (i = 0; i < ARRAY_SIZE(manufacturers); i++) {
 		for (j = 0; j < manufacturers[i]->nparts; j++) {
-			if (!strcmp(name, manufacturers[i]->parts[j].name)) {
+			if (manufacturers[i]->parts[j].name &&
+			    !strcmp(name, manufacturers[i]->parts[j].name)) {
 				nor->manufacturer = manufacturers[i];
 				return &manufacturers[i]->parts[j];
 			}

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: "Michael Walle" <mwalle@kernel.org>
To: "Jon Hunter" <jonathanh@nvidia.com>, <tkuw584924@gmail.com>,
	<linux-mtd@lists.infradead.org>
Cc: <tudor.ambarus@linaro.org>, <pratyush@kernel.org>,
	<miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
	<Bacem.Daassi@infineon.com>,
	"Takahiro Kuwano" <Takahiro.Kuwano@infineon.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T
Date: Fri, 06 Sep 2024 15:04:08 +0200	[thread overview]
Message-ID: <D3Z80PI18VZB.1ZLQ2TMR10UTG@kernel.org> (raw)
In-Reply-To: <66c8ebb0-1324-4ad9-9926-8d4eb7e1e63a@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

Hi Jon,

> Bisect is pointing to this commit and adding the 'name' field does fix
> it. So it would appear the SPI NOR code still wants the name field.

Thanks for the report, could you try the following patch.

-michael

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index d8e551fd2e2a..101ee5b0ddeb 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3281,7 +3281,8 @@ static const struct flash_info *spi_nor_match_name(struct spi_nor *nor,

 	for (i = 0; i < ARRAY_SIZE(manufacturers); i++) {
 		for (j = 0; j < manufacturers[i]->nparts; j++) {
-			if (!strcmp(name, manufacturers[i]->parts[j].name)) {
+			if (manufacturers[i]->parts[j].name &&
+			    !strcmp(name, manufacturers[i]->parts[j].name)) {
 				nor->manufacturer = manufacturers[i];
 				return &manufacturers[i]->parts[j];
 			}

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

  reply	other threads:[~2024-09-06 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30  3:08 [PATCH] mtd: spi-nor: spansion: Add support for S28HS256T tkuw584924
2024-08-30  6:59 ` Michael Walle
2024-09-06 11:47   ` Jon Hunter
2024-09-06 11:47     ` Jon Hunter
2024-09-06 13:04     ` Michael Walle [this message]
2024-09-06 13:04       ` Michael Walle
2024-09-06 17:23       ` Jon Hunter
2024-09-06 17:23         ` Jon Hunter

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=D3Z80PI18VZB.1ZLQ2TMR10UTG@kernel.org \
    --to=mwalle@kernel.org \
    --cc=Bacem.Daassi@infineon.com \
    --cc=Takahiro.Kuwano@infineon.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tkuw584924@gmail.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.