All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioannis Valasakis <code@wizofe.uk>
To: outreachy-kernel@googlegroups.com
Cc: gregkh@linuxfoundation.org, aditya.shankar@microchip.com,
	ganesh.krishna@microchip.com
Subject: [PATCH 3/3] staging: wilc1000: Change struct members from bool to u8
Date: Wed, 10 Oct 2018 15:48:21 +0100	[thread overview]
Message-ID: <e409baf10c6cc043344f1a63712d661611953973.1539182155.git.code@wizofe.uk> (raw)
In-Reply-To: <cover.1539182155.git.code@wizofe.uk>

Recent versions of checkpatch have a new warning based on a documented
preference of Linus to not use bool in structures due to wasted space and
the size of bool is implementation dependent.  For more information, see
the email thread at https://lkml.org/lkml/2017/11/21/384.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
---
 drivers/staging/wilc1000/coreconfigurator.h   |  4 ++--
 drivers/staging/wilc1000/host_interface.h     |  8 ++++----
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index b62acb447383..dbea5144395e 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -30,7 +30,7 @@
 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
 
 struct rssi_history_buffer {
-	bool full;
+	u8 full;
 	u8 index;
 	s8 samples[NUM_RSSI];
 };
@@ -46,7 +46,7 @@ struct network_info {
 	u8 ch;
 	unsigned long time_scan_cached;
 	unsigned long time_scan;
-	bool new_network;
+	u8 new_network;
 	u8 found;
 	u32 tsf_lo;
 	u8 *ies;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 84866a62a4d4..f76dc682f882 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -217,7 +217,7 @@ struct user_conn_req {
 	u8 *ies;
 	size_t ies_len;
 	wilc_connect_result conn_result;
-	bool ht_capable;
+	u8 ht_capable;
 	void *arg;
 };
 
@@ -252,7 +252,7 @@ struct remain_ch {
 };
 
 struct reg_frame {
-	bool reg;
+	u8 reg;
 	u16 frame_type;
 	u8 reg_id;
 };
@@ -282,7 +282,7 @@ struct host_if_drv {
 	struct timer_list remain_on_ch_timer;
 	struct wilc_vif *remain_on_ch_timer_vif;
 
-	bool ifc_up;
+	u8 ifc_up;
 	int driver_handler_id;
 };
 
@@ -291,7 +291,7 @@ struct add_sta_param {
 	u16 aid;
 	u8 rates_len;
 	const u8 *rates;
-	bool ht_supported;
+	u8 ht_supported;
 	struct ieee80211_ht_cap ht_capa;
 	u16 flags_mask;
 	u16 flags_set;
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index b7eee772f3fe..347b35ceead4 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -75,7 +75,7 @@ struct wilc_priv {
 	struct wilc_wfi_p2p_listen_params remain_on_ch_params;
 	u64 tx_cookie;
 
-	bool cfg_scanning;
+	u8 cfg_scanning;
 	u32 rcvd_ch_cnt;
 
 	u8 associated_bss[ETH_ALEN];
@@ -93,13 +93,13 @@ struct wilc_priv {
 	u8 wilc_groupkey;
 	/* mutexes */
 	struct mutex scan_req_lock;
-	bool p2p_listen_state;
+	u8 p2p_listen_state;
 
 };
 
 struct frame_reg {
 	u16 type;
-	bool reg;
+	u8 reg;
 };
 
 struct wilc_vif {
@@ -123,7 +123,7 @@ struct wilc {
 	int io_type;
 	int mac_status;
 	struct gpio_desc *gpio_irq;
-	bool initialized;
+	u8 initialized;
 	int dev_irq_num;
 	int close;
 	u8 vif_num;
@@ -163,7 +163,7 @@ struct wilc {
 	const struct firmware *firmware;
 
 	struct device *dev;
-	bool suspend_event;
+	u8 suspend_event;
 
 	struct rf_info dummy_statistics;
 };
-- 
2.19.1




  parent reply	other threads:[~2018-10-10 14:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 14:46 [PATCH 0/3] staging: wilc1000 Ioannis Valasakis
2018-10-10 14:47 ` [PATCH 1/3] staging: wilc1000: replace udelay with usleep_range Ioannis Valasakis
2018-10-10 14:54   ` [Outreachy kernel] " Julia Lawall
2018-10-10 14:59     ` Ioannis Valasakis
2018-10-10 15:02       ` Julia Lawall
2018-10-10 15:13         ` Ioannis Valasakis
2018-10-10 18:33   ` Greg KH
2018-10-10 14:47 ` [PATCH 2/3] staging: wilc1000: prefer 'help' in KConfig Ioannis Valasakis
2018-10-10 14:48 ` Ioannis Valasakis [this message]
2018-10-10 14:58   ` [Outreachy kernel] [PATCH 3/3] staging: wilc1000: Change struct members from bool to u8 Julia Lawall
2018-10-10 18:10   ` Himanshu Jha
2018-10-10 18:32   ` Greg KH
2018-10-11  8:52     ` Ioannis Valasakis

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=e409baf10c6cc043344f1a63712d661611953973.1539182155.git.code@wizofe.uk \
    --to=code@wizofe.uk \
    --cc=aditya.shankar@microchip.com \
    --cc=ganesh.krishna@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --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.