From: Michael Straube <straube.linux@gmail.com>
To: Joe Perches <joe@perches.com>, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] staging: rtl8188eu: use is_broadcast_ether_addr
Date: Sun, 29 Jul 2018 20:51:56 +0200 [thread overview]
Message-ID: <d4c695a5-39fe-4f96-49fb-58e574ec8cb2@gmail.com> (raw)
In-Reply-To: <85e40925-21aa-1030-24ed-9dce498b98f6@gmail.com>
On 07/29/18 20:21, Michael Straube wrote:
> On 07/29/18 19:59, Joe Perches wrote:
>> On Sun, 2018-07-29 at 19:42 +0200, Michael Straube wrote:
>>> On 07/29/18 19:21, Joe Perches wrote:
>>>> On Sun, 2018-07-29 at 19:08 +0200, Michael Straube wrote:
>>>>> Use is_broadcast_ether_addr instead of checking each byte of the
>>>>> address array for 0xff. Shortens the code and improves readability.
>>>>
>>>> You should show in the commit log that sta_addr is __aligned(2)
>>>> as required by is_broadcast_ether_addr, otherwise you could be
>>>> introducing runtime alignment defects.
>>>>
>>>
>>> Ok, sta_addr is used from following structs.
>>>
>>> struct ieee_param {
>>> u32 cmd;
>>> u8 sta_addr[ETH_ALEN];
>>> union {
>>> ...
>>> ...
>>> }; u
>>> };
>>>
>>> struct ieee_param_ex {
>>> u32 cmd;
>>> u8 sta_addr[ETH_ALEN];
>>> u8 data[0];
>>> };
>>>
>>> Well, looking at it now, I'm not sure about the alignment anymore
>>> in the struct that contains the union. Is sta_addr in the first
>>> struct __aligned(2)?
>>>
>>> Should I include the snippets in the commit message, or is just
>>> writing that sta_addr is __aligned(2) enough? (if it is in the
>>> first case...)
>>
>> It's enough to just state that the uses are properly aligned
>> as long as you looked and understand that it's required.
>>
>
> Ok, thank you.
>
> I looked at it and understand that it's required.
> But, as mentioned, at second look I'm not sure about the union.
>
> I guess I need to read a little more about the alignment of unions.
For now I will resend the series without this patch.
I don't feel comfortable with sending something I don't fully understand, yet.
Michael
next prev parent reply other threads:[~2018-07-29 18:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-29 17:08 [PATCH 1/8] staging: rtl8188eu: remove unused dump_txrpt_ccx_88e() Michael Straube
2018-07-29 17:08 ` [PATCH 2/8] staging: rtl8188eu: remove unused should_forbid_n_rate() Michael Straube
2018-07-29 17:08 ` [PATCH 3/8] staging: rtl8188eu: remove unused rtw_handle_tkip_mic_err() Michael Straube
2018-07-29 17:08 ` [PATCH 4/8] staging: rtl8188eu: remove redundant includes Michael Straube
2018-07-29 17:08 ` [PATCH 5/8] staging: rtl8188eu: replace tabs with spaces Michael Straube
2018-07-29 17:08 ` [PATCH 6/8] staging: rtl8188eu: fix comparsion to true Michael Straube
2018-07-29 17:08 ` [PATCH 7/8] staging: rtl8188eu: remove unnecessary parentheses Michael Straube
2018-07-29 17:08 ` [PATCH 8/8] staging: rtl8188eu: use is_broadcast_ether_addr Michael Straube
2018-07-29 17:21 ` Joe Perches
2018-07-29 17:42 ` Michael Straube
2018-07-29 17:59 ` Joe Perches
2018-07-29 18:21 ` Michael Straube
2018-07-29 18:51 ` Michael Straube [this message]
2018-07-29 20:05 ` Joe Perches
2018-07-30 17:14 ` Michael Straube
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=d4c695a5-39fe-4f96-49fb-58e574ec8cb2@gmail.com \
--to=straube.linux@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome