From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: linux-spi@vger.kernel.org, Michael Walle <mwalle@kernel.org>,
Pratyush Yadav <pratyush@kernel.org>,
Mark Brown <broonie@kernel.org>, Michael Walle <michael@walle.cc>,
"Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v2] spi: Fix error code checking in spi_mem_exec_op()
Date: Thu, 14 Mar 2024 08:07:35 +0100 [thread overview]
Message-ID: <20240314080735.5fe5b405@xps-13> (raw)
In-Reply-To: <20240313194530.3150446-1-florian.fainelli@broadcom.com>
Hi Florian,
florian.fainelli@broadcom.com wrote on Wed, 13 Mar 2024 12:45:30 -0700:
> After commit cff49d58f57e ("spi: Unify error codes by replacing -ENOTSUPP with
> -EOPNOTSUPP"), our SPI NOR flashes would stop probing with the following
> visible in the kernel log:
>
> [ 2.196300] brcmstb_qspi f0440920.qspi: using bspi-mspi mode
> [ 2.210295] spi-nor: probe of spi1.0 failed with error -95
>
> It turns out that the check in spi_mem_exec_op() was changed to check
> for -ENOTSUPP (old error code) or -EOPNOTSUPP (new error code), but this
> means that for drivers that were converted, the second condition is now
> true, and we stop falling through like we used to. Fix the error to
> check for neither error being neither -ENOTSUPP *nor* -EOPNOTSUPP.
>
> Fixes: cff49d58f57e ("spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP")
> Reviewed-by: Michael Walle <mwalle@kernel.org>
> Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Thanks for the fix!
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
next prev parent reply other threads:[~2024-03-14 7:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 19:45 [PATCH v2] spi: Fix error code checking in spi_mem_exec_op() Florian Fainelli
2024-03-14 5:41 ` Mika Westerberg
2024-03-14 7:05 ` Tudor Ambarus
2024-03-14 7:07 ` Miquel Raynal [this message]
2024-03-15 17:13 ` 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=20240314080735.5fe5b405@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=acelan.kao@canonical.com \
--cc=broonie@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mika.westerberg@linux.intel.com \
--cc=mwalle@kernel.org \
--cc=pratyush@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