From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48871C41513 for ; Wed, 16 Aug 2023 13:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245678AbjHPNnQ (ORCPT ); Wed, 16 Aug 2023 09:43:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343518AbjHPNnH (ORCPT ); Wed, 16 Aug 2023 09:43:07 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92C8D30E0 for ; Wed, 16 Aug 2023 06:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692193369; x=1723729369; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=DDaqR8jxXrDXXR9QxQxqg4qA72d+XQzUFNNFvJlV6zg=; b=DK5dfPJwfbR1Tci7KqfiBz8rw5L4dmjUKjOvh5KqgcOzLRyTFg381k9t p782gSiUymXIU/swAZnybXEVseNXT8+nSW74ZRJe2khF9uRlGt1+b/1qZ UqxUuiaRMsOYzjAG3PaZXna4Gv2aYxFBo++09SBNIHu5X0JH8uMRpvtSc dM6aoBCU1lSBezFlOQEp5lyR1t09rZl6q6tgMxjvC1GY+jGrLzm7XE6uF QSzaW8QQvGe3KV1tTGIZkKunP7RyGoSDHGgKqdzVagXzhh2PNAlpSAbv3 Lw0yRgAKQvI3nMP8VcodU3J+2JlSmvAO+GGRoc3yGP+k2EQkqK0vXgDVh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="436435605" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="436435605" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 06:42:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="711118952" X-IronPort-AV: E=Sophos;i="6.01,177,1684825200"; d="scan'208";a="711118952" Received: from himal-super-server.iind.intel.com ([10.145.169.168]) by orsmga006.jf.intel.com with ESMTP; 16 Aug 2023 06:42:45 -0700 From: Himal Prasad Ghimiray Cc: Himal Prasad Ghimiray , Lucas De Marchi , Rodrigo Vivi , Badal Nilawar , Akinobu Mita , Jason Gunthorpe , Jens Axboe , Qi Zheng , linux-kernel@vger.kernel.org Subject: [PATCH 1/1] fault-inject: Include linux/types.h by default. Date: Wed, 16 Aug 2023 19:17:48 +0530 Message-Id: <20230816134748.979231-1-himal.prasad.ghimiray@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Functions should_fail_alloc_page, should_failslab, and __should_failslab are declared irrespective of CONFIG_FAULT_INJECTION. These functions use bool and gfp_t types, which are treated as unknown when CONFIG_FAULT_INJECTION is disabled because the inclusion of linux/types.h is missing. Fixes: 6ff1cb355e62 ("[PATCH] fault-injection capabilities infrastructure") Cc: Lucas De Marchi Cc: Rodrigo Vivi Cc: Badal Nilawar Cc: Akinobu Mita Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Qi Zheng Cc: linux-kernel@vger.kernel.org Signed-off-by: Himal Prasad Ghimiray --- include/linux/fault-inject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index 481abf530b3c..f83ab2b6cd08 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h @@ -2,9 +2,10 @@ #ifndef _LINUX_FAULT_INJECT_H #define _LINUX_FAULT_INJECT_H +#include + #ifdef CONFIG_FAULT_INJECTION -#include #include #include #include -- 2.25.1