linux/drivers/mtd/nand/spi
Chia-Lin Kao (AceLan) cff49d58f5
spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP
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>
Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20231129064311.272422-1-acelan.kao@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-11-30 12:12:39 +00:00
..
alliancememory.c mtd: spinand: Add support for AllianceMemory AS5F34G04SND 2023-01-30 17:16:28 +01:00
ato.c mtd: spinand: Add support for ATO25D1GA 2022-06-06 15:05:33 +02:00
core.c spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP 2023-11-30 12:12:39 +00:00
esmt.c mtd: spinand: esmt: add support for F50D2G41KA 2023-07-12 13:34:54 +02:00
foresee.c mtd: spinand: add support for FORESEE F35SQA002G 2023-10-16 11:16:53 +02:00
gigadevice.c mtd: spinand: gigadevice: add support for GD5F1GQ{4,5}RExxH 2023-07-12 13:34:27 +02:00
Kconfig mtd: spinand: Use the external ECC engine logic 2020-12-10 22:37:30 +01:00
macronix.c mtd: spinand: macronix: Add support for serial NAND flash 2023-06-09 17:21:17 +02:00
Makefile mtd: spinand: add support for FORESEE F35SQA002G 2023-10-16 11:16:53 +02:00
micron.c mtd: spinand: micron: correct bitmask for ecc status 2023-09-11 17:48:24 +02:00
paragon.c mtd: spinand: rework detect procedure for different READ_ID operation 2020-03-09 14:50:19 +01:00
toshiba.c Core MTD changes: 2023-09-03 09:59:53 -07:00
winbond.c mtd: spinand: winbond: add support for serial NAND flash 2023-10-16 11:16:58 +02:00
xtx.c mtd: spinand: Add support for XTX XT26xxxDxxxxx 2023-10-16 11:17:00 +02:00