Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754013AbdG3J7i (ORCPT ); Sun, 30 Jul 2017 05:59:38 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:10802 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbdG3J7g (ORCPT ); Sun, 30 Jul 2017 05:59:36 -0400 Subject: Re: [PATCH V2 net-next 20/21] net-next/hinic: Add ethtool and stats To: Andrew Lunn CC: Joe Perches , , , , , , , References: <1500460074.25934.33.camel@perches.com> <9df7d969-6706-d702-a674-9207f5b1c3df@huawei.com> <20170726223327.GG7966@lunn.ch> From: Aviad Krawczyk Message-ID: <99112819-c71b-9925-0625-eda024dd6259@huawei.com> Date: Sun, 30 Jul 2017 12:59:00 +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: <20170726223327.GG7966@lunn.ch> 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.0A0B0208.597DADF0.003D,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: 771 Lines: 27 Hi, I saw that netif_err is more common in code, is it preferred on netdev_err? What is the preferred style, netif_ or netdev_? Best Regards, Aviad On 7/27/2017 1:33 AM, Andrew Lunn wrote: > On Wed, Jul 19, 2017 at 03:36:28PM +0300, Aviad Krawczyk wrote: >> 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. > > netdev_err() should be used when possible. You just have to be careful > in the probe() function, before netdev exists and you get "(NULL > net_device):" or before it is registered and you get "(unnamed > net_device)" instead of "eth42" etc. > > Andrew > > . >