From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752982AbcELN1U (ORCPT ); Thu, 12 May 2016 09:27:20 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:18044 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898AbcELN1S (ORCPT ); Thu, 12 May 2016 09:27:18 -0400 Subject: Re: [PATCH net] drivers: net: Don't print unpopulated net_device name To: David Miller References: <1462898601-5429-1-git-send-email-harvey.hunt@imgtec.com> <20160511.192631.759104843385712307.davem@davemloft.net> CC: , , , , From: Harvey Hunt Message-ID: <573484AE.2040507@imgtec.com> Date: Thu, 12 May 2016 14:27:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160511.192631.759104843385712307.davem@davemloft.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.154.26] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On 12/05/16 00:26, David Miller wrote: > From: Harvey Hunt > Date: Tue, 10 May 2016 17:43:21 +0100 > >> @@ -1686,8 +1686,7 @@ dm9000_probe(struct platform_device *pdev) >> } >> >> if (!is_valid_ether_addr(ndev->dev_addr)) { >> - dev_warn(db->dev, "%s: Invalid ethernet MAC address. Please " >> - "set using ifconfig\n", ndev->name); >> + dev_warn(db->dev, "Invalid ethernet MAC address. Please set using ifconfig\n"); >> >> eth_hw_addr_random(ndev); >> mac_src = "random"; > > If we don't print the netdev name, it's harder for the user to see which > adapter has the problem. > > Therefore, it is better if you save some boolean state into a local variable > here, then print the warning right after register_netdev(). > > Likewise for the rest of your changes too. > Okay, I'll do that for v2. Thanks, Harvey