From patchwork Thu Apr 25 14:33:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10917253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04F6C933 for ; Thu, 25 Apr 2019 14:33:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA50D28B61 for ; Thu, 25 Apr 2019 14:33:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E895528C88; Thu, 25 Apr 2019 14:33:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84E7A28B61 for ; Thu, 25 Apr 2019 14:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727499AbfDYOdn (ORCPT ); Thu, 25 Apr 2019 10:33:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:59702 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726790AbfDYOdf (ORCPT ); Thu, 25 Apr 2019 10:33:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A09A3AEE8; Thu, 25 Apr 2019 14:33:33 +0000 (UTC) From: Qu Wenruo To: linux-btrfs@vger.kernel.org, ast@fb.com, jbacik@fb.com Cc: linux-kernel@vger.kernel.org, kbuild test robot Subject: [PATCH] error-injection: Include definitions for bool and true/false Date: Thu, 25 Apr 2019 22:33:27 +0800 Message-Id: <20190425143327.17574-1-wqu@suse.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 for bool and for true/false in error-injection.h to make it self contained. Reported-by: kbuild test robot Signed-off-by: Qu Wenruo --- 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 /* for bool */ +#include /* for true/false */ #ifdef CONFIG_FUNCTION_ERROR_INJECTION #include