linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Runzhe Wang <xia1@linux.alibaba.com>
To: davem@davemloft.net
Cc: kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Runzhe Wang <xia1@linux.alibaba.com>
Subject: [PATCH] NFC:Fix Warning: Comparison to bool
Date: Thu, 26 Nov 2020 15:15:42 +0800	[thread overview]
Message-ID: <1606374942-1570157-1-git-send-email-xia1@linux.alibaba.com> (raw)

This patch uses the shdlc->rnr variable as a judgment condition of
statement, rather than compares with bool.

Signed-off-by: Runzhe Wang <xia1@linux.alibaba.com>
Reported-by: Abaci <abaci@linux.alibaba.com>
---
 net/nfc/hci/llc_shdlc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/nfc/hci/llc_shdlc.c b/net/nfc/hci/llc_shdlc.c
index 0eb4ddc..f178a42 100644
--- a/net/nfc/hci/llc_shdlc.c
+++ b/net/nfc/hci/llc_shdlc.c
@@ -319,7 +319,7 @@ static void llc_shdlc_rcv_s_frame(struct llc_shdlc *shdlc,
 	switch (s_frame_type) {
 	case S_FRAME_RR:
 		llc_shdlc_rcv_ack(shdlc, nr);
-		if (shdlc->rnr == true) {	/* see SHDLC 10.7.7 */
+		if (shdlc->rnr) {	/* see SHDLC 10.7.7 */
 			shdlc->rnr = false;
 			if (shdlc->send_q.qlen == 0) {
 				skb = llc_shdlc_alloc_skb(shdlc, 0);
-- 
1.8.3.1


             reply	other threads:[~2020-11-26  7:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  7:15 Runzhe Wang [this message]
2020-11-27 22:59 ` [PATCH] NFC:Fix Warning: Comparison to bool Jakub Kicinski

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=1606374942-1570157-1-git-send-email-xia1@linux.alibaba.com \
    --to=xia1@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).