Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753568AbdGSMgx (ORCPT ); Wed, 19 Jul 2017 08:36:53 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:10324 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752727AbdGSMgu (ORCPT ); Wed, 19 Jul 2017 08:36:50 -0400 Subject: Re: [PATCH V2 net-next 20/21] net-next/hinic: Add ethtool and stats To: Joe Perches , CC: , , , , , References: <1500460074.25934.33.camel@perches.com> From: Aviad Krawczyk Message-ID: <9df7d969-6706-d702-a674-9207f5b1c3df@huawei.com> Date: Wed, 19 Jul 2017 15:36:28 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1500460074.25934.33.camel@perches.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.206.50.78] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.596F525B.01B7,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 25cccd3579907f8955f0cc09baf20041 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1068 Lines: 45 Hi Joe, I tried to be consistent with the comments before, that requested that we will use dev_err exclude some special cases for use netif. We will replace the dev_err(&netdev->dev,.. to netdev_err in the next fix. Thanks for review, Aviad On 7/19/2017 1:27 PM, Joe Perches wrote: > On Wed, 2017-07-19 at 17:19 +0800, Aviad Krawczyk wrote: >> Add ethtool operations and statistics operations. > > series trivia: > >> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c > [] >> @@ -67,6 +67,178 @@ > [] >> +static int hinic_get_link_ksettings(struct net_device *netdev, >> + struct ethtool_link_ksettings >> + *link_ksettings) >> +{ > [] >> + err = hinic_port_get_cap(nic_dev, &port_cap); >> + if (err) { >> + dev_err(&netdev->dev, "Failed to get port capabilities\n"); >> + return err; >> + } > > it looks like a lot of these dev_ calls > should be converted to netdev_ > > from: > dev_err(&netdev->dev, ...); > to: > netdev_err(netdev, ...); > > etc... > > > . >