lkml.org 
[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: add new QCA alx ethernet driver
From
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?

Don't do that, it's gross.


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