mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	David Gow <davidgow@google.com>,
	Daniel Latypov <dlatypov@google.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Steven Rostedt (Google)" <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org,
	linux-pci@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [PATCH v2 1/1] kernel.h: Split out COUNT_ARGS() and CONCATENATE() to args.h
Date: Fri, 14 Jul 2023 11:55:42 -0700	[thread overview]
Message-ID: <20230714115542.b5373a8dc80ba996338ee753@linux-foundation.org> (raw)
In-Reply-To: <20230714142237.21836-1-andriy.shevchenko@linux.intel.com>

On Fri, 14 Jul 2023 17:22:37 +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().
> 
> While at it, include new header where it's being used and drop custom
> implementation of these macros and document how it works.

This blows up my x86_64 allmodconfig build, starting with

In file included from drivers/block/drbd/drbd_nl.c:78:
./include/linux/genl_magic_func.h:26:26: error: 'CONCAT_' declared as function returning an array
   26 | static struct nla_policy CONCAT_(GENL_MAGIC_FAMILY, _tla_nl_policy)[] = {
      |                          ^~~~~~~
./include/linux/genl_magic_func.h:26:15: error: parameter names (without types) in function declaration [-Werror]
   26 | static struct nla_policy CONCAT_(GENL_MAGIC_FAMILY, _tla_nl_policy)[] = {
      |               ^~~~~~~~~~
./include/linux/genl_magic_func.h:26:15: error: function 'CONCAT_' is initialized like a variable
./include/linux/drbd_genl.h:88:13: error: array index in non-array initializer
   88 | GENL_struct(DRBD_NLA_CFG_REPLY, 1, drbd_cfg_reply,
      |             ^~~~~~~~~~~~~~~~~~
./include/linux/genl_magic_func.h:24:10: note: in definition of macro 'GENL_struct'
   24 |         [tag_name] = { .type = NLA_NESTED },
      |          ^~~~~~~~
...

  parent reply	other threads:[~2023-07-14 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 14:22 Andy Shevchenko
2023-07-14 15:03 ` Steven Rostedt
2023-07-14 18:55 ` Andrew Morton [this message]
2023-07-17 10:50   ` Andy Shevchenko

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=20230714115542.b5373a8dc80ba996338ee753@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=brendan.higgins@linux.dev \
    --cc=dave.hansen@linux.intel.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=hpa@zytor.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=sudeep.holla@arm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®