DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: <Ajay.Kathat@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	johannes@sipsolutions.net, Ajay.Kathat@microchip.com,
	Adham.Abozaeid@microchip.com
Subject: [PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware
Date: Tue, 5 Nov 2019 09:51:22 +0000
Message-ID: <20191105095058.24223-2-ajay.kathat@microchip.com> (raw)
In-Reply-To: <20191105095058.24223-1-ajay.kathat@microchip.com>

From: Ajay Singh <ajay.kathat@microchip.com>

Use 'u8' instead of 'bool' datatype for struct element sent to firmware
because storage of bool datatype is not guaranteed.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_hif.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c
index e0a95c5cc0d5..59eb7600619b 100644
--- a/drivers/staging/wilc1000/wilc_hif.c
+++ b/drivers/staging/wilc1000/wilc_hif.c
@@ -32,7 +32,7 @@ struct wilc_op_mode {
 };
 
 struct wilc_reg_frame {
-	bool reg;
+	u8 reg;
 	u8 reg_id;
 	__le16 frame_type;
 } __packed;
@@ -1784,7 +1784,9 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 	wid.val = (u8 *)&reg_frame;
 
 	memset(&reg_frame, 0x0, sizeof(reg_frame));
-	reg_frame.reg = reg;
+
+	if (reg)
+		reg_frame.reg = 1;
 
 	switch (frame_type) {
 	case IEEE80211_STYPE_ACTION:
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
2019-11-05  9:51 ` Ajay.Kathat [this message]
2019-11-05  9:51 ` [PATCH 2/6] staging: wilc1000: remove 'wilc_' prefix from filenames Ajay.Kathat
2019-11-05  9:51 ` [PATCH 3/6] staging: wilc1000: added 'WILC_' prefix in header guard macro Ajay.Kathat
2019-11-05  9:51 ` [PATCH 4/6] staging: wilc1000: avoid use of C++ style comments Ajay.Kathat
2019-11-05  9:51 ` [PATCH 5/6] staging: wilc1000: added proper spacing for comments Ajay.Kathat
2019-11-05  9:51 ` [PATCH 6/6] staging: wilc1000: use defines for msg types received from firmware Ajay.Kathat

Reply instructions:

You may reply publically 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=20191105095058.24223-2-ajay.kathat@microchip.com \
    --to=ajay.kathat@microchip.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git