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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABwW5nkcBT3FmUy6A_t3E5VU3Z78eut3anPe06=yYbLeMrtg3A@mail.gmail.com>
Date:   Fri, 25 May 2018 13:12:39 +0300
From:   Mathias Kresin <dev@...sin.me>
To:     James Hogan <jhogan@...nel.org>
Cc:     John Crispin <john@...ozen.org>, linux-mips@...ux-mips.org,
        linux-kernel@...r.kernel.org,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        hauke@...ke-m.de, stable@...r.kernel.org
Subject: Re: [PATCH] MIPS: lantiq: gphy: Drop reboot/remove reset asserts

2018-05-24 15:07 GMT+03:00 James Hogan <jhogan@...nel.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@...r.kernel.org # 4.14+
>> > Signed-off-by: Mathias Kresin <dev@...sin.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ