All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "AceLan Kao" <acelan.kao@canonical.com>,
	"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>,
	"Mika Westerberg" <mika.westerberg@linux.intel.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 07:38:50 +0000	[thread overview]
Message-ID: <6e81a443-4e28-48fd-9bec-224d07f1682d@linaro.org> (raw)
In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com>



On 11/29/23 06:43, 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>
> 

I'm fine with the low risk of breaking the MTD related user-space:
Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org>

WARNING: multiple messages have this Message-ID (diff)
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "AceLan Kao" <acelan.kao@canonical.com>,
	"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>,
	"Mika Westerberg" <mika.westerberg@linux.intel.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 07:38:50 +0000	[thread overview]
Message-ID: <6e81a443-4e28-48fd-9bec-224d07f1682d@linaro.org> (raw)
In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com>



On 11/29/23 06:43, 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>
> 

I'm fine with the low risk of breaking the MTD related user-space:
Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org>

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

  parent reply	other threads:[~2023-11-29  7:38 UTC|newest]

Thread overview: 30+ 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 ` 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  6:43   ` AceLan Kao
2023-11-29  7:46   ` Tudor Ambarus
2023-11-29  7:46     ` Tudor Ambarus
2023-11-29 21:19     ` Mark Brown
2023-11-29 21:19       ` Mark Brown
2023-11-30  2:27       ` AceLan Kao
2023-11-30  2:27         ` AceLan Kao
2023-11-30  9:20       ` Tudor Ambarus
2023-11-30  9:20         ` Tudor Ambarus
2023-11-29  8:40   ` Miquel Raynal
2023-11-29  8:40     ` Miquel Raynal
2023-11-29  7:05 ` [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP Mika Westerberg
2023-11-29  7:05   ` Mika Westerberg
2023-11-29  7:38 ` Tudor Ambarus [this message]
2023-11-29  7:38   ` Tudor Ambarus
2023-11-29  8:28 ` Michael Walle
2023-11-29  8:28   ` Michael Walle
2023-11-29  8:39 ` Miquel Raynal
2023-11-29  8:39   ` Miquel Raynal
2023-11-30 14:19 ` Mark Brown
2023-11-30 14:19   ` Mark Brown
2024-03-13 15:40 ` Florian Fainelli
2024-03-13 15:40   ` Florian Fainelli
2024-03-13 15:56 ` Michael Walle
2024-03-13 15:56   ` Michael Walle
2024-03-13 17:13   ` Florian Fainelli
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=6e81a443-4e28-48fd-9bec-224d07f1682d@linaro.org \
    --to=tudor.ambarus@linaro.org \
    --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=mika.westerberg@linux.intel.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --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.