[libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop unused variable
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Thu Mar 4 06:19:47 CET 2021
Hi Laurent,
On Wed, Mar 03, 2021 at 12:24:28PM +0200, Laurent Pinchart wrote:
> Hi Paul,
>
> On Wed, Mar 03, 2021 at 07:09:27PM +0900, paul.elder at ideasonboard.com wrote:
> > On Tue, Mar 02, 2021 at 05:05:00PM +0200, Laurent Pinchart wrote:
> > > The has_input variable is unused, drop it.
> >
> > Oh, oops.
> >
> > I think it's the opposite way though. This means that I forgot to
> > implement support for functions with no inputs :S
> >
> > More things on my todo list :)
> >
> > Unless you think there's no need for us to support such functions.
>
> You're right, I think that would be useful. Let's move this to your todo
> list and drop this patch.
>
Uhh after a second look, I think this is actually correct.
ipc_->send{Async,Sync}() must take an IPCMessage (unless we want to
change it so its optional), so we still need to initialize and pass
IPCMessage _ipcInputBuf, and there's no point in has_input. Apparently
functions with no input parameters were already supported :)
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
> > > ---
> > > .../ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > 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 ba34a361f811..d451fab35e83 100644
> > > --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> > > +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> > > @@ -174,7 +174,6 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)
> > >
> > > {{proxy_funcs.func_sig(proxy_name, method, "IPC")}}
> > > {
> > > -{%- set has_input = true if method|method_param_inputs|length > 0 %}
> > > {%- set has_output = true if method|method_param_outputs|length > 0 or method|method_return_value != "void" %}
> > > {%- set cmd = cmd_enum_name + "::" + method.mojom_name|cap %}
> > > IPCMessage::Header _header = { static_cast<uint32_t>({{cmd}}), seq_++ };
More information about the libcamera-devel
mailing list