Re: [PATCH v6 1/2] spi: Replace -ENOTSUPP with -EOPNOTSUPP in op checking

From: Tudor Ambarus
Date: Fri Nov 17 2023 - 04:32:44 EST



I included linux-spi@xxxxxxxxxxxxxxx. 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.