Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1627541rdb; Thu, 7 Dec 2023 04:51:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDMnZHQo1AXl/V3D+LBqH9eHSKnJcsDVyhonSxmuWYEXx4tvtle/XdxQQZ6EhgCTzDCVW7 X-Received: by 2002:a17:902:bd0c:b0:1d0:a7b7:74d6 with SMTP id p12-20020a170902bd0c00b001d0a7b774d6mr1888730pls.110.1701953468227; Thu, 07 Dec 2023 04:51:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701953468; cv=none; d=google.com; s=arc-20160816; b=sHUSJVCAAd/ytx6h9AjrjTKu+dPYYPwiC94CShsqnGWbb8DgeY8J9mDWuxTlzJASqF ZKkN/txQ41aAxDyYcPxcjxv/UGopPIpSQ/2Y+XmOPnhz98nhFaCTjsDRsniYRuUqneaF Q1SgUV7L5/Of/0dR0ZwidGA7FDkAJRO9qf18BTHsV3gpl8eBOl1dJ51xIUscjlU5XF7Y kb1ejcmGQVRtZqheJJ2NfJTWxSvMs6sTpFaNeGccltLdeqJGjAg9Aom0ZXd1jQZE4M1o YInIpDbxe7qS2UsOlv4DtBmKGWzIeYZL1mtsoBTW/SCpjqL/XW5o/myjpamMaeWR8X78 R86A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=G/l8D8QABUvkC5+jHZBRpX/pVnTRtfC9Y4GELgrHJWU=; fh=dVVMijTttPpHBAwT+ScrxDhzGcce+SJgeSbfnOkYn74=; b=mHZiB1yHDMiO/G2AjDtY1ofXyBi2G6eJ+v8cwro8VIzxvbsv/wvQ2FIXPB/+7wzCU6 7nyRPn+2NHk9B1mtTYw716Im68ONWVm7i9q+jIReHLtDLKon6oj3BOTIjKJOLfoLLlW7 Wo/iD9+JAa1Px77F2Mfx3yI1qAheoaEwIN0TbnN9PviMpfKu5J6JWFHxKuTa4pDWzkSG C8TDx1P1vQ2IZPauma/EaZ6fDWfxI5JBxCsW/pxm1fp2gtCjeOdOcU9D3473mrnqiOq2 uzkbVOxr5yqlWxiUfOj43RqX3FonuQqgOJE1XVKs4pQtQvYzBJrM6Xg5xsNN0B4AycYc BPCw== 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:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c5-20020a170902d90500b001d1db5e39adsi1129506plz.95.2023.12.07.04.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:51:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 18760804C603; Thu, 7 Dec 2023 04:51:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232583AbjLGMuv (ORCPT + 99 others); Thu, 7 Dec 2023 07:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379517AbjLGMus (ORCPT ); Thu, 7 Dec 2023 07:50:48 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2913122; Thu, 7 Dec 2023 04:50:54 -0800 (PST) X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="480411733" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="480411733" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 04:50:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="800717843" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="800717843" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 04:50:51 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rBDq3-00000002bNc-0J0l; Thu, 07 Dec 2023 14:50:47 +0200 Date: Thu, 7 Dec 2023 14:50:46 +0200 From: Andy Shevchenko To: Nick Desaulniers Cc: Greg KH , Al Viro , tanzirh@google.com, 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> <20231205213807.GE1674809@ZenIV> <2023120608-ivy-snowdrop-890d@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 04:51:05 -0800 (PST) On Tue, Dec 05, 2023 at 02:14:55PM -0800, Nick Desaulniers wrote: > On Tue, Dec 5, 2023 at 1:59 PM Greg KH wrote: ... > For example, lib/math/int_log.c includes asm/bug.h. Is that a case > where lib/math/int_log.c should be #include 'ing linux/bug.h rather > than asm/bug.h? For the C-files it's fine to include linux/* versions of asm/* ones, for the _headers_ I would prefer to be strictly minimalistic, because of possible header dependency hell. If something is defined in asm/* and some header wants to use that, it's better to include asm/*. -- With Best Regards, Andy Shevchenko