Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp593181rdb; Tue, 5 Dec 2023 14:05:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLvuFNuXUVMsiIpW1zrNIIDMXxkv742ore21X/9zeP9f7g41R19ZHPbTbsiZqYdONDsU6s X-Received: by 2002:aa7:9a89:0:b0:6ce:2732:1def with SMTP id x9-20020aa79a89000000b006ce27321defmr1604853pfi.41.1701813956477; Tue, 05 Dec 2023 14:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701813956; cv=none; d=google.com; s=arc-20160816; b=Sl0JxsABINdFmMbwngDyuCi2W25sWWc2PecQwoNV2/aDaZOyh6dWeGilDKvTfEF2jP rh+gnjUBxDNl/UMayrae72sMCBC4QJ620eAfSa8vLG9PH/F9T+OQ+9+rn/cVt1Szkxdd 8HXkxEor7AjsE+BD5riq7L/5Q1j3K4+9uTllfpwIiiqhMHQLUzF75zN9C+jQ0UjAsh8v zXkkWkh6JEifbdswjyFn2h6l2b4VJ2X6ZnICgk476gwX6J59GfOmoUTtafDx0E0raWSi /jaawKe5iXQpf8GUJbtHlWXsu9zB637Wvtch+/oYCiOHnFTpMvhsJmFnkAdXFTNlfLdt SA0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rCF/KtpqhuurWumI8kh06/9WhDgoLIdi5Qc890KtmcQ=; fh=yvIEhBcO+xgPaNBqSIrzwIqmaSOLfOK3t3rjkGim9iQ=; b=r/UuCg6tzkupX1TCKww6aVsj6IUBBM+OmUIHLMKt/E1HUGPD7t2Mb2W5/ZR/7s2rd9 o79d7f3fU8FIDPJFxrUjxChvwAkwtnF9PIlVl0FCnAwqWOL+L3Kiw8/yt/a9BYuS2+h7 DPuV0QaV7W05HDf7lATyCLR3yLnRROc+rjLXPpTAARiCIC5BdA7e7X2vx5Zvn7Uk7dIx 6fYYiZA/fWmxw4Itqj2Ia6j402ae4ucqNPhGqpGFgdZ9a68kBUnRnak9H2yw5OcuTzQo Urc/LnxY7gkQqvMYw27SmO07jo8QOkwRNU0bWveKat1FiEoCM3tPWIKrNQR0nEOE1Rh3 u6AA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id w8-20020a056a0014c800b006ce6f21565fsi233446pfu.272.2023.12.05.14.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 14:05:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4965E8043ECE; Tue, 5 Dec 2023 14:05:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346435AbjLEWF2 (ORCPT + 99 others); Tue, 5 Dec 2023 17:05:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346425AbjLEWF0 (ORCPT ); Tue, 5 Dec 2023 17:05:26 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03E431B8; Tue, 5 Dec 2023 14:05:33 -0800 (PST) X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="393698772" X-IronPort-AV: E=Sophos;i="6.04,253,1695711600"; d="scan'208";a="393698772" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 14:05:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="1018352864" X-IronPort-AV: E=Sophos;i="6.04,253,1695711600"; d="scan'208";a="1018352864" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 14:05:30 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rAdXj-00000002C6W-2AhU; Wed, 06 Dec 2023 00:05:27 +0200 Date: Wed, 6 Dec 2023 00:05:27 +0200 From: Andy Shevchenko To: tanzirh@google.com, Jonathan Cameron Cc: Kees Cook , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nick DeSaulniers , Andrew Morton , llvm@lists.linux.dev Subject: Re: [PATCH] lib/string: shrink lib/string.i via IWYU Message-ID: References: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231205-libstringheader-v1-1-7f9c573053a7@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 14:05:48 -0800 (PST) +Cc: Jonathan, who tried IWYU with kernel a year or so ago. On Tue, Dec 05, 2023 at 08:58:53PM +0000, tanzirh@google.com wrote: > This diff uses an open source tool include-what-you-use (IWYU) to modify > the include list changing indirect includes to direct includes. > IWYU is implemented using the IWYUScripts github repository which is a tool that is > currently undergoing development. These changes seek to improve build times. > > This change to lib/string.c resulted in a preprocessed size of > lib/string.i from 26371 lines to 5232 lines (-80%). > > If there are any problems with the output of the tool please raise an > issue on the github. > > Link: https://github.com/ClangBuiltLinux/IWYUScripts > > Signed-off-by: Tanzir Hasan > --- > > --- > lib/string.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/lib/string.c b/lib/string.c > index be26623953d2..aff066e9da9f 100644 > --- a/lib/string.c > +++ b/lib/string.c > @@ -16,16 +16,16 @@ > > #define __NO_FORTIFY > #include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > #include > #include > -#include > -#include > -#include > -#include > -#include > - > #include > -#include > #include > #include > -- With Best Regards, Andy Shevchenko