From: Simon Horman <simon.horman@corigine.com>
To: Neeraj sanjay kale <neeraj.sanjaykale@nxp.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"marcel@holtmann.org" <marcel@holtmann.org>,
"johan.hedberg@gmail.com" <johan.hedberg@gmail.com>,
"luiz.dentz@gmail.com" <luiz.dentz@gmail.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"jirislaby@kernel.org" <jirislaby@kernel.org>,
"alok.a.tiwari@oracle.com" <alok.a.tiwari@oracle.com>,
"hdanton@sina.com" <hdanton@sina.com>,
"ilpo.jarvinen@linux.intel.com" <ilpo.jarvinen@linux.intel.com>,
"leon@kernel.org" <leon@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
Amitkumar Karwar <amitkumar.karwar@nxp.com>,
Rohit Fule <rohit.fule@nxp.com>, Sherry Sun <sherry.sun@nxp.com>
Subject: Re: [PATCH v8 1/3] serdev: Add method to assert break signal over tty UART port
Date: Sun, 12 Mar 2023 20:12:27 +0100 [thread overview]
Message-ID: <ZA4kG1gG2qoEGZLK@corigine.com> (raw)
In-Reply-To: <AM9PR04MB8603EDB41582B5B816993B12E7B89@AM9PR04MB8603.eurprd04.prod.outlook.com>
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@nxp.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.
next prev parent reply other threads:[~2023-03-12 19:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 18:19 [PATCH v8 0/3] Add support for NXP bluetooth chipsets Neeraj Sanjay Kale
2023-03-10 18:19 ` [PATCH v8 1/3] serdev: Add method to assert break signal over tty UART port Neeraj Sanjay Kale
2023-03-11 12:33 ` Simon Horman
2023-03-12 7:01 ` Neeraj sanjay kale
2023-03-12 19:12 ` Simon Horman [this message]
2023-03-13 4:19 ` Neeraj sanjay kale
2023-03-13 12:06 ` Simon Horman
2023-03-13 14:14 ` Neeraj sanjay kale
2023-03-10 18:19 ` [PATCH v8 2/3] dt-bindings: net: bluetooth: Add NXP bluetooth support Neeraj Sanjay Kale
2023-03-10 18:19 ` [PATCH v8 3/3] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets Neeraj Sanjay Kale
2023-03-13 9:01 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZA4kG1gG2qoEGZLK@corigine.com \
--to=simon.horman@corigine.com \
--cc=alok.a.tiwari@oracle.com \
--cc=amitkumar.karwar@nxp.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdanton@sina.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan.hedberg@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=neeraj.sanjaykale@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=rohit.fule@nxp.com \
--cc=sherry.sun@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).