All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] Staging: rtl8192e: Avoid using bool structure members
@ 2019-02-21  7:47 Bhanusree Pola
  2019-02-21  8:37 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Bhanusree Pola @ 2019-02-21  7:47 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Greg Kroah-Hartman

-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;
 };
 
 static inline void copy_mac_addr(unsigned char *des, unsigned char *src)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-22  9:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.