[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpW0SnpXfN-DjBm-72_23KxtzH8kXbbc3FiQn=VChdX3Ww@mail.gmail.com>
Date: Mon, 21 Nov 2016 20:20:22 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: YUAN Linyu <Linyu.Yuan@...atel-sbell.com.cn>
Cc: David Miller <davem@...emloft.net>,
"cugyly@....com" <cugyly@....com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup
On Tue, Nov 15, 2016 at 7:57 PM, YUAN Linyu
<Linyu.Yuan@...atel-sbell.com.cn> wrote:
> No, this patch will not change dev->name,
> It's care about ifa->ifa_label.
>> - if (colon)
>> - memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
>> - else
>> - memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
> When ifr.ifr_name have no colon, dev->name must equal to ifr.ifr_name.
> So we change to
>> - else
>> - memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
> Then if and else do same thing. Just one line is enough,
> memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
>
I don't understand why you try to optimize a slow path and some kind of
obsolete code.
Powered by blists - more mailing lists