Re: [PATCH 2/2] gpiolib: Allow drivers to return EOPNOTSUPP from config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Mar 2021 18:25:46 +0300 Andy Shevchenko wrote:
> On Mon, Mar 29, 2021 at 08:08:52AM -0700, Joe Perches wrote:
> > On Mon, 2021-03-29 at 14:59 +0300, Andy Shevchenko wrote:  
> > > On Mon, Mar 29, 2021 at 2:43 PM Matti Vaittinen
> > > <matti.vaittinen@xxxxxxxxxxxxxxxxx> wrote:  
> > > > 
> > > > The checkpacth instructs to switch from ENOSUPP to EOPNOTSUPP.  
> > > > > WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP  
> > > > 
> > > > Make the gpiolib allow drivers to return both so driver developers
> > > > can avoid one of the checkpatch complaints.  
> > > 
> > > Internally we are fine to use the ENOTSUPP.
> > > Checkpatch false positives there.
> > > 
> > > I doubt we need this change. Rather checkpatch should rephrase this to
> > > point out that this is only applicable to _user-visible_ error path.
> > > Cc'ed Joe.  
> > 
> > Adding CC for Jakub Kicinski who added that particular rule/test.
> > 
> > And the output message report of the rule is merely a suggestion indicating
> > a preference.  It's always up to an individual to accept/reject.
> > 
> > At best, perhaps wordsmithing the checkpatch message might be an OK option.  
> 
> Thanks, Joe!
> 
> Jakub, what do you think?

Agreed, weaving into the message that ENOTSUPP is okay internally
sounds good. Perhaps we should append "if error may be returned to 
user space"?



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux