From: Joe Perches <joe@perches.com>
To: punit vara <punitvara@gmail.com>
Cc: kbuild test robot <lkp@intel.com>,
kbuild-all@01.org, Larry Finger <Larry.Finger@lwfinger.net>,
Dogukan Ergun <dogukan.ergun@gmail.com>,
Florian Schilhabel <florian.c.schilhabel@googlemail.com>,
Joshua Clayton <stillcompiling@gmail.com>,
Greg KH <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Julia Lawall <Julia.Lawall@lip6.fr>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()
Date: Sun, 11 Oct 2015 10:23:31 -0700 [thread overview]
Message-ID: <1444584211.8012.25.camel@perches.com> (raw)
In-Reply-To: <CABXAfNK+Z3v9VfhsCBHdA137yFGPR8XK=ZW6-RR_Wg67TFgVjw@mail.gmail.com>
On Sun, 2015-10-11 at 16:42 +0530, punit vara wrote:
> following are the two structure need to be consider for alignment.
>
> struct iw_pmksa {
> __u32 cmd; /* 0 4 */
> struct sockaddr bssid; /* 4 16 */
> __u8 pmkid[16]; /* 20 16 */
wrong bssid, bssid here is on the stack
after a char *, so bssid is aligned on a
pointer boundary, either 4 or 8.
> /* size: 36, cachelines: 1, members: 3 */
> /* last cacheline: 36 bytes */
> };
>
> struct wlan_bssid_ex {
[]
> unsigned char MacAddress[6]; /* 4 6 */
> As I understood both are not aligned to u16 so
> ether_addr_equal_unaligned() should be used.
u16s are aligned when on any even address
So ether_addr_equal could be used.
next prev parent reply other threads:[~2015-10-11 17:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 16:58 [PATCH 0/4] Staging: rtl8712: Fix coding style warnings Punit Vara
2015-10-10 16:58 ` [PATCH 1/4] Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over memset() Punit Vara
2015-10-10 16:58 ` [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp() Punit Vara
2015-10-10 17:34 ` Larry Finger
2015-10-10 19:47 ` punit vara
2015-10-10 19:50 ` Julia Lawall
2015-10-10 20:22 ` punit vara
2015-10-10 20:26 ` punit vara
2015-10-10 23:59 ` kbuild test robot
2015-10-11 0:37 ` kbuild test robot
2015-10-11 11:12 ` punit vara
2015-10-11 17:23 ` Joe Perches [this message]
2015-10-10 16:58 ` [PATCH 3/4] Staging: rtl8712: Coding style warnings fix for block comments Punit Vara
2015-10-10 16:58 ` [PATCH 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test Punit Vara
2015-10-10 17:07 ` Julia Lawall
2015-10-10 19:52 ` punit vara
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=1444584211.8012.25.camel@perches.com \
--to=joe@perches.com \
--cc=Julia.Lawall@lip6.fr \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=dogukan.ergun@gmail.com \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=punitvara@gmail.com \
--cc=stillcompiling@gmail.com \
--cc=sudipm.mukherjee@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