From: Krzysztof Adamski <k@japko.eu>
To: Joe Perches <joe@perches.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Malcolm Priestley <tvboxspy@gmail.com>,
Forest Bond <forest@alittletooquiet.net>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: vt6656: Use ether_addr_copy() in vnt_fill_ieee80211_rts.
Date: Tue, 16 Dec 2014 09:53:58 +0100 [thread overview]
Message-ID: <20141216085357.GB14666@box2.japko.eu> (raw)
In-Reply-To: <1418719326.2674.32.camel@perches.com>
On Tue, Dec 16, 2014 at 12:42:06AM -0800, Joe Perches wrote:
>On Tue, 2014-12-16 at 09:30 +0100, Krzysztof Adamski wrote:
>> Both struct ieee80211_rts and struct ieee80211_hdr defined in
>> linux/ieee80211.h are declared as __aligned(2) so it is safe to use
>> ether_addr_copy() instead of memcpy().
>
>Just fyi:
>
>That the structure is declared __aligned(2) is not
>the important bit. What's necessary is that the
>members in the struct are __aligned(2).
>
>In this case, all of these members are.
Hi,
Thank you for your feedback. Yes, you are right. It was a bit of a
shortcut in my reasoning. Since struct is aligned and it's packed and
both members preceding the array we want to copy are 16 bit large, the
array address is guaranteed to be properly aligned.
Best regards,
Krzysztof Adamski
next prev parent reply other threads:[~2014-12-16 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 8:30 Krzysztof Adamski
2014-12-16 8:42 ` Joe Perches
2014-12-16 8:53 ` Krzysztof Adamski [this message]
2015-01-13 3:37 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2014-12-08 11:13 Krzysztof Adamski
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=20141216085357.GB14666@box2.japko.eu \
--to=k@japko.eu \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tvboxspy@gmail.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®