lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 12 Mar 2023 20:12:27 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Neeraj sanjay kale <neeraj.sanjaykale@....com>
Cc:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "marcel@...tmann.org" <marcel@...tmann.org>,
        "johan.hedberg@...il.com" <johan.hedberg@...il.com>,
        "luiz.dentz@...il.com" <luiz.dentz@...il.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jirislaby@...nel.org" <jirislaby@...nel.org>,
        "alok.a.tiwari@...cle.com" <alok.a.tiwari@...cle.com>,
        "hdanton@...a.com" <hdanton@...a.com>,
        "ilpo.jarvinen@...ux.intel.com" <ilpo.jarvinen@...ux.intel.com>,
        "leon@...nel.org" <leon@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        Amitkumar Karwar <amitkumar.karwar@....com>,
        Rohit Fule <rohit.fule@....com>,
        Sherry Sun <sherry.sun@....com>
Subject: Re: [PATCH v8 1/3] serdev: Add method to assert break signal over
 tty UART port

On Sun, Mar 12, 2023 at 07:01:17AM +0000, Neeraj sanjay kale wrote:
> Hi Simon
> 
> > 
> > On Fri, Mar 10, 2023 at 11:49:19PM +0530, Neeraj Sanjay Kale wrote:
> > > Adds serdev_device_break_ctl() and an implementation for ttyport.
> > > This function simply calls the break_ctl in tty layer, which can
> > > assert a break signal over UART-TX line, if the tty and the underlying
> > > platform and UART peripheral supports this operation.
> > >
> > > Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
> > > ---
> > > v3: Add details to the commit message. (Greg KH)
> > 
> > ...
> > 
> > > diff --git a/include/linux/serdev.h b/include/linux/serdev.h index
> > > 66f624fc618c..c065ef1c82f1 100644
> > > --- a/include/linux/serdev.h
> > > +++ b/include/linux/serdev.h
> > 
> > ...
> > 
> > > @@ -255,6 +257,10 @@ static inline int serdev_device_set_tiocm(struct
> > > serdev_device *serdev, int set,  {
> > >       return -ENOTSUPP;
> > >  }
> > > +static inline int serdev_device_break_ctl(struct serdev_device
> > > +*serdev, int break_state) {
> > > +     return -EOPNOTSUPP;
> > 
> > Is the use of -EOPNOTSUPP intentional here?
> > I see -ENOTSUPP is used elsewhere in this file.
> I was suggested to use - EOPNOTSUPP instead of - ENOTSUPP by the check patch scripts and by Leon Romanovsky.
> https://patchwork.kernel.org/project/bluetooth/patch/20230130180504.2029440-2-neeraj.sanjaykale@nxp.com/
> 
> ENOTSUPP is not a standard error code and should be avoided in new patches.
> See: https://lore.kernel.org/netdev/20200510182252.GA411829@lunn.ch/

Thanks.

I agree that EOPNOTSUPP is preferable.
But my question is if we chose to use it in this case,
even if it is inconsistent with similar code in the same file/API.
If so, then I have no objections.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ