linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: CGEL <cgel.zte@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jing Yangyang <jing.yangyang@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] include:libata: fix boolreturn.cocci warnings
Date: Mon, 23 Aug 2021 23:07:02 -0700	[thread overview]
Message-ID: <20210824060702.59006-1-deng.changcheng@zte.com.cn> (raw)

From: Jing Yangyang <jing.yangyang@zte.com.cn>

./include/linux/libata.h:1462:8-9:WARNING: return of 0/1 in function
'ata_is_host_link' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 include/linux/libata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index a2d1bae..860e63f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1459,7 +1459,7 @@ static inline bool sata_pmp_attached(struct ata_port *ap)
 
 static inline bool ata_is_host_link(const struct ata_link *link)
 {
-	return 1;
+	return true;
 }
 #endif /* CONFIG_SATA_PMP */
 
-- 
1.8.3.1



             reply	other threads:[~2021-08-24  6:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  6:07 CGEL [this message]
2021-08-24 16:11 ` Jens Axboe

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=20210824060702.59006-1-deng.changcheng@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=jing.yangyang@zte.com.cn \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zealci@zte.com.cn \
    --subject='Re: [PATCH linux-next] include:libata: fix boolreturn.cocci warnings' \
    /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

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).