All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] phy: phy-brcm-sata: fix a loop timeout
Date: Mon, 18 Jul 2016 11:22:36 +0530	[thread overview]
Message-ID: <CAL2FKYmZEBu7kuN_zbDBDRJxajPNv4JRt6CgD7XfG2oDrGBa9w@mail.gmail.com> (raw)

On Tue, Jun 21, 2016 at 2:07 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Since this loop is a post op then it means we end with "try == -1" but
> afterward we test for if it's zero.  Fix this by changing to a pre-op so
> we end on zero.

Thanks Dan. That should be pre-op.

Thnaks
Dhananjay
>
> Fixes: 024812889ad1 ('phy: Add SATA3 PHY support for Broadcom NSP SoC')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/phy/phy-brcm-sata.c b/drivers/phy/phy-brcm-sata.c
> index 18d6626..c86456f 100644
> --- a/drivers/phy/phy-brcm-sata.c
> +++ b/drivers/phy/phy-brcm-sata.c
> @@ -329,7 +329,7 @@ static int brcm_nsp_sata_init(struct brcm_sata_port *port)
>
>         /* Wait for pll_seq_done bit */
>         try = 50;
> -       while (try--) {
> +       while (--try) {
>                 val = brcm_sata_phy_rd(base, BLOCK0_REG_BANK,
>                                         BLOCK0_XGXSSTATUS);
>                 if (val & BLOCK0_XGXSSTATUS_PLL_LOCK)

WARNING: multiple messages have this Message-ID (diff)
From: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] phy: phy-brcm-sata: fix a loop timeout
Date: Mon, 18 Jul 2016 05:52:42 +0000	[thread overview]
Message-ID: <CAL2FKYmZEBu7kuN_zbDBDRJxajPNv4JRt6CgD7XfG2oDrGBa9w@mail.gmail.com> (raw)

On Tue, Jun 21, 2016 at 2:07 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Since this loop is a post op then it means we end with "try = -1" but
> afterward we test for if it's zero.  Fix this by changing to a pre-op so
> we end on zero.

Thanks Dan. That should be pre-op.

Thnaks
Dhananjay
>
> Fixes: 024812889ad1 ('phy: Add SATA3 PHY support for Broadcom NSP SoC')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/phy/phy-brcm-sata.c b/drivers/phy/phy-brcm-sata.c
> index 18d6626..c86456f 100644
> --- a/drivers/phy/phy-brcm-sata.c
> +++ b/drivers/phy/phy-brcm-sata.c
> @@ -329,7 +329,7 @@ static int brcm_nsp_sata_init(struct brcm_sata_port *port)
>
>         /* Wait for pll_seq_done bit */
>         try = 50;
> -       while (try--) {
> +       while (--try) {
>                 val = brcm_sata_phy_rd(base, BLOCK0_REG_BANK,
>                                         BLOCK0_XGXSSTATUS);
>                 if (val & BLOCK0_XGXSSTATUS_PLL_LOCK)

             reply	other threads:[~2016-07-18  5:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18  5:52 Yendapally Reddy Dhananjaya Reddy [this message]
2016-07-18  5:52 ` [patch] phy: phy-brcm-sata: fix a loop timeout Yendapally Reddy Dhananjaya Reddy
  -- strict thread matches above, loose matches on Subject: below --
2017-05-18  7:42 [PATCH] phy: phy-brcm-sata: Fix " Dan Carpenter
2017-05-18  7:42 ` Dan Carpenter
2016-06-21  8:37 [patch] phy: phy-brcm-sata: fix " Dan Carpenter
2016-06-21  8:37 ` Dan Carpenter

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=CAL2FKYmZEBu7kuN_zbDBDRJxajPNv4JRt6CgD7XfG2oDrGBa9w@mail.gmail.com \
    --to=yendapally.reddy@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@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 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.