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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 28 Jul 2020 20:26:10 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     周琰杰 (Zhou Yanjie) 
        <zhouyanjie@...yeetech.com>
Cc:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        USB <linux-usb@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Colin King <colin.king@...onical.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Paul Cercueil <paul@...pouillou.net>,
        prasannatsmkumar@...il.com, dongsheng.qiu@...enic.com,
        aric.pzqi@...enic.com, rick.tyliu@...enic.com,
        yanfei.li@...enic.com, sernia.zhou@...mail.com,
        zhenwenjin@...il.com
Subject: Re: [PATCH 1/1] USB: PHY: JZ4770: Fix static checker warning.

On Tue, Jul 28, 2020 at 8:09 PM 周琰杰 (Zhou Yanjie)
<zhouyanjie@...yeetech.com> wrote:
>
> The commit 2a6c0b82e651 ("USB: PHY: JZ4770: Add support for new
> Ingenic SoCs.") introduced the initialization function for different
> chips, but left the relevant code involved in the resetting process
> in the original function, resulting in uninitialized variable calls.
> This problem can be solved by putting this part of the code into the
> initialization function for each chip. Although the four processors
> currently supported have the same reset code, let us can solve this

'can' -> ''

> problem by adding the initialization of the reg variable to the
> original function, but when other processors with different reset
> methods (such as X2000) are introduced in the future, it will cause
> inevitable condition judgments to complicate the function, which
> violates the original intention of introducing initialization
> functions for each processor.
>
> Fixes: 2a6c0b82e651 ("USB: PHY: JZ4770: Add support for new
> Ingenic SoCs.").

No period at the end

>

No blank line in the tag block.

> Reported-by: Colin Ian King <colin.king@...onical.com>
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@...yeetech.com>

...

> +       /* Wait for PHY to reset */
> +       usleep_range(30, 300);
> +       writel(reg & ~USBPCR_POR, priv->base + REG_USBPCR_OFFSET);
> +       usleep_range(300, 1000);

Instead of copy'n'paste 4 times, you may provide a helper function.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ