Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1295404 > unrolled thread

[PATCH] rsi: bool tests do not need comparison

Started byNicholas Mc Guire <hofrat@osadl.org>
First post2015-12-19 17:50 +0100
Last post2015-12-30 16:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rsi: bool tests do not need comparison Nicholas Mc Guire <hofrat@osadl.org> - 2015-12-19 17:50 +0100
    Re: rsi: bool tests do not need comparison Kalle Valo <kvalo@codeaurora.org> - 2015-12-30 16:40 +0100

#1295404 — [PATCH] rsi: bool tests do not need comparison

FromNicholas Mc Guire <hofrat@osadl.org>
Date2015-12-19 17:50 +0100
Subject[PATCH] rsi: bool tests do not need comparison
Message-ID<qHsRI-5Ed-7@gated-at.bofh.it>
This is an API consolidation only. Bool initializations should 
use true and false thus bool tests don't need an explicit comparison.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Found by coccinelle: scripts/coccinelle/misc/boolinit.cocci

Patch was compile tested with: x86_64_defconfig +
CONFIG_RSI_91X=m

Patch is against linux-next (localversion-next is -next-20151218)

 drivers/net/wireless/rsi/rsi_91x_mgmt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 8d110fd..90161aa 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -1227,7 +1227,7 @@ int rsi_send_block_unblock_frame(struct rsi_common *common, bool block_event)
 	mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
 	mgmt_frame->desc_word[1] = cpu_to_le16(BLOCK_HW_QUEUE);
 
-	if (block_event == true) {
+	if (block_event) {
 		rsi_dbg(INFO_ZONE, "blocking the data qs\n");
 		mgmt_frame->desc_word[4] = cpu_to_le16(0xf);
 	} else {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1299406 — Re: rsi: bool tests do not need comparison

FromKalle Valo <kvalo@codeaurora.org>
Date2015-12-30 16:40 +0100
SubjectRe: rsi: bool tests do not need comparison
Message-ID<qLr0Z-8qm-5@gated-at.bofh.it>
In reply to#1295404
> This is an API consolidation only. Bool initializations should 
> use true and false thus bool tests don't need an explicit comparison.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web