Skip to contentSkip to conversation

drm/tegra: Fix compilation of variadic macro

PATCH Applied Jon Hunter 3 participants 3 messages Jul 16, 2021

Subsystems (3)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH 1/1 drm/tegra: Fix compilation of variadic macro

Commit 43636451db8c ("drm/tegra: Implement job submission part of new UAPI") added the macro 'SUBMIT_ERR' that in turns makes use of the macro '__VA_OPT__'. The '__VA_OPT__' macro is not supported by older versions of GCC and so causes build failures when using older versions of GCC. Fix this by using the '##__VA_ARGS__' macro instead.

Fixes 43636451db8c ("drm/tegra: Implement job submission part of new UAPI")
---
 drivers/gpu/drm/tegra/submit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tegra/submit.c +1 -1
index c53b7207c478..e49630089149 100644
@@ -24,7 +24,7 @@
 #define SUBMIT_ERR(context, fmt, ...) \
 	dev_err_ratelimited(context->client->base.dev, \
 		"%s: job submission failed: " fmt "\n", \
-		current->comm __VA_OPT__(,) __VA_ARGS__)
+		current->comm, ##__VA_ARGS__)
 
 static struct tegra_drm_mapping *
 tegra_drm_mapping_get(struct tegra_drm_context *context, u32 id)
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Jon Hunter

Commit 43636451db8c ("drm/tegra: Implement job submission part of new UAPI") added the macro 'SUBMIT_ERR' that in turns makes use of the macro '__VA_OPT__'. The '__VA_OPT__' macro is not supported by older versions of GCC and so causes build failures when using older versions of GCC. Fix this by using the '##__VA_ARGS__' macro instead.

Fixes 43636451db8c ("drm/tegra: Implement job submission part of new UAPI")
---
  drivers/gpu/drm/tegra/submit.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tegra/submit.c +0 -0
index c53b7207c478..e49630089149 100644

drivers/gpu/drm/tegra/submit.c line 30

Quoted 8 lines
drivers/gpu/drm/tegra/submit.c +1 -1
@@ -24,7 +24,7 @@
  #define SUBMIT_ERR(context, fmt, ...) \
  	dev_err_ratelimited(context->client->base.dev, \
  		"%s: job submission failed: " fmt "\n", \
-		current->comm __VA_OPT__(,) __VA_ARGS__)
+		current->comm, ##__VA_ARGS__)
 
  static struct tegra_drm_mapping *
  tegra_drm_mapping_get(struct tegra_drm_context *context, u32 id)

Thanks for taking care of this.

#2 lore raw
In reply to Jon Hunter
Quoted 6 lines · Jon Hunter

Commit 43636451db8c ("drm/tegra: Implement job submission part of new UAPI") added the macro 'SUBMIT_ERR' that in turns makes use of the macro '__VA_OPT__'. The '__VA_OPT__' macro is not supported by older versions of GCC and so causes build failures when using older versions of GCC. Fix this by using the '##__VA_ARGS__' macro instead.

Quoted 6 lines
Fixes 43636451db8c ("drm/tegra: Implement job submission part of new UAPI")
---
 drivers/gpu/drm/tegra/submit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry