public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [PATCH v1 1/1] kernel.h: Split out COUNT_ARGS() and CONCATENATE()
Date: Wed, 12 Apr 2023 15:56:43 +0300	[thread overview]
Message-ID: <ZDaqi1jE0Fkg5BSp@smile.fi.intel.com> (raw)
In-Reply-To: <20230411152119.c9bb83a8566e37f6d8dbc590@linux-foundation.org>

On Tue, Apr 11, 2023 at 03:21:19PM -0700, Andrew Morton wrote:
> On Tue, 11 Apr 2023 13:24:54 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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 <linux/stdarg.h>
> >  #include <linux/align.h>
> > +#include <linux/args.h>
> 
> 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 and a couple of users that reimplement this macro
under different names.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-04-12 12:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 10:24 [PATCH v1 1/1] kernel.h: Split out COUNT_ARGS() and CONCATENATE() Andy Shevchenko
2023-04-11 22:21 ` Andrew Morton
2023-04-12 12:56   ` Andy Shevchenko [this message]
2023-04-12 18:55     ` Andrew Morton
2023-04-12 21:09       ` Rasmus Villemoes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZDaqi1jE0Fkg5BSp@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox