[v2] utils: ipc: Fix async main interface functions with no parameters
diff mbox series

Message ID 20240412144331.29858-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit 1c5830a9a40c0f93e4f115254436518988d4b1ad
Headers show
Series
  • [v2] utils: ipc: Fix async main interface functions with no parameters
Related show

Commit Message

Laurent Pinchart April 12, 2024, 2:43 p.m. UTC
From: Paul Elder <paul.elder@ideasonboard.com>

If an async main interface function is defined with no parameters, there
would be a compilation error complaining about an extra comma. Fix this.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 9dc601cf7a689fe6eef23189edf0c8a9c38dcfe1

Comments

Kieran Bingham April 13, 2024, 2:31 p.m. UTC | #1
Quoting Laurent Pinchart (2024-04-12 15:43:31)
> From: Paul Elder <paul.elder@ideasonboard.com>
> 
> If an async main interface function is defined with no parameters, there
> would be a compilation error complaining about an extra comma. Fix this.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

v2 looks like a cleaner solution than v1 indeed.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl  | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> index 238cf4a59435..f64c3c93bfcb 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> @@ -175,9 +175,9 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)
>  );
>  {% elif method|is_async %}
>         ASSERT(state_ == ProxyRunning);
> -       proxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued,
> +       proxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued
>         {%- for param in method|method_param_names -%}
> -               {{param}}{{- ", " if not loop.last}}
> +               , {{param}}
>         {%- endfor -%}
>  );
>  {%- endif %}
> 
> base-commit: 9dc601cf7a689fe6eef23189edf0c8a9c38dcfe1
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
index 238cf4a59435..f64c3c93bfcb 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
@@ -175,9 +175,9 @@  void {{proxy_name}}::recvMessage(const IPCMessage &data)
 );
 {% elif method|is_async %}
 	ASSERT(state_ == ProxyRunning);
-	proxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued,
+	proxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued
 	{%- for param in method|method_param_names -%}
-		{{param}}{{- ", " if not loop.last}}
+		, {{param}}
 	{%- endfor -%}
 );
 {%- endif %}