From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f68.google.com (mail-oi0-f68.google.com [209.85.218.68]) by dpdk.org (Postfix) with ESMTP id 96670C4B4 for ; Thu, 23 Jun 2016 12:26:59 +0200 (CEST) Received: by mail-oi0-f68.google.com with SMTP id s17so10768699oih.1 for ; Thu, 23 Jun 2016 03:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=D7q7g4p9LWq7plaU+zN/VS9DDfW31e0vKM5/sgy7Bww=; b=a6f+Z+tFDLWAFbaLyS3zmss9DvkG7+26vzBAWl3evhAV+ndh0FqegCuBSGV8Q0zwEY 75JMdh1p5o6t79uoZbwpdvA2bfg13x0GE5MKHlMyYuOUiRlqvkGSdL6K3UvHzvy0Zmy3 +my/E94BLa3i0mk2vwm+dm6gYdIbNFDcMReQo+GMBqi+wVOK5BKKVLOukfoUfWlrs9Cc EfXMWrh0PSF+YPJ+hS8xsK0yiAIlQlzXYi92QdVKb9zH5mqiSP14iSV2meFkajaaxNLw anMen/SaPFWULv9bhgaSaFWu9d4AaKgnENln87cSSHjSROoJ5KoSq4xLYrIHF9Cir5nJ WAhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=D7q7g4p9LWq7plaU+zN/VS9DDfW31e0vKM5/sgy7Bww=; b=JqMAQjdEIjcCkQquduqhgOPHfawOLbnCVtxwUlIvJ47su4/ar5T8ZxMcotAXH13cJm rYs6uUO+Di41XtZH5xjblsr1w1Kfud/yN2W6JQREDyd99Qrj7Rt7F/U0A0eSXhcnZI9a gYiUsWyb3osQK9D/355gfnU+CFppKjJlwpRgBWwARx4tNdsTG+ZjN4TKC9sw3dTnAicP VBuEOWZcna3lENOdM965MlkUzjh1Bpc4Y+tIECpcBPjSbLZLRTiZDpQLw4E5Nd4GS1H9 iasOOTpEp4Mp8XNlEtojRSDmn8bPp0GfaegWOY3zkU0+hL14ioSLEsF5UV3qfyPbeVXB IiBQ== X-Gm-Message-State: ALyK8tK4RNqVPWNrcok+GpF3iCLaJJ3KuMZboGKKcvfc47WZge1XstMnwYNjfRLFBqC/TMpOLoi+NzoXJZwkdQ== X-Received: by 10.157.12.228 with SMTP id o33mr5565600otd.96.1466677619041; Thu, 23 Jun 2016 03:26:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.59.67 with HTTP; Thu, 23 Jun 2016 03:26:58 -0700 (PDT) In-Reply-To: <20160623092552.30932-1-mchandras@suse.de> References: <20160623092552.30932-1-mchandras@suse.de> From: Anupam Kapoor Date: Thu, 23 Jun 2016 15:56:58 +0530 Message-ID: To: Markos Chandras Cc: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] e1000/base: Add missing braces to the 'if' statements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2016 10:26:59 -0000 hi markos, please see : cba50f6be0db9efdf694dcf4bce4a6945a275182, which should already fix this. -- thanks anupam On Thu, Jun 23, 2016 at 2:55 PM, Markos Chandras 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 > --- > 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.