From: Simon Horman <horms@kernel.org>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Alexei Starovoitov <ast@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Emil Renner Berthing <kernel@esmil.dk>,
Eric Dumazet <edumazet@google.com>,
Fabio Estevam <festevam@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, NXP Linux Team <linux-imx@nxp.com>,
Paolo Abeni <pabeni@redhat.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Samin Guo <samin.guo@starfivetech.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH net-next 1/6] net: stmmac: add platform library
Date: Thu, 14 Sep 2023 13:24:06 +0200 [thread overview]
Message-ID: <20230914112406.GA401982@kernel.org> (raw)
In-Reply-To: <ZQDkR/YX2HPMKiF5@shell.armlinux.org.uk>
On Tue, Sep 12, 2023 at 11:20:55PM +0100, Russell King (Oracle) wrote:
> On Tue, Sep 12, 2023 at 04:52:27PM +0200, Simon Horman wrote:
> > On Mon, Sep 11, 2023 at 04:29:11PM +0100, Russell King (Oracle) wrote:
> > > + default:
> > > + return -ENOTSUPP;
> >
> > Checkpatch seems to think that EOPNOTSUPP would be more appropriate
> > as "ENOTSUPP is not a SUSV4 error code".
>
> It needs to be an error code that clk_set_rate() below isn't going to
> return - because if clk_set_rate() does return it, then the users are
> going to end up issuing an incorrect error message to the user. I
> suspect clk_set_rate() could quite legitimately return -EOPNOTSUPP
> or -EINVAL.
>
> Sadly, the CCF implementation of clk_set_rate() doesn't detail what
> errors it could return, but it looks like -EBUSY, -EINVAL, or something
> from pm_runtime_resume_and_get().
Thanks Russell,
Understood.
In that case perhaps ENOTSUPP is not such a bad choice as:
a) it seems rather unlikely CCF would use it; and
b) the scope of usage is well contained - the helper and any direct callers.
No further objections from my side :)
>
> Interestingly, while looking at this, pm_runtime_resume_and_get() can
> return '1' if e.g. rpm is disabled and the device is active. It looks
> to me like CCF treats that as an error in multiple locations.
The plot thickens...
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Alexei Starovoitov <ast@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Emil Renner Berthing <kernel@esmil.dk>,
Eric Dumazet <edumazet@google.com>,
Fabio Estevam <festevam@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, NXP Linux Team <linux-imx@nxp.com>,
Paolo Abeni <pabeni@redhat.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Samin Guo <samin.guo@starfivetech.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH net-next 1/6] net: stmmac: add platform library
Date: Thu, 14 Sep 2023 13:24:06 +0200 [thread overview]
Message-ID: <20230914112406.GA401982@kernel.org> (raw)
In-Reply-To: <ZQDkR/YX2HPMKiF5@shell.armlinux.org.uk>
On Tue, Sep 12, 2023 at 11:20:55PM +0100, Russell King (Oracle) wrote:
> On Tue, Sep 12, 2023 at 04:52:27PM +0200, Simon Horman wrote:
> > On Mon, Sep 11, 2023 at 04:29:11PM +0100, Russell King (Oracle) wrote:
> > > + default:
> > > + return -ENOTSUPP;
> >
> > Checkpatch seems to think that EOPNOTSUPP would be more appropriate
> > as "ENOTSUPP is not a SUSV4 error code".
>
> It needs to be an error code that clk_set_rate() below isn't going to
> return - because if clk_set_rate() does return it, then the users are
> going to end up issuing an incorrect error message to the user. I
> suspect clk_set_rate() could quite legitimately return -EOPNOTSUPP
> or -EINVAL.
>
> Sadly, the CCF implementation of clk_set_rate() doesn't detail what
> errors it could return, but it looks like -EBUSY, -EINVAL, or something
> from pm_runtime_resume_and_get().
Thanks Russell,
Understood.
In that case perhaps ENOTSUPP is not such a bad choice as:
a) it seems rather unlikely CCF would use it; and
b) the scope of usage is well contained - the helper and any direct callers.
No further objections from my side :)
>
> Interestingly, while looking at this, pm_runtime_resume_and_get() can
> return '1' if e.g. rpm is disabled and the device is active. It looks
> to me like CCF treats that as an error in multiple locations.
The plot thickens...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-14 11:24 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 15:28 [PATCH net-next 0/6] net: stmmac: add and use library for setting clock Russell King (Oracle)
2023-09-11 15:28 ` Russell King (Oracle)
2023-09-11 15:29 ` [PATCH net-next 1/6] net: stmmac: add platform library Russell King (Oracle)
2023-09-11 15:29 ` Russell King (Oracle)
2023-09-12 10:18 ` Paolo Abeni
2023-09-12 10:18 ` Paolo Abeni
2023-09-12 14:52 ` Simon Horman
2023-09-12 14:52 ` Simon Horman
2023-09-12 22:20 ` Russell King (Oracle)
2023-09-12 22:20 ` Russell King (Oracle)
2023-09-14 11:24 ` Simon Horman [this message]
2023-09-14 11:24 ` Simon Horman
2023-09-11 15:29 ` [PATCH net-next 2/6] net: stmmac: imx: use dwmac_set_tx_clk_gmii() Russell King (Oracle)
2023-09-11 15:29 ` Russell King (Oracle)
2023-09-14 12:05 ` Serge Semin
2023-09-14 12:05 ` Serge Semin
2023-09-14 12:19 ` Serge Semin
2023-09-14 12:19 ` Serge Semin
2023-09-11 15:29 ` [PATCH net-next 3/6] net: stmmac: intel-plat: " Russell King (Oracle)
2023-09-11 15:29 ` Russell King (Oracle)
2023-09-14 12:06 ` Serge Semin
2023-09-14 12:06 ` Serge Semin
2023-09-11 15:29 ` [PATCH net-next 4/6] net: stmmac: rk: " Russell King (Oracle)
2023-09-11 15:29 ` Russell King (Oracle)
2023-09-11 15:29 ` [PATCH net-next 5/6] net: stmmac: starfive: " Russell King (Oracle)
2023-09-11 15:29 ` Russell King (Oracle)
2023-09-14 12:10 ` Serge Semin
2023-09-14 12:10 ` Serge Semin
2023-09-11 15:29 ` [PATCH net-next 6/6] net: stmmac: qos-eth: " Russell King (Oracle)
2023-09-11 15:29 ` Russell King (Oracle)
2023-09-14 12:13 ` Serge Semin
2023-09-14 12:13 ` Serge Semin
-- strict thread matches above, loose matches on Subject: below --
2023-09-11 15:28 [PATCH net-next 1/6] net: stmmac: add platform library Russell King (Oracle)
2023-09-11 15:28 ` Russell King (Oracle)
2023-09-12 7:59 ` Jose Abreu
2023-09-12 7:59 ` Jose Abreu
2023-09-12 9:32 ` Serge Semin
2023-09-12 9:32 ` Serge Semin
2023-09-12 17:08 ` Russell King (Oracle)
2023-09-12 17:08 ` Russell King (Oracle)
2023-09-13 0:56 ` Serge Semin
2023-09-13 0:56 ` Serge Semin
2023-09-13 14:14 ` Russell King (Oracle)
2023-09-13 14:14 ` Russell King (Oracle)
2023-09-13 14:21 ` Russell King (Oracle)
2023-09-13 14:21 ` Russell King (Oracle)
2023-09-14 10:42 ` Serge Semin
2023-09-14 10:42 ` Serge Semin
2023-09-14 10:48 ` Russell King (Oracle)
2023-09-14 10:48 ` Russell King (Oracle)
2023-09-14 12:01 ` Serge Semin
2023-09-14 12:01 ` Serge Semin
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=20230914112406.GA401982@kernel.org \
--to=horms@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=hawk@kernel.org \
--cc=joabreu@synopsys.com \
--cc=john.fastabend@gmail.com \
--cc=kernel@esmil.dk \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=s.hauer@pengutronix.de \
--cc=samin.guo@starfivetech.com \
--cc=shawnguo@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.