From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhanusree Pola <bhanusreemahesh@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH 2/2] Staging: rtl8192e: Avoid using bool structure members
Date: Wed, 20 Feb 2019 08:53:48 +0100 [thread overview]
Message-ID: <20190220075348.GA14929@kroah.com> (raw)
In-Reply-To: <20190220073011.GA21216@bhanusree-MacBookAir>
On Wed, Feb 20, 2019 at 01:00:11PM +0530, Bhanusree Pola wrote:
> Use 'u8' with bitfield instead of 'bool' to avoid alignment
> issues and remove checkpatch.pl check:
> CHECK: Avoid using bool structure members because of possible alignment
> issues
>
> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
> ---
> drivers/staging/rtl8192e/dot11d.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
> index 44f11f629922..f3e8373b1312 100644
> --- a/drivers/staging/rtl8192e/dot11d.h
> +++ b/drivers/staging/rtl8192e/dot11d.h
> @@ -29,7 +29,7 @@ enum dot11d_state {
> */
>
> struct rt_dot11d_info {
> - bool enabled;
> + u8 enabled:1;
Ick, no, that might just have caused a lot more work to have happen to
access that variable (think about how a bool is stored and accessed vs.
a bitfield).
There's nothing wrong with this bool as-is, I would leave it alone.
thanks,
greg k-h
prev parent reply other threads:[~2019-02-20 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 7:30 [PATCH 2/2] Staging: rtl8192e: Avoid using bool structure members Bhanusree Pola
2019-02-20 7:53 ` Greg Kroah-Hartman [this message]
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=20190220075348.GA14929@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bhanusreemahesh@gmail.com \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.