All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhanusree Pola <bhanusreemahesh@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2 2/2] Staging: rtl8192e: Avoid using bool structure members
Date: Thu, 21 Feb 2019 09:37:34 +0100	[thread overview]
Message-ID: <20190221083734.GE6397@kroah.com> (raw)
In-Reply-To: <20190221074729.GA27093@bhanusree-MacBookAir>

On Thu, Feb 21, 2019 at 01:17:29PM +0530, Bhanusree Pola wrote:
> -Use 'u8' with bitfield instead of 'bool' to preserve space.
> -Also bool size can be 1 or sizeof(int) depending on the macro
>  definition given to bool
> -inorder to avoid alignment issues the u8 bitfield is placed as last
>  member of the structure.
> -removes 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 | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
> index 6d2b93acfa43..a1d879d316ed 100644
> --- a/drivers/staging/rtl8192e/dot11d.h
> +++ b/drivers/staging/rtl8192e/dot11d.h
> @@ -33,8 +33,6 @@ enum dot11d_state {
>   */
>  
>  struct rt_dot11d_info {
> -	bool enabled;
> -
>  	u16 country_len;
>  	u8  country_buffer[MAX_IE_LEN];
>  	u8  country_src_addr[6];
> @@ -44,6 +42,7 @@ struct rt_dot11d_info {
>  	u8  max_tx_power_list[MAX_CHANNEL_NUMBER + 1];
>  
>  	enum dot11d_state state;
> +	u8 enabled:1;

Again, no, this is not ok at all.  I thought I said so the last time you
sent this patch.  checkpatch.pl is a "hint", you do not always have to
follow everything it says to do.

thanks,

greg k-h


  reply	other threads:[~2019-02-21  8:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21  7:47 [PATCH v2 2/2] Staging: rtl8192e: Avoid using bool structure members Bhanusree Pola
2019-02-21  8:37 ` Greg Kroah-Hartman [this message]
2019-02-21  8:51   ` Bhanusree Mahesh
2019-02-21  9:02     ` [Outreachy kernel] " Vaishali Thakkar
2019-02-22  7:54       ` Bhanusree Mahesh
2019-02-22  8:04         ` Greg Kroah-Hartman
2019-02-22  9:56           ` Bhanusree Mahesh

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=20190221083734.GE6397@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.