From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: AceLan Kao <acelan.kao@canonical.com>
Cc: "Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Pratyush Yadav" <pratyush@kernel.org>,
"Michael Walle" <michael@walle.cc>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Dhruva Gole" <d-gole@ti.com>,
linux-mtd@lists.infradead.org, "Mark Brown" <broonie@kernel.org>,
"Kamal Dasu" <kamal.dasu@broadcom.com>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Mario Kicherer" <dev@kicherer.org>,
"Chuanhong Guo" <gch981213@gmail.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP
Date: Wed, 29 Nov 2023 09:05:31 +0200 [thread overview]
Message-ID: <20231129070531.GP1074920@black.fi.intel.com> (raw)
In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com>
On Wed, Nov 29, 2023 at 02:43:10PM +0800, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
>
> This commit updates the SPI subsystem, particularly affecting "SPI MEM"
> drivers and core parts, by replacing the -ENOTSUPP error code with
> -EOPNOTSUPP.
>
> The key motivations for this change are as follows:
> 1. The spi-nor driver currently uses EOPNOTSUPP, whereas calls to spi-mem
> might return ENOTSUPP. This update aims to unify the error reporting
> within the SPI subsystem for clarity and consistency.
>
> 2. The use of ENOTSUPP has been flagged by checkpatch as inappropriate,
> mainly being reserved for NFS-related errors. To align with kernel coding
> standards and recommendations, this change is being made.
>
> 3. By using EOPNOTSUPP, we provide more specific context to the error,
> indicating that a particular operation is not supported. This helps
> differentiate from the more generic ENOTSUPP error, allowing drivers to
> better handle and respond to different error scenarios.
>
> Risks and Considerations:
> While this change is primarily intended as a code cleanup and error code
> unification, there is a minor risk of breaking user-space applications
> that rely on specific return codes for unsupported operations. However,
> this risk is considered low, as such use-cases are unlikely to be common
> or critical. Nevertheless, developers and users should be aware of this
> change, especially if they have scripts or tools that specifically handle
> SPI error codes.
>
> This commit does not introduce any functional changes to the SPI subsystem
> or the affected drivers.
>
> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-11-29 7:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 6:43 [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP AceLan Kao
2023-11-29 6:43 ` [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported AceLan Kao
2023-11-29 7:46 ` Tudor Ambarus
2023-11-29 21:19 ` Mark Brown
2023-11-30 2:27 ` AceLan Kao
2023-11-30 9:20 ` Tudor Ambarus
2023-11-29 8:40 ` Miquel Raynal
2023-11-29 7:05 ` Mika Westerberg [this message]
2023-11-29 7:38 ` [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP Tudor Ambarus
2023-11-29 8:28 ` Michael Walle
2023-11-29 8:39 ` Miquel Raynal
2023-11-30 14:19 ` Mark Brown
2024-03-13 15:40 ` Florian Fainelli
2024-03-13 15:56 ` Michael Walle
2024-03-13 17:13 ` Florian Fainelli
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=20231129070531.GP1074920@black.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=acelan.kao@canonical.com \
--cc=broonie@kernel.org \
--cc=d-gole@ti.com \
--cc=dev@kicherer.org \
--cc=gch981213@gmail.com \
--cc=j.neuschaefer@gmx.net \
--cc=kamal.dasu@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox