LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: CGEL <cgel.zte@gmail.com>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kees Cook <keescook@chromium.org>, KP Singh <kpsingh@google.com>,
	Tyler Hicks <tyhicks@linux.microsoft.com>,
	Tushar Sugandhi <tusharsu@linux.microsoft.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Scott Branden <scott.branden@broadcom.com>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	linux-kernel@vger.kernel.org,
	Jing Yangyang <jing.yangyang@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] include:ima: fix boolreturn.cocci warnings
Date: Mon, 23 Aug 2021 23:05:06 -0700	[thread overview]
Message-ID: <20210824060506.58942-1-deng.changcheng@zte.com.cn> (raw)

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

./include/linux/ima.h:189:8-9:WARNING:return of 0/1 in function
'is_ima_appraise_enabled' 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/ima.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/ima.h b/include/linux/ima.h
index b6ab66a..15b4938 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -186,7 +186,7 @@ extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name,
 #else
 static inline bool is_ima_appraise_enabled(void)
 {
-	return 0;
+	return false;
 }
 
 static inline void ima_inode_post_setattr(struct user_namespace *mnt_userns,
-- 
1.8.3.1



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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210824060506.58942-1-deng.changcheng@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=ardb@kernel.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jing.yangyang@zte.com.cn \
    --cc=keescook@chromium.org \
    --cc=kpsingh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scott.branden@broadcom.com \
    --cc=tusharsu@linux.microsoft.com \
    --cc=tyhicks@linux.microsoft.com \
    --cc=zealci@zte.com.cn \
    --cc=zohar@linux.ibm.com \
    --subject='Re: [PATCH linux-next] include:ima: 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).