From: Daniel Lezcano <daniel.lezcano@free.fr>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: davem@davemloft.net, opurdila@ixiacom.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net-2.6 : fix dev_get_valid_name
Date: Tue, 18 May 2010 21:55:05 +0200 [thread overview]
Message-ID: <4BF2F099.8000704@free.fr> (raw)
In-Reply-To: <20100518105451.05b060e8@nehalam>
On 05/18/2010 07:54 PM, Stephen Hemminger wrote:
> On Tue, 18 May 2010 19:35:12 +0200
> Daniel Lezcano<daniel.lezcano@free.fr> wrote:
>
>
>> +static int dev_get_valid_name(struct net_device *dev, const char *name, bool fmt)
>> {
>> + struct net *net;
>> +
>> + BUG_ON(!dev_net(dev));
>> + net = dev_net(dev);
>>
> This is not really part of the same fix. And not sure why it is added here?
>
I could have created a temporary buffer within the function and have
passed it to __dev_alloc_name but this is exactly what does
'dev_alloc_name'.
So 'dev_alloc_name' replaces '__dev_alloc_name' but takes a 'dev'
parameter which is not passed to 'dev_get_valid_name'.
Instead of passing an extra parameter 'dev', I just replaced the 'net'
parameter by the 'dev' parameter and extracted the 'net' pointer from it.
I have a few patches cleaning up these functions and the callers but I
prefer to send them against net-next-2.6.
prev parent reply other threads:[~2010-05-18 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 17:35 [PATCH] net-2.6 : fix dev_get_valid_name Daniel Lezcano
2010-05-18 17:54 ` Stephen Hemminger
2010-05-18 19:55 ` Daniel Lezcano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BF2F099.8000704@free.fr \
--to=daniel.lezcano@free.fr \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.com \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.