From: Joe Perches <joe@perches.com>
To: Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Erel Geron <erelx.geron@intel.com>,
linux-um@lists.infradead.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [trivial PATCH] um virtio: Neaten vu_err macro definition
Date: Sat, 11 Apr 2020 09:37:10 -0700 [thread overview]
Message-ID: <16239d86d8177e70f15aab5e7dca61758a749fb0.camel@perches.com> (raw)
In-Reply-To: <ba7b958fda7c42e10fded7b158e892e2dfb06494.camel@perches.com>
On Sat, 2020-04-11 at 09:28 -0700, Joe Perches wrote:
> Defining a macro with ... and __VA_ARGS__ (without ##) can cause
> compilation errors if a macro use does not have additional args.
>
> Add ## to __VA_ARGS__ in the macro definition.
[]
> diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c
[]
> @@ -74,7 +74,7 @@ struct virtio_uml_vq_info {
>
> extern unsigned long long physmem_size, highmem;
>
> -#define vu_err(vu_dev, ...) dev_err(&(vu_dev)->pdev->dev, __VA_ARGS__)
> +#define vu_err(vu_dev, ...) dev_err(&(vu_dev)->pdev->dev, ##__VA_ARGS__)
Ignore this. Caffeine-free so far this morning.
It _might_ be better as:
#define vu_err(vu_dev, fmt, ...) dev_err(&(vu_dev)->pdev->dev, fmt, ##__VA_ARGS__)
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
prev parent reply other threads:[~2020-04-11 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 16:28 [trivial PATCH] um virtio: Neaten vu_err macro definition Joe Perches
2020-04-11 16:37 ` Joe Perches [this message]
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=16239d86d8177e70f15aab5e7dca61758a749fb0.camel@perches.com \
--to=joe@perches.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=erelx.geron@intel.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
/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