From: Johannes Berg <johannes@sipsolutions.net>
To: Joe Perches <joe@perches.com>
Cc: Fabian Frederick <fabf@skynet.be>,
linux-kernel <linux-kernel@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1] net/wireless/ibss.c: replace memcpy by ether_addr_copy
Date: Mon, 12 May 2014 20:51:50 +0200 [thread overview]
Message-ID: <1399920710.4337.26.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1399918029.9240.19.camel@joe-AO725>
On Mon, 2014-05-12 at 11:07 -0700, Joe Perches wrote:
> On Mon, 2014-05-12 at 20:00 +0200, Fabian Frederick wrote:
> > On Mon, 12 May 2014 10:50:25 -0700
> > Joe Perches <joe@perches.com> wrote:
> >
> > > On Mon, 2014-05-12 at 19:30 +0200, Fabian Frederick wrote:
> > > > This patch also fixes some comment checkpatch warnings
> > >
> > > Hello Fabian.
> > >
> > > For all the patches that replace memcpy(foo, bar, ETH_ALEN)
> > > with ether_addr_copy, did you use a tool to verify both
> > > arguments are __aligned(2) or did you do the verification
> > > visually?
> >
> > Hello Joe,
> >
> > I only replaced ETH_ALEN/memcpy .
> > AFAICS ETH_ALEN is defined 6 ...
>
> The difference here is that both arguments to
> ether_addr_copy, like all the is_<foo>_ether_addr
> helpers, must be __aligned(2). memcpy has
> no alignment requirement.
>
> Please verify that all these changes are to
> __aligned(2) arguments.
Seriously though, who cares. Only two of these patches really touch
paths where performance matters - and one of those is the lib80211 one
which is practically only used for certain ancient Intel devices, which
probably don't run on anything but IA where I'd guess the whole thing
doesn't really matter anyway.
I certainly don't see the benefit in changing all those other files,
particularly since it's not just that we have to verify alignment *now*,
we also have to add alignment attributes so that we don't break
alignment in the future.
Additionally doesn't even really save much typing:
memcpy(x, y, ETH_ALEN);
ether_addr_copy(x, y);
Finally, some of these patches are doing comment reformatting, which
clearly is out of scope for them.
As a consequence, I'm considering the net/wireless/util.c one, but none
of the others.
johannes
next prev parent reply other threads:[~2014-05-12 18:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 17:30 Fabian Frederick
2014-05-12 17:50 ` Joe Perches
2014-05-12 18:00 ` Fabian Frederick
2014-05-12 18:07 ` Joe Perches
2014-05-12 18:51 ` Johannes Berg [this message]
2014-05-12 19:17 ` Joe Perches
2014-05-13 7:30 ` Johannes Berg
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=1399920710.4337.26.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®