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

Michael Walle michael at walle.cc
Thu Nov 16 07:37:44 PST 2023


>> 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




More information about the linux-mtd mailing list