Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1381884rwl; Wed, 12 Apr 2023 11:56:50 -0700 (PDT) X-Google-Smtp-Source: AKy350Zd8ioQSufH9BNsQFN//h0Vu24U664apzF+nhJJEJX8YvahYYlHGexLaWbakwBiq6N8EdjY X-Received: by 2002:a17:906:6dc6:b0:94a:5445:49bc with SMTP id j6-20020a1709066dc600b0094a544549bcmr3077874ejt.26.1681325809759; Wed, 12 Apr 2023 11:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681325809; cv=none; d=google.com; s=arc-20160816; b=VzVBDxRu+IZKXJ4OjEENbMGwyAwKQgZamMEIORvXDtdzKbq7RPYujRMf8a5LzXWNed xGr3PnoRkI0YG5locjiJWTQ1/pXvD1sX0xFNhk06qnAVr+XoHy5lEipaqu8EFkTZm+7Y qY3m1jOyK/Q2A38FuUpe9GSNQesM/Hxu8WgalffVKVSPz8kKD8LIw03dTanKJtxWpmCe x9H+EZEyjpyCiu/4fQuV0yb8tVmp9rLy9ZyY+48Ln0NlOjJ/lO3al+wXh/zPBBa/hzUQ 1G11KeC1nGMBI6ukv7qG1AJDCe0LCUxur4OOEd3+/oTKbhRznWFAJwGB/tyNg9dH+Yw3 5qMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=RMw076kjy6pbgGsEcpCPQ/itBmQtYC4jYmZrGhkVlHc=; b=psktVgsBRR3TEFKH4Yyo2oZvFk4paKqWxu4wkOkEgCNly4LQpAP8yNrEfek4nHPyGJ gh3KTeFYXNYH1HtKabH7HscbynqeCI6Su6gIZw4z4joGBrywzJ2zfFEyS6EjTGiHmXwl Kpt7kmjVkSeOGb2ar2GI4rqicqn38x+4BnTFIzcJoR+1lkpWH/v42/bUufZEbp8swps1 f0h+j6RVNRsoGAGV/X38e6Ihcihj7RpI250Ye/plbAVzvLhAPnB1C71TnmDsYzvBsF63 jtIEPuUT5+5Swg3qx0w5gJ78zTYCfrz3rDGWqjlvxETm/fj753DSL2i65QOWTwJnD0sX zKUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DKEyHL4r; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a170906830e00b0094e614d4e1dsi1784012ejx.669.2023.04.12.11.56.24; Wed, 12 Apr 2023 11:56:49 -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=@linux-foundation.org header.s=korg header.b=DKEyHL4r; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229907AbjDLSzf (ORCPT + 99 others); Wed, 12 Apr 2023 14:55:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjDLSze (ORCPT ); Wed, 12 Apr 2023 14:55:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C342E30EE for ; Wed, 12 Apr 2023 11:55:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D89A62EA1 for ; Wed, 12 Apr 2023 18:55:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A029CC433EF; Wed, 12 Apr 2023 18:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1681325731; bh=80lswzO6OtNXjWeNdQIQxbpgjZlOBp21NVRzi8tcsow=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DKEyHL4r3u0/fi+M9kO818KvubZhyzNoaPKG5XgwNbJLumlXquCLqW/HowEVAgXo9 yffXWly7ij7afBE0sPVFZFjXxK/BAKPZlEfx6/sr4c1iCFsoEFcM3flAN1u4KTZ8FM Fg66miXYUj+j0miqVfilUgy+aqHPuvEBVm/oFXHk= Date: Wed, 12 Apr 2023 11:55:31 -0700 From: Andrew Morton To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes Subject: Re: [PATCH v1 1/1] kernel.h: Split out COUNT_ARGS() and CONCATENATE() Message-Id: <20230412115531.17bb1aed232952c79aba0f2a@linux-foundation.org> In-Reply-To: References: <20230411102454.85898-1-andriy.shevchenko@linux.intel.com> <20230411152119.c9bb83a8566e37f6d8dbc590@linux-foundation.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 Wed, 12 Apr 2023 15:56:43 +0300 Andy Shevchenko wrote: > On Tue, Apr 11, 2023 at 03:21:19PM -0700, Andrew Morton wrote: > > On Tue, 11 Apr 2023 13:24:54 +0300 Andy Shevchenko wrote: > > > > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > > The COUNT_ARGS() and CONCATENATE() macros may be used in some places > > > without need of the full kernel.h dependency train with it. > > > > > > Here is the attempt on cleaning it up by splitting out these macros(). > > > > > > --- a/include/linux/kernel.h > > > +++ b/include/linux/kernel.h > > > @@ -13,6 +13,7 @@ > > > > > > #include > > > #include > > > +#include > > > > A more energetic patch would have included args.h into each file which > > calls COUNT_ARGS() and CONCATENATE(), and not included args.h into > > kernel.h. And that appears to be very easy - only bpf uses these things? > > > > In fact these macros are so weird and ugly I'd be inclined to move them > > into some bpf header so we don't have to see them again. No > > args.h, which might avoid encouraging others to use them. > > We have more users than one I cant find any? > and a couple of users that reimplement this macro > under different names. Where are these? What the heck does it do and why is it so ugly and why isn't it documented. Shudder. I suppose if there are other callers(?) then we could hide it in a countargs.h and not include that into kernel.h.