Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8073559rwi; Tue, 25 Oct 2022 02:02:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uF1TYuRmU6Hsa/pyF4NZU2iwYfKVVMjWnAIBcpdsMBln8jYVc07RU7FzwjoJd/UwhUBxf X-Received: by 2002:a17:907:a46:b0:782:1c1c:8141 with SMTP id be6-20020a1709070a4600b007821c1c8141mr31349732ejc.549.1666688517996; Tue, 25 Oct 2022 02:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666688517; cv=none; d=google.com; s=arc-20160816; b=yYkBKePljP35CxMv1TgBW2J1gVmtEkxVTOpkFIRsMigbHCqqHaa5+R+Viy4F+Cex5X KVZInaTWzcAPkogwxIaWwuU0rbBdEBcOslxv/PMaU/Q3hmeH6bzoXRhtamq0kj1a0S1L boxYwHEezmqLPZQuLPL8ag4QnyQQpg9gSR2OIBdeOb6is1xo0uTmBZBDf7CgK7j0p/q8 nBcO81HTo3HoaMR52R4CfNifYGEUY/pcFC4p7jGYHgPkbbIn5EJ3yHWR/EZkjiTMKzIL dzKPby5h5AWGy1z/afJQCxmfP4VeAQxYwMI3R7Jc+rK4qqAFosbdW4ohr/ZPZ3jfhsb/ Zu8w== 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=sAfD0m3ehSYY0E0qiORaQU0d1LxmgIxh4oJU0GDeAso=; b=YFgtziSHbP+UZ2El3D8/E3SFawVQKKKXj/8GBqrwbkljylAQQj4+VNYQDZ6yGxP16j LteIadKSpuL9mINjQAJ+R8ET0OBXcs+InwAOD1LnqvBO03RPYvpMx3zqF29OoLvYPkxw lx0mrnXUYitcjYbrnYcEAhgSZ9Rjklxfmjwnlnv9S3+MLfgVuopKGIze969Z0FmIsWhf kMp/vCHKsN3qvG3PSKyggE3Ljeyb5Rp/NtQflcUOmq7jYorGe6I5XLqc/DMi7beDBU8S GMeYCSdSbbwbUS48RyAJWlg0nKj+KfbqpNWfHK9B2IqrcHb4e/MKSuRIKix5p7mblMyJ Vu/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BIdsJuAd; 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 hy28-20020a1709068a7c00b0078d4b9428cdsi1866780ejc.389.2022.10.25.02.01.30; Tue, 25 Oct 2022 02:01:57 -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=BIdsJuAd; 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 S229729AbiJYIUg (ORCPT + 99 others); Tue, 25 Oct 2022 04:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232102AbiJYIUX (ORCPT ); Tue, 25 Oct 2022 04:20:23 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F915C2CBC for ; Tue, 25 Oct 2022 01:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666686020; x=1698222020; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2vbx9VKGR+WsQTZs7kfvgkSH5+IhUUxGpx8wAw0zx7A=; b=BIdsJuAdqnmmTsqYOV4dw3X+7coojxk0HxBODIc6D+iWxfJwmzWcvmzd A0+Us1pU+HNZQqyJ8VY14LZ8T45ypW/rW2V9XazIUSu0cEx3KzZjBemkS w8xsHGY9iEP/Hj0gZxKsMT9dJX/RW+V/vUChBBCHxM8JzJlOVbx7gSNjf DthcsXx0Gg2XqjBfGPXlcNXez0xxDQMIQi+tpvLgkZawjJ2snfviDjndI i8F6yi0cNBLwDx1Ye3AQPGstb3e0jJraw7j7tWP86J8YYc9/Oo5ti6Kop 44zmC7eWMqXjCqsM42WnT/XyELcOrsmYAE9oEt6PORfQAxlzS9x3dX+gZ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="369687767" X-IronPort-AV: E=Sophos;i="5.95,211,1661842800"; d="scan'208";a="369687767" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2022 01:20:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="774112810" X-IronPort-AV: E=Sophos;i="5.95,211,1661842800"; d="scan'208";a="774112810" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP; 25 Oct 2022 01:20:12 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1onFAQ-001tmJ-38; Tue, 25 Oct 2022 11:20:10 +0300 Date: Tue, 25 Oct 2022 11:20:10 +0300 From: Andy Shevchenko To: Alexey Dobriyan Cc: mingo@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [rft, PATCH v1 4/4] kernel.h: Split out ARRAY_SZIE() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Mon, Oct 24, 2022 at 09:14:29PM +0300, Alexey Dobriyan wrote: > On Mon, Oct 24, 2022 at 07:05:18PM +0300, Andy Shevchenko wrote: > > On Mon, Oct 24, 2022 at 06:44:50PM +0300, Alexey Dobriyan wrote: > > > > include/linux/array_size.h | 13 +++++++++++++ > > > > > > All of this is pessimisation unless you're removing > > > > > > +#include > > > > > > from kernel.h which you aren't doing. > > > > > > container_of.h is just as silly. > > > > > > kernel.h might need _some_ cleanup (like panic and tainted stuff) which > > > is rarely used but ARRAY_SIZE()? > > > > Are you suggesting to slow down compilation with inclusion of tons of unneeded > > stuff in the zillions of drivers? > > > > Or you are talking that we need to abandon most of the headers and combine > > everything into kernel.h? I think this is what is silly. > > It hard to escape kernel.h so you will be including it anyway. It's very important to not include it in the headers. And this split helps to it a lot. We have container_of() or array_size() used in macros and/or inliners that are usually appears in the headers. And if you know what dependency hell means, the kernel.h brings to it a huge mess. So, try to be constructive, okay? > Unless you delete, say, kstrtox.h from kernel.h, it is pointless busywork. -- With Best Regards, Andy Shevchenko