[PATCH v6 1/2] spi: Replace -ENOTSUPP with -EOPNOTSUPP in op checking
Tudor Ambarus
tudor.ambarus at linaro.org
Fri Nov 17 01:32:17 PST 2023
I included linux-spi at vger.kernel.org. Please do the same if you're going
to send a new version.
On 11/16/23 02:43, AceLan Kao wrote:
> --- a/drivers/spi/spi-mem.c
> +++ b/drivers/spi/spi-mem.c
> @@ -323,7 +323,7 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
> return ret;
>
> if (!spi_mem_internal_supports_op(mem, op))
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
this will break user-space if someone uses the return code of
unsupported operations, but I'm not against taking the risk and changing
the return code, as I doubt it's used. Anyway, if we're taking this
path, please specify the risk in the commit message and why we're taking
this risk.
More information about the linux-mtd
mailing list