From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, ast@fb.com, jbacik@fb.com
Cc: linux-kernel@vger.kernel.org, kbuild test robot <lkp@intel.com>
Subject: [PATCH] error-injection: Include definitions for bool and true/false
Date: Thu, 25 Apr 2019 22:33:27 +0800 [thread overview]
Message-ID: <20190425143327.17574-1-wqu@suse.com> (raw)
If error injection user hasn't included definitions for bool and
true/false, kernel may not compile under certain case, just like:
All errors (new ones prefixed by >>):
In file included from fs//btrfs/tree-checker.c:18:
>> include/linux/error-injection.h:15:15: error: unknown type name 'bool'
static inline bool within_error_injection_list(unsigned long addr)
^~~~
include/linux/error-injection.h: In function 'within_error_injection_list':
>> include/linux/error-injection.h:17:9: error: 'false' undeclared (first use in this function)
return false;
^~~~~
include/linux/error-injection.h:17:9: note: each undeclared identifier is reported only once for each function it appears in
Anyway the fix is straightforward, include <linux/types.h> for bool and
<linux/stddef.h> for true/false in error-injection.h to make it self
contained.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
include/linux/error-injection.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/error-injection.h b/include/linux/error-injection.h
index 280c61ecbf20..1a8e09978616 100644
--- a/include/linux/error-injection.h
+++ b/include/linux/error-injection.h
@@ -2,6 +2,8 @@
#ifndef _LINUX_ERROR_INJECTION_H
#define _LINUX_ERROR_INJECTION_H
+#include <linux/types.h> /* for bool */
+#include <linux/stddef.h> /* for true/false */
#ifdef CONFIG_FUNCTION_ERROR_INJECTION
#include <asm/error-injection.h>
--
2.21.0
reply other threads:[~2019-04-25 14:33 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=20190425143327.17574-1-wqu@suse.com \
--to=wqu@suse.com \
--cc=ast@fb.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
/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).