All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anupam Kapoor <anupam.kapoor@gmail.com>
To: Markos Chandras <mchandras@suse.de>
Cc: dev@dpdk.org
Subject: Re: [PATCH] e1000/base: Add missing braces to the 'if' statements
Date: Thu, 23 Jun 2016 15:56:58 +0530	[thread overview]
Message-ID: <CAEXHiZH6nPkZNJM3UW0zhSP_1vgZ60rbfa96Z2BdctH71YFd-g@mail.gmail.com> (raw)
In-Reply-To: <20160623092552.30932-1-mchandras@suse.de>

hi markos,

please see : cba50f6be0db9efdf694dcf4bce4a6945a275182, which should already
fix this.

--
thanks
anupam


On Thu, Jun 23, 2016 at 2:55 PM, Markos Chandras <mchandras@suse.de> wrote:

> Add the missing braces to the 'if' statements to fix the misleading
> identation. This also fixes the following build errors when building
> with gcc >= 6:
>
> drivers/net/e1000/base/e1000_phy.c:4156:2:
> error: this 'if' clause does not guard... [-Werror=misleading-indentation]
> if (locked)
> ^~
>
> drivers/net/e1000/base/e1000_phy.c:4158:3:
> note: ...this statement, but the latter is misleadingly indented as if it
> is guarded by the 'if'
> if (!ready)
> ^~
>
> drivers/net/e1000/base/e1000_phy.c: In function 'e1000_write_phy_reg_mphy':
> drivers/net/e1000/base/e1000_phy.c:4221:2:
> error: this 'if' clause does not guard... [-Werror=misleading-indentation]
> if (locked)
> ^~
>
> drivers/net/e1000/base/e1000_phy.c:4223:3:
> note: ...this statement, but the latter is misleadingly indented as if it
> is guarded by the 'if'
> if (!ready)
> ^~
>
> Signed-off-by: Markos Chandras <mchandras@suse.de>
> ---
>  drivers/net/e1000/base/e1000_phy.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/e1000/base/e1000_phy.c
> b/drivers/net/e1000/base/e1000_phy.c
> index d43b7ce..33f478b 100644
> --- a/drivers/net/e1000/base/e1000_phy.c
> +++ b/drivers/net/e1000/base/e1000_phy.c
> @@ -4153,12 +4153,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw,
> u32 address, u32 *data)
>         *data = E1000_READ_REG(hw, E1000_MPHY_DATA);
>
>         /* Disable access to mPHY if it was originally disabled */
> -       if (locked)
> +       if (locked) {
>                 ready = e1000_is_mphy_ready(hw);
>                 if (!ready)
>                         return -E1000_ERR_PHY;
>                 E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
>                                 E1000_MPHY_DIS_ACCESS);
> +       }
>
>         return E1000_SUCCESS;
>  }
> @@ -4218,12 +4219,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw,
> u32 address, u32 data,
>         E1000_WRITE_REG(hw, E1000_MPHY_DATA, data);
>
>         /* Disable access to mPHY if it was originally disabled */
> -       if (locked)
> +       if (locked) {
>                 ready = e1000_is_mphy_ready(hw);
>                 if (!ready)
>                         return -E1000_ERR_PHY;
>                 E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL,
>                                 E1000_MPHY_DIS_ACCESS);
> +       }
>
>         return E1000_SUCCESS;
>  }
> --
> 2.8.4
>
>


-- 
In the beginning was the lambda, and the lambda was with Emacs, and Emacs
was the lambda.

  reply	other threads:[~2016-06-23 10:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  9:25 [PATCH] e1000/base: Add missing braces to the 'if' statements Markos Chandras
2016-06-23 10:26 ` Anupam Kapoor [this message]
2016-06-23 10:34   ` Markos Chandras
2016-06-23 10:46     ` Anupam Kapoor
2016-06-24  0:43 ` Lu, Wenzhuo
2016-06-24  7:12   ` Thomas Monjalon
2016-06-24  8:31     ` Lu, Wenzhuo
2016-06-27 15:05       ` Bruce Richardson
2016-06-27 14:39 ` Bruce Richardson
2016-06-27 15:47   ` Markos Chandras

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=CAEXHiZH6nPkZNJM3UW0zhSP_1vgZ60rbfa96Z2BdctH71YFd-g@mail.gmail.com \
    --to=anupam.kapoor@gmail.com \
    --cc=dev@dpdk.org \
    --cc=mchandras@suse.de \
    /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.