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

From: Michael Walle
Date: Thu Nov 16 2023 - 10:37:50 EST


The purpose of this patch is to distinguish the "operation not support"
error from the generic "not support", so that drivers could better
handle different errors.

What is the intended distinction between the two?

The commit message is misleading. The intention is to replace
ENOTSUPP with EOPNOTUPP for two reasons:
(1) checkpatch will complain about the use of ENOTSUPP and apparently
should only be used with NFS
(2) more importantly, spi-nor already uses EOPNOTSUPP, but calls to
spi-mem might return ENOTSUPP. We'd like to unify this.

-michael