From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BCE1B56A2 for ; Fri, 18 Mar 2016 02:03:26 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 17 Mar 2016 18:03:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,352,1455004800"; d="scan'208";a="939800454" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 17 Mar 2016 18:03:25 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Mar 2016 18:03:25 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Mar 2016 18:03:25 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.132]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0248.002; Fri, 18 Mar 2016 09:03:23 +0800 From: "Zhang, Helin" To: Aaron Conole , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "Richardson, Bruce" Thread-Topic: [PATCH 3/8] drivers/net/e1000: Fix missing brackets Thread-Index: AQHRb/0sN4G/ypnZyk2GzjyjUJ0vcp9eg3aA Date: Fri, 18 Mar 2016 01:03:23 +0000 Message-ID: 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-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGI3ZmFkMjgtY2U2NS00YzRhLThmN2ItZTMyNDk5YWJiZTBiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjdwbWZ4V3VzazJXeHdKXC9welRGdXRvdk45b2tCc0J5OEVKalF0bnFGQVwvUT0ifQ== 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, 18 Mar 2016 01:03:27 -0000 > -----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); I think the above line should be included in brackets above. Though we should avoid modifying any code in base driver, I'd suggest you to fix the issue here. Thank you! > 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; The same comments as above. Thanks! > } >=20 > -- > 2.5.0