From patchwork Fri Jun 10 18:32:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12877908 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 8A1A0C433EF for ; Fri, 10 Jun 2022 18:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346894AbiFJSeR (ORCPT ); Fri, 10 Jun 2022 14:34:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241313AbiFJSeR (ORCPT ); Fri, 10 Jun 2022 14:34:17 -0400 Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B9A039141; Fri, 10 Jun 2022 11:34:10 -0700 (PDT) Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-12.nifty.com with ESMTP id 25AIX5TQ020882; Sat, 11 Jun 2022 03:33:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 25AIX5TQ020882 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1654885991; bh=lUG0NgnACAHHS74el4oK5OBZvnr8gUW/ueE3VkEfAzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TVkm43y1fPNy7bHuIMWG7DrGnrIceHzV6X1lU6v4ZL9E8/NLc7HBlXBUmeLQSrcTf O4tu6f8AtUkuDszRKWhXvE0+QRT6oE0/veGNGFRrDsUZYuV6Lr7pmYLf/Wqn2HVRO9 /uLwGVNVsIKmT6fFuBQYzixM4f7RTMTIOfJNPDpVRIDtmNUddZISqgXF3Rb2Zro+0S KgX2+FF1wYwZg1gcIs8+lU+S9Ogy8K1keaZFccyqirv+3YTgnx1yvi9KiMC3oB1xRP on3+vNDPgO4kDl5oexNjxh1Ct/6vJSvmFKERWW6G5SrufMm+6fcg+kF8C3InAgdmXL xBLUSPmhkWKNw== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Al Viro , Nicolas Pitre , Luis Chamberlain , linux-modules@vger.kernel.org, Ard Biesheuvel , Masahiro Yamada , Andy Whitcroft , Dwaipayan Ray , Joe Perches , Lukas Bulwahn , linux-kernel@vger.kernel.org Subject: [PATCH 5/7] checkpatch: warn if is included Date: Sat, 11 Jun 2022 03:32:34 +0900 Message-Id: <20220610183236.1272216-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220610183236.1272216-1-masahiroy@kernel.org> References: <20220610183236.1272216-1-masahiroy@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: With the previous refactoring, - is a wrapper of - is a wrapper of My hope is to replace #include --> #include for all *.S files. For now, adding a warning in the checkpatch. Signed-off-by: Masahiro Yamada --- scripts/checkpatch.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 503e8abbb2c1..f824d690a565 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3753,6 +3753,13 @@ sub process { "Avoid using '.L' prefixed local symbol names for denoting a range of code via 'SYM_*_START/END' annotations; see Documentation/asm-annotations.rst\n" . $herecurr); } +# warn if is included. +# is a wrapper of . Please include directly. + if ($tree && $rawline =~ m{^.\s*\#\s*include\s*\}) { + WARN("INCLUDE_LINUX_EXPORT", + "Please include instead of \n" . $herecurr); + } + # check we are in a valid source file C or perl if not then ignore this hunk next if ($realfile !~ /\.(h|c|pl|dtsi|dts)$/);