um virtio: Neaten vu_err macro definition
PATCH 1/1 um virtio: Neaten vu_err macro definition
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.
--- arch/um/drivers/virtio_uml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/drivers/virtio_uml.c +1 -1
@@ -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__)/* Vhost-user protocol */
_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
Quoted 4 lines · Joe Perches
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.
[]
arch/um/drivers/virtio_uml.c
Quoted 1 line
arch/um/drivers/virtio_uml.c +0
-0
[]
arch/um/drivers/virtio_uml.c struct virtio_uml_vq_info { · line 77
Quoted 6 lines
arch/um/drivers/virtio_uml.c +1
-1@@ -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__)