Re: [PATCH 1/4] regmap: sdw: move to -EOPNOTSUPP

From: Takashi Iwai
Date: Wed Aug 26 2020 - 06:09:34 EST


On Wed, 26 Aug 2020 11:56:01 +0200,
Mark Brown wrote:
>
> On Tue, Aug 25, 2020 at 05:08:55PM -0500, Pierre-Louis Bossart wrote:
>
> > > > -ENOTSUPP is not a valid error code, use recommended value instead.
>
> > > What makes you say this - it's what regmap uses internally for
> > > unsupported operations?
>
> > This was flagged by scripts/checkpatch.pl (must be a new addition).
>
> checkpatch is broken.

Heh, I'm not objecting it :)

OTOH, it's also true that ENOTSUPP is no good error code if returned
to user-space. Unfortunately many codes (including what I wrote) use
this code mistakenly, and they can't be changed any longer...


Takashi