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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 225D4C00528 for ; Fri, 4 Aug 2023 20:32:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B61F6B0071; Fri, 4 Aug 2023 16:32:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83F806B0072; Fri, 4 Aug 2023 16:32:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B8DE6B0074; Fri, 4 Aug 2023 16:32:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 57F986B0071 for ; Fri, 4 Aug 2023 16:32:08 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2127AC06C9 for ; Fri, 4 Aug 2023 20:32:08 +0000 (UTC) X-FDA: 81087569136.09.BD23173 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by imf30.hostedemail.com (Postfix) with ESMTP id 4424C80013 for ; Fri, 4 Aug 2023 20:32:04 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=nyLuHB7O; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf30.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 134.134.136.65) smtp.mailfrom=andriy.shevchenko@linux.intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691181126; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=R+RUWX28hZwALIFj+2L0l1c59KQ53dK04rN66cG/7uE=; b=CteLjJBQ5lWGzuGGKO10k+/bc/G4Nv2aXVBd4vcDxGGYhaQY+8uUrhulPU/MRKcWv7RUTi ztwJL3reN2mWvLQlE7WAivSSgG92MK01ADY9VC4R36nUsz+Pmqx1f+vadpdm0gXtSXyyTN r0GGezXW97WFWAZeawHANMITnDhYe44= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=nyLuHB7O; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf30.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 134.134.136.65) smtp.mailfrom=andriy.shevchenko@linux.intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691181126; a=rsa-sha256; cv=none; b=xBjB8xordRVY/+O8Bv2o+F0ylQrLDwWTi55riC/QHqnzCrMuoVcckvesvBaMGEUNb4pNZA m3YuCoyPMS/289jmRLr99kFHY8MyOOTrCzF6fG3iObfmzqEfX+zh3GbiotWUZnFbNknpz1 gsMrL10b7h/Sv4DWhd8VE8otxTJ2Gnw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691181125; x=1722717125; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t5iZxzWJ77jyknlbwewqXxpRaUFyHhslImuVj5UImbY=; b=nyLuHB7OaiNGzmNfB8ph59Hv55gytIk9u90AaH2CHJPOcU4oLTwJEwec 54w9p+XErCv10O/1xLL8n5VzMf5yyyiRRUncSKAFqCZMRPI9nFtp2CvN+ awDog266JCGcq9wNn9ymQFR62kTiTx05iLpGyxXqchqD9AQ0EGG5uUWgg c2ptHhEUqMF/A4u9/PUgVXgVIHvD8HiRa9fq2uAJ7HV4LczGHnENosfSy B0feGsdeRIqIrji2HoIKqfgFnaSqPRyOckRIVbbimYsI+EMSbg4Q+R7id GwF1WuNRmZafsY24owelRVzSBp71xMpyTwOedaMFRRoSnW98+GLlJ/K6t A==; X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="373895262" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="373895262" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2023 13:32:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="759701472" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="759701472" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 04 Aug 2023 13:32:00 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qS1So-006vh4-20; Fri, 04 Aug 2023 23:31:58 +0300 Date: Fri, 4 Aug 2023 23:31:58 +0300 From: Andy Shevchenko To: Rasmus Villemoes Cc: Marco Elver , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Alexander Potapenko , Dmitry Vyukov , Andrew Morton Subject: Re: [PATCH v1 3/4] lib/vsprintf: Remove implied inclusions Message-ID: References: <20230804082619.61833-1-andriy.shevchenko@linux.intel.com> <20230804082619.61833-4-andriy.shevchenko@linux.intel.com> <33e128e8-9330-c73e-4c55-e56cbc87450a@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33e128e8-9330-c73e-4c55-e56cbc87450a@rasmusvillemoes.dk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Rspam-User: X-Stat-Signature: nskms5p3artnojmoz8q5xnyamhbf7cb1 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4424C80013 X-HE-Tag: 1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Ancwu0+3ujEptjWN570YmzLYnCktKqbCyHN+VMqBrJsCKn/iNA2u0MpryvybOIDsxwSO+w/NG342Akt1oIJcVgZQIuTB7CdbhWswIYY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Aug 04, 2023 at 11:36:15AM +0200, Rasmus Villemoes wrote: > On 04/08/2023 10.26, Andy Shevchenko wrote: > > Remove inclusions that are implied and guaranteed to be provided by others: > > > > compiler.h by types.h > > string.hi by string_helpers.h > > What? No. That's not what we want. Each .c and each .h file should > include the headers that declare the stuff they're using. 99.99% of kernel if not more doesn't follow this rule pedantically. We have to have a compromise between what is guaranteed and what is not. For example, I'm pretty sure the types.h will always include compiler*.h. > So if string_helpers.h magically stops referring to anything from string.h, > one should be allowed to stop including string.h from string_helpers.h. That's how agreements work. We may agree to guarantee such inclusion or not. The kernel headers as of today is a complete mess (refer to the Ingo's 2k+ patch series). But still, some order / agreement is good to have. > Sure, those two may forever be so intertwined that it never happens, but > one really can't maintain some matrix of "X always includes Y so if you > include X you don't have to include Y" in one's head. Somebody should do that at some point, otherwise it becomes even more mess. If you want your way, iwyu should be part of the kernel build. And be prepared for dozens of headers to be added to the every single C file in the kernel. -- With Best Regards, Andy Shevchenko