lkml.org 
[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] net: add new QCA alx ethernet driver
    On Wed, 15 Aug 2012 05:39:11 +0000
    "Ren, Cloud" <cjren@qca.qualcomm.com> wrote:

    > 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.

    Before the driver is registered, use dev_info() type of logging.


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