From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 55E162BC8 for ; Fri, 26 Feb 2016 02:02:39 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 25 Feb 2016 17:02:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,498,1449561600"; d="scan'208";a="921386352" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 25 Feb 2016 17:02:38 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Feb 2016 17:02:37 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Feb 2016 17:02:37 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.232]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.24]) with mapi id 14.03.0248.002; Fri, 26 Feb 2016 09:02:35 +0800 From: "Lu, Wenzhuo" To: Aaron Conole , "dev@dpdk.org" Thread-Topic: [PATCH 3/8] drivers/net/e1000: Fix missing brackets Thread-Index: AQHRb/0sR/TOd8blnEq3HfdxZmyQ7589gi+A Date: Fri, 26 Feb 2016 01:02:35 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC090903435921@shsmsx102.ccr.corp.intel.com> References: <1456426121-21423-1-git-send-email-aconole@redhat.com> <1456426121-21423-4-git-send-email-aconole@redhat.com> In-Reply-To: <1456426121-21423-4-git-send-email-aconole@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/8] drivers/net/e1000: Fix missing brackets 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: Fri, 26 Feb 2016 01:02:39 -0000 Hi Aaron, > -----Original Message----- > From: Aaron Conole [mailto:aconole@redhat.com] > Sent: Friday, February 26, 2016 2:49 AM > To: dev@dpdk.org > Cc: Lu, Wenzhuo; Zhang, Helin; Ananyev, Konstantin; Richardson, Bruce > Subject: [PATCH 3/8] drivers/net/e1000: Fix missing brackets >=20 > The register read/write mphy functions have misleading whitespace around = the > locked check. This cleanup merely preserves the existing functionality wh= ile > improving the ready check. >=20 > Signed-off-by: Aaron Conole > --- > drivers/net/e1000/base/e1000_phy.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/e1000/base/e1000_phy.c > b/drivers/net/e1000/base/e1000_phy.c > index d43b7ce..8642d38 100644 > --- a/drivers/net/e1000/base/e1000_phy.c > +++ b/drivers/net/e1000/base/e1000_phy.c > @@ -4153,13 +4153,13 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw > *hw, u32 address, u32 *data) > *data =3D E1000_READ_REG(hw, E1000_MPHY_DATA); >=20 > /* Disable access to mPHY if it was originally disabled */ > - if (locked) > + if (locked) { > ready =3D e1000_is_mphy_ready(hw); > if (!ready) > return -E1000_ERR_PHY; > - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, > - E1000_MPHY_DIS_ACCESS); > + } >=20 > + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, > E1000_MPHY_DIS_ACCESS); > return E1000_SUCCESS; > } >=20 > @@ -4218,13 +4218,13 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw > *hw, u32 address, u32 data, > E1000_WRITE_REG(hw, E1000_MPHY_DATA, data); >=20 > /* Disable access to mPHY if it was originally disabled */ > - if (locked) > + if (locked) { > ready =3D e1000_is_mphy_ready(hw); > if (!ready) > return -E1000_ERR_PHY; > - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, > - E1000_MPHY_DIS_ACCESS); > + } >=20 > + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, > E1000_MPHY_DIS_ACCESS); > return E1000_SUCCESS; > } >=20 > -- > 2.5.0 Normally we will not maintain the base code. It's just taken from kernel dr= iver. Agree with you that the whitespace is misleading. But as it's no real impac= t. I'd like to say not a big deal, better not change it. :)