linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Kresin <dev@kresin.me>
To: James Hogan <jhogan@kernel.org>
Cc: John Crispin <john@phrozen.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	hauke@hauke-m.de, stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: lantiq: gphy: Drop reboot/remove reset asserts
Date: Fri, 25 May 2018 13:12:39 +0300	[thread overview]
Message-ID: <CABwW5nkcBT3FmUy6A_t3E5VU3Z78eut3anPe06=yYbLeMrtg3A@mail.gmail.com> (raw)
In-Reply-To: <20180524120733.GA24269@jamesdev>

2018-05-24 15:07 GMT+03:00 James Hogan <jhogan@kernel.org>:
> On Mon, May 21, 2018 at 05:39:32PM +0100, James Hogan wrote:
>> On Sun, Apr 08, 2018 at 10:30:03AM +0200, Mathias Kresin wrote:
>> > While doing a global software reset, these bits are not cleared and let
>> > some bootloader fail to initialise the GPHYs. The bootloader don't
>> > expect the GPHYs in reset, as they aren't during power on.
>> >
>> > The asserts were a workaround for a wrong syscon-reboot mask. With a
>> > mask set which includes the GPHY resets, these resets aren't required
>> > any more.
>> >
>> > Fixes: 126534141b45 ("MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd")
>> > Cc: stable@vger.kernel.org # 4.14+
>> > Signed-off-by: Mathias Kresin <dev@kresin.me>
>>
>> Applied for 4.17. Thanks for the acks/reviews folk!
>
> drivers/soc/lantiq/gphy.c: In function ‘xway_gphy_remove’:
> drivers/soc/lantiq/gphy.c:198:6: warning: unused variable ‘ret’ [-Wunused-variable]
>   int ret;
>       ^~~
> drivers/soc/lantiq/gphy.c:196:17: warning: unused variable ‘dev’ [-Wunused-variable]
>   struct device *dev = &pdev->dev;
>                  ^~~
>
> Easily fixed, I can drop those two lines:
>
> diff --git a/drivers/soc/lantiq/gphy.c b/drivers/soc/lantiq/gphy.c
> index 8c31ae750987..feeb17cebc25 100644
> --- a/drivers/soc/lantiq/gphy.c
> +++ b/drivers/soc/lantiq/gphy.c
> @@ -193,9 +193,7 @@ static int xway_gphy_probe(struct platform_device *pdev)
>
>  static int xway_gphy_remove(struct platform_device *pdev)
>  {
> -       struct device *dev = &pdev->dev;
>         struct xway_gphy_priv *priv = platform_get_drvdata(pdev);
> -       int ret;
>
>         iowrite32be(0, priv->membase);
>
> However it does raise the question, it sounds like a fix, but was this
> patch tested and the warning just overlooked?

Yes the patch is tested. It is committed to OpenWrt on top of 4.14
since a while.

It is as simple as I didn't noticed the warnings.

Thanks a lot for fixing the warnings
Mathias

      reply	other threads:[~2018-05-25 10:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-08  8:30 [PATCH] MIPS: lantiq: gphy: Drop reboot/remove reset asserts Mathias Kresin
2018-04-08 21:30 ` Martin Blumenstingl
2018-04-22 19:18 ` Hauke Mehrtens
2018-05-21 16:39 ` James Hogan
2018-05-24 12:07   ` James Hogan
2018-05-25 10:12     ` Mathias Kresin [this message]

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='CABwW5nkcBT3FmUy6A_t3E5VU3Z78eut3anPe06=yYbLeMrtg3A@mail.gmail.com' \
    --to=dev@kresin.me \
    --cc=hauke@hauke-m.de \
    --cc=jhogan@kernel.org \
    --cc=john@phrozen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=stable@vger.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 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).