diff mbox series

[V3,1/6] net: stmmac: remove redundant null check for ptp clock

Message ID 20210126115854.2530-2-qiangqing.zhang@nxp.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series ethernet: fixes for stmmac driver | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 4 maintainers not CCed: linux-arm-kernel@lists.infradead.org mcoquelin.stm32@gmail.com linux-stm32@st-md-mailman.stormreply.com zhangchangzhong@huawei.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Joakim Zhang Jan. 26, 2021, 11:58 a.m. UTC
Remove redundant null check for ptp clock.

Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check before clk_disable_unprepare()")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Willem de Bruijn Jan. 26, 2021, 10:46 p.m. UTC | #1
On Tue, Jan 26, 2021 at 7:05 AM Joakim Zhang <qiangqing.zhang@nxp.com> wrote:
>
> Remove redundant null check for ptp clock.
>
> Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check before clk_disable_unprepare()")

This does not look like a fix to that patch, but another instance of a cleanup.

The patchset also does not explicitly target net (for fixes) or
net-next (for new improvements). I suppose this patch targets
net-next.

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 26b971cd4da5..11e0b30b2e01 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -5291,8 +5291,7 @@ int stmmac_resume(struct device *dev)
>                 /* enable the clk previously disabled */
>                 clk_prepare_enable(priv->plat->stmmac_clk);
>                 clk_prepare_enable(priv->plat->pclk);
> -               if (priv->plat->clk_ptp_ref)
> -                       clk_prepare_enable(priv->plat->clk_ptp_ref);
> +               clk_prepare_enable(priv->plat->clk_ptp_ref);
>                 /* reset the phy so that it's ready */
>                 if (priv->mii)
>                         stmmac_mdio_reset(priv->mii);
> --
> 2.17.1
>
Joakim Zhang Jan. 27, 2021, 1:30 a.m. UTC | #2
> -----Original Message-----
> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Sent: 2021年1月27日 6:46
> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
> <alexandre.torgue@st.com>; Jose Abreu <joabreu@synopsys.com>; David
> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Network
> Development <netdev@vger.kernel.org>; dl-linux-imx <linux-imx@nxp.com>;
> Andrew Lunn <andrew@lunn.ch>; Florian Fainelli <f.fainelli@gmail.com>
> Subject: Re: [PATCH V3 1/6] net: stmmac: remove redundant null check for ptp
> clock
> 
> On Tue, Jan 26, 2021 at 7:05 AM Joakim Zhang <qiangqing.zhang@nxp.com>
> wrote:
> >
> > Remove redundant null check for ptp clock.
> >
> > Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check before
> > clk_disable_unprepare()")
> 
> This does not look like a fix to that patch, but another instance of a cleanup.
> 
> The patchset also does not explicitly target net (for fixes) or net-next (for new
> improvements). I suppose this patch targets net-next.

I forgot to explicitly target as net when format the patch set again. This could be a fix even original patch(1c35cc9cf6a0) doesn't break anything, but it didn't do all the work as commit message commit.
This patch targets net or net-next, this matter doesn't seem to be that important. If it is necessary, I can repost it next time as a separate patch for net-next. Thanks.

Best Regards,
Joakim Zhang
> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
> > ---
> >  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index 26b971cd4da5..11e0b30b2e01 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -5291,8 +5291,7 @@ int stmmac_resume(struct device *dev)
> >                 /* enable the clk previously disabled */
> >                 clk_prepare_enable(priv->plat->stmmac_clk);
> >                 clk_prepare_enable(priv->plat->pclk);
> > -               if (priv->plat->clk_ptp_ref)
> > -                       clk_prepare_enable(priv->plat->clk_ptp_ref);
> > +               clk_prepare_enable(priv->plat->clk_ptp_ref);
> >                 /* reset the phy so that it's ready */
> >                 if (priv->mii)
> >                         stmmac_mdio_reset(priv->mii);
> > --
> > 2.17.1
> >
Florian Fainelli Jan. 27, 2021, 1:33 a.m. UTC | #3
On 1/26/2021 5:30 PM, Joakim Zhang wrote:
> 
>> -----Original Message-----
>> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
>> Sent: 2021年1月27日 6:46
>> To: Joakim Zhang <qiangqing.zhang@nxp.com>
>> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
>> <alexandre.torgue@st.com>; Jose Abreu <joabreu@synopsys.com>; David
>> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Network
>> Development <netdev@vger.kernel.org>; dl-linux-imx <linux-imx@nxp.com>;
>> Andrew Lunn <andrew@lunn.ch>; Florian Fainelli <f.fainelli@gmail.com>
>> Subject: Re: [PATCH V3 1/6] net: stmmac: remove redundant null check for ptp
>> clock
>>
>> On Tue, Jan 26, 2021 at 7:05 AM Joakim Zhang <qiangqing.zhang@nxp.com>
>> wrote:
>>>
>>> Remove redundant null check for ptp clock.
>>>
>>> Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check before
>>> clk_disable_unprepare()")
>>
>> This does not look like a fix to that patch, but another instance of a cleanup.
>>
>> The patchset also does not explicitly target net (for fixes) or net-next (for new
>> improvements). I suppose this patch targets net-next.
> 
> I forgot to explicitly target as net when format the patch set again. This could be a fix even original patch(1c35cc9cf6a0) doesn't break anything, but it didn't do all the work as commit message commit.
> This patch targets net or net-next, this matter doesn't seem to be that important. If it is necessary, I can repost it next time as a separate patch for net-next. Thanks.

Your patch series is titled "ethernet: fixes for stmmac driver" so we
sort of expect to find only bug fixes in there.

Given this patch has no dependency and does not create one on the
others, you should post that as a separate patch targeting the
'net-next' tree.
Joakim Zhang Jan. 27, 2021, 1:49 a.m. UTC | #4
> -----Original Message-----
> From: Florian Fainelli <f.fainelli@gmail.com>
> Sent: 2021年1月27日 9:33
> To: Joakim Zhang <qiangqing.zhang@nxp.com>; Willem de Bruijn
> <willemdebruijn.kernel@gmail.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
> <alexandre.torgue@st.com>; Jose Abreu <joabreu@synopsys.com>; David
> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Network
> Development <netdev@vger.kernel.org>; dl-linux-imx <linux-imx@nxp.com>;
> Andrew Lunn <andrew@lunn.ch>
> Subject: Re: [PATCH V3 1/6] net: stmmac: remove redundant null check for ptp
> clock
> 
> 
> 
> On 1/26/2021 5:30 PM, Joakim Zhang wrote:
> >
> >> -----Original Message-----
> >> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> >> Sent: 2021年1月27日 6:46
> >> To: Joakim Zhang <qiangqing.zhang@nxp.com>
> >> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
> >> <alexandre.torgue@st.com>; Jose Abreu <joabreu@synopsys.com>; David
> >> Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>;
> >> Network Development <netdev@vger.kernel.org>; dl-linux-imx
> >> <linux-imx@nxp.com>; Andrew Lunn <andrew@lunn.ch>; Florian Fainelli
> >> <f.fainelli@gmail.com>
> >> Subject: Re: [PATCH V3 1/6] net: stmmac: remove redundant null check
> >> for ptp clock
> >>
> >> On Tue, Jan 26, 2021 at 7:05 AM Joakim Zhang
> >> <qiangqing.zhang@nxp.com>
> >> wrote:
> >>>
> >>> Remove redundant null check for ptp clock.
> >>>
> >>> Fixes: 1c35cc9cf6a0 ("net: stmmac: remove redundant null check
> >>> before
> >>> clk_disable_unprepare()")
> >>
> >> This does not look like a fix to that patch, but another instance of a cleanup.
> >>
> >> The patchset also does not explicitly target net (for fixes) or
> >> net-next (for new improvements). I suppose this patch targets net-next.
> >
> > I forgot to explicitly target as net when format the patch set again. This could
> be a fix even original patch(1c35cc9cf6a0) doesn't break anything, but it didn't
> do all the work as commit message commit.
> > This patch targets net or net-next, this matter doesn't seem to be that
> important. If it is necessary, I can repost it next time as a separate patch for
> net-next. Thanks.
> 
> Your patch series is titled "ethernet: fixes for stmmac driver" so we sort of
> expect to find only bug fixes in there.
> 
> Given this patch has no dependency and does not create one on the others, you
> should post that as a separate patch targeting the 'net-next' tree.

Ok, I will remove this patch from patch set next version. Thanks.

Best Regards,
Joakim Zhang
> --
> Florian
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 26b971cd4da5..11e0b30b2e01 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5291,8 +5291,7 @@  int stmmac_resume(struct device *dev)
 		/* enable the clk previously disabled */
 		clk_prepare_enable(priv->plat->stmmac_clk);
 		clk_prepare_enable(priv->plat->pclk);
-		if (priv->plat->clk_ptp_ref)
-			clk_prepare_enable(priv->plat->clk_ptp_ref);
+		clk_prepare_enable(priv->plat->clk_ptp_ref);
 		/* reset the phy so that it's ready */
 		if (priv->mii)
 			stmmac_mdio_reset(priv->mii);