All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "周琰杰 (Zhou Yanjie)" <zhouyanjie@wanyeetech.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	USB <linux-usb@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Colin King <colin.king@canonical.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Paul Cercueil <paul@crapouillou.net>,
	prasannatsmkumar@gmail.com, dongsheng.qiu@ingenic.com,
	aric.pzqi@ingenic.com, rick.tyliu@ingenic.com,
	yanfei.li@ingenic.com, sernia.zhou@foxmail.com,
	zhenwenjin@gmail.com
Subject: Re: [PATCH 1/1] USB: PHY: JZ4770: Fix static checker warning.
Date: Tue, 28 Jul 2020 20:26:10 +0300	[thread overview]
Message-ID: <CAHp75VevCu2Diojjam1q76nSdOOsfB_3kXCYFLPMfwad8kHv+A@mail.gmail.com> (raw)
In-Reply-To: <20200728170251.112484-2-zhouyanjie@wanyeetech.com>

On Tue, Jul 28, 2020 at 8:09 PM 周琰杰 (Zhou Yanjie)
<zhouyanjie@wanyeetech.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@canonical.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.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

  reply	other threads:[~2020-07-28 17:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 17:02 [PATCH 0/1] Fix static checker warning 周琰杰 (Zhou Yanjie)
2020-07-28 17:02 ` [PATCH 1/1] USB: PHY: JZ4770: " 周琰杰 (Zhou Yanjie)
2020-07-28 17:26   ` Andy Shevchenko [this message]
2020-08-25  8:16 [PATCH 0/1] " 周琰杰 (Zhou Yanjie)
2020-08-25  8:16 ` [PATCH 1/1] USB: PHY: JZ4770: " 周琰杰 (Zhou Yanjie)
2020-08-27 13:06   ` Felipe Balbi

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=CAHp75VevCu2Diojjam1q76nSdOOsfB_3kXCYFLPMfwad8kHv+A@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=aric.pzqi@ingenic.com \
    --cc=balbi@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dongsheng.qiu@ingenic.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=paul@crapouillou.net \
    --cc=prasannatsmkumar@gmail.com \
    --cc=rick.tyliu@ingenic.com \
    --cc=sernia.zhou@foxmail.com \
    --cc=yanfei.li@ingenic.com \
    --cc=zhenwenjin@gmail.com \
    --cc=zhouyanjie@wanyeetech.com \
    /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.