Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752974AbdFQL5L convert rfc822-to-8bit (ORCPT ); Sat, 17 Jun 2017 07:57:11 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:8745 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752835AbdFQL5J (ORCPT ); Sat, 17 Jun 2017 07:57:09 -0400 From: Salil Mehta To: Andrew Lunn CC: "davem@davemloft.net" , "Zhuangyuzeng (Yisen)" , huangdaode , "lipeng (Y)" , "mehta.salil.lnk@gmail.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linuxarm Subject: RE: [PATCH V2 net-next 6/8] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC Thread-Topic: [PATCH V2 net-next 6/8] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC Thread-Index: AQHS5JptS1KqKLo8T0aC7jAwXGapTKIjiLsAgAVviCA= Date: Sat, 17 Jun 2017 11:56:49 +0000 Message-ID: References: <20170613231035.494020-1-salil.mehta@huawei.com> <20170613231035.494020-7-salil.mehta@huawei.com> <20170614025552.GC16215@lunn.ch> In-Reply-To: <20170614025552.GC16215@lunn.ch> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.203.181.160] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.59451912.0109,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=169.254.2.25, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 57cbbbafd8cd021fe14c0875896abb5a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 27 Hi Andrew, > -----Original Message----- > From: Andrew Lunn [mailto:andrew@lunn.ch] > Sent: Wednesday, June 14, 2017 3:56 AM > To: Salil Mehta > Cc: davem@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil.lnk@gmail.com; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org; Linuxarm > Subject: Re: [PATCH V2 net-next 6/8] net: hns3: Add MDIO support to > HNS3 Ethernet driver for hip08 SoC > > > + if (le16_to_cpu(HCLGE_MDIO_STA_VAL(mdio_cmd->sta))) { > > + dev_err(&hdev->pdev->dev, "mdio read data error\n"); > > + return -ENOMEM; > > + } > > If it is not zero, it is an error. !0 is always !0, big or little > endian, so there is no point doing the le16_to_cpu(). > > Where is the memory allocation which failed? > > Andrew Agreed! Will remove this. Thanks Salil