[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120814.223258.1180104882398843954.davem@davemloft.net>
Date: Tue, 14 Aug 2012 22:32:58 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: cjren@....qualcomm.com
Cc: shemminger@...tta.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, qca-linux-team@...lcomm.com,
nic-devel@...lcomm.com, xiong@....qualcomm.com,
hao-ran.liu@...onical.com, joe@...ches.com,
rodrigue@....qualcomm.com
Subject: Re: [PATCH] net: add new QCA alx ethernet driver
From: "Ren, Cloud" <cjren@....qualcomm.com>
Date: Wed, 15 Aug 2012 03:29:26 +0000
>>> + strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
>>> ...
>>> + strcpy(netdev->name, "eth%d");
>>> + retval = register_netdev(netdev);
>>
>>The strcpy is unnecessary, alloc_etherdev already sets that.
>
> The strcpy is useful. netdev->name is set as pci_name in front. So the strcpy restores it.
Are you doing this just to influence the initial driver log messages?
Don't do that, it's gross.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists