public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone
@ 2019-06-29 10:19 Hariprasad Kelam
  2019-06-29 10:32 ` Dan Carpenter
  2019-07-01  6:53 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2019-06-29 10:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Hariprasad Kelam, devel, linux-kernel

fix below issues reported by checkpatch

CHECK: Using comparison to false is error prone
CHECK: Using comparison to true is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/staging/rtl8723bs/hal/hal_intf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 4a4d17b..b9d13e3 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -230,7 +230,7 @@ s32	rtw_hal_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe)
 	/* pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; */
 	/* memcpy(pmgntframe->attrib.ra, pwlanhdr->addr1, ETH_ALEN); */
 
-	if (padapter->securitypriv.binstallBIPkey == true) {
+	if (padapter->securitypriv.binstallBIPkey) {
 		if (IS_MCAST(pmgntframe->attrib.ra)) {
 			pmgntframe->attrib.encrypt = _BIP_;
 			/* pmgntframe->attrib.bswenc = true; */
@@ -430,7 +430,7 @@ s32 rtw_hal_macid_sleep(struct adapter *padapter, u32 macid)
 
 	support = false;
 	rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
-	if (false == support)
+	if (!support)
 		return _FAIL;
 
 	rtw_hal_set_hwreg(padapter, HW_VAR_MACID_SLEEP, (u8 *)&macid);
@@ -445,7 +445,7 @@ s32 rtw_hal_macid_wakeup(struct adapter *padapter, u32 macid)
 
 	support = false;
 	rtw_hal_get_def_var(padapter, HAL_DEF_MACID_SLEEP, &support);
-	if (false == support)
+	if (!support)
 		return _FAIL;
 
 	rtw_hal_set_hwreg(padapter, HW_VAR_MACID_WAKEUP, (u8 *)&macid);
-- 
2.7.4


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

* Re: [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone
  2019-06-29 10:19 [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone Hariprasad Kelam
@ 2019-06-29 10:32 ` Dan Carpenter
  2019-07-01  6:53 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-06-29 10:32 UTC (permalink / raw)
  To: Hariprasad Kelam; +Cc: Greg Kroah-Hartman, devel, linux-kernel

You sent 10 patches with the same subject.

Btw, I can't recall ever seeing a bug caused by a true false comparison.
I agree on style principles with the checkpatch warning, but I do
think it over states the risk (which is as far as I can see is zero).

regards,
dan carpenter


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

* Re: [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone
  2019-06-29 10:19 [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone Hariprasad Kelam
  2019-06-29 10:32 ` Dan Carpenter
@ 2019-07-01  6:53 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-07-01  6:53 UTC (permalink / raw)
  To: Hariprasad Kelam; +Cc: devel, linux-kernel

On Sat, Jun 29, 2019 at 03:49:09PM +0530, Hariprasad Kelam wrote:
> fix below issues reported by checkpatch
> 
> CHECK: Using comparison to false is error prone
> CHECK: Using comparison to true is error prone
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/staging/rtl8723bs/hal/hal_intf.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

As Dan said, you sent 10 patches with the same subject, so I can't take
these.

Also, please properly "thread" the patches so they show up linked to
each other.  git send-email will do this automatically for you if you
use it (and you should) for multiple emails.

thanks,

greg k-h

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

end of thread, other threads:[~2019-07-01  6:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-29 10:19 [PATCH 01/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone Hariprasad Kelam
2019-06-29 10:32 ` Dan Carpenter
2019-07-01  6:53 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox