lkml.org 
[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] net: add new QCA alx ethernet driver
Date
From: David Miller [mailto:davem@davemloft.net]
Sent: Wednesday, August 15, 2012 1:33 PM

>From: "Ren, Cloud" <cjren@qca.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?

Yes.

>
>Don't do that, it's gross.

Ok, I will remove it.


\
 
 \ /
  Last update: 2012-08-15 08:25    [W:0.060 / U:5.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site