Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp438695rwb; Fri, 4 Aug 2023 15:39:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGThvP2qLbQYWMg0znnPKdStToFnA2uULjcxeJJfSiclBREvaHMwGxJqaq0dE2LRkTi3s5q X-Received: by 2002:a05:6a21:9988:b0:10f:52e2:49ec with SMTP id ve8-20020a056a21998800b0010f52e249ecmr3426943pzb.53.1691188763317; Fri, 04 Aug 2023 15:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691188763; cv=none; d=google.com; s=arc-20160816; b=xKGGX4LcToPOAr/vWm3QtaqLyIHZsRXpiOLNX/Fl+XzKTKOKIy5no06TOTfwrPd6tn n8rW6aWef6ZwFwACVZbcP/itcL4fAFRQIou6FozUAtLKQpq7Og6+wAuLussB6hgjb54X jo0E57KhhW0isEklHXhP/J0Dd3Ov46wCeog2aWMKdc6AKjv9PBTqDQdTEHqxi2Zy4m60 yaOT0wOQddON8q3Y5mDX2DDwu/FMvhpoJRCR7XDKx1mWvQKIOvR3hiXY626x6SVxkIPz IdLUxdJv5hIy7iMdKwXQDY5WQ8TmvKv74NzVt07b157Pi4y6xO9EcAOiHFoOpB6r65/l HZwA== 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 :dkim-signature; bh=R+RUWX28hZwALIFj+2L0l1c59KQ53dK04rN66cG/7uE=; fh=oI/Xiro4+EHjElptEbxeKLLzFvN1qXeWbIHTFIMB7YM=; b=yePf8qypgKsgKExIA5lJwLwS8G3Q+27Z6zSManfUKpEIIePv6ePSv8EiTUXipTmhtm +mmhC1fYF4QgSoDGSzvLUypFL8umvgYAj8bizWM5ZoZqhf4TLxmeD8vPAjwMQpCYRPp3 XMJhgErTKUVtxoXARz66iaw93Pt5FbpEmaggg3YZaO25j5FoHxWpV1lI6s4LCO1nRKHh Y9gOkMIhE5EEwBQ+duL5i++EG9GYbRskw/pfEvcEdGkk2muDccV2ll1RwKk0sXZAoodb uhz3g/o9Rm8LUtrph0z8+5a3R/hWC5RGh+FZgJ8OMzN/oRW9AoZlr8McVGh/vU8PnHlI yprg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SjFKITtR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a056a00191200b006874f410d77si2392388pfi.93.2023.08.04.15.39.10; Fri, 04 Aug 2023 15:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SjFKITtR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230168AbjHDUcW (ORCPT + 99 others); Fri, 4 Aug 2023 16:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbjHDUcQ (ORCPT ); Fri, 4 Aug 2023 16:32:16 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EF264ED3 for ; Fri, 4 Aug 2023 13:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691181124; x=1722717124; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t5iZxzWJ77jyknlbwewqXxpRaUFyHhslImuVj5UImbY=; b=SjFKITtRRtclcuj3qBCRy/wXx1ZoCdZULEPrlpXddujTzRzyhx0xq2Ya 1ylBzrdNes4uhr7xcAIaKSl+H6IXiTkNjzeRk4VR5Jgtdt4sWklmrcX5H BCfkJtzB0XufM6luhAcsXSZZIfQyv+a+Z2ZJjFV2V6/nA9xq5N8IgEVaN smAJjrD858kXfwDQYdgP4CzSD7pcc/OLxMwrk245KqORnI5lDWDi4jhax 8JiNH/cbfknKAA/iIyAbvidz3J50wKL9BxFFZYgaEYyZcj3I7wC4hWhBu rdseyQUbSp7JW3SFbdmULQsDgF6z9ARRkUMSOE34nZ6jhMkiMyJ3ObSBw A==; X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="373895261" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="373895261" 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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