[{"id":15435,"web_url":"https://patchwork.libcamera.org/comment/15435/","msgid":"<20210303100927.GB477268@pyrite.rasen.tech>","date":"2021-03-03T10:09:27","subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop\n\tunused variable","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Tue, Mar 02, 2021 at 05:05:00PM +0200, Laurent Pinchart wrote:\n> The has_input variable is unused, drop it.\n\nOh, oops.\n\nI think it's the opposite way though. This means that I forgot to\nimplement support for functions with no inputs :S\n\nMore things on my todo list :)\n\nUnless you think there's no need for us to support such functions.\n\n\nPaul\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  .../ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 1 -\n>  1 file changed, 1 deletion(-)\n> \n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> index ba34a361f811..d451fab35e83 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> @@ -174,7 +174,6 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n>  \n>  {{proxy_funcs.func_sig(proxy_name, method, \"IPC\")}}\n>  {\n> -{%- set has_input = true if method|method_param_inputs|length > 0 %}\n>  {%- set has_output = true if method|method_param_outputs|length > 0 or method|method_return_value != \"void\" %}\n>  {%- set cmd = cmd_enum_name + \"::\" + method.mojom_name|cap %}\n>  \tIPCMessage::Header _header = { static_cast<uint32_t>({{cmd}}), seq_++ };\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 65BADBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Mar 2021 10:09:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EB37468A91;\n\tWed,  3 Mar 2021 11:09:37 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D758368A69\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Mar 2021 11:09:35 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ED4D8ED;\n\tWed,  3 Mar 2021 11:09:33 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Ao3PeGVs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614766175;\n\tbh=9kguGktFIcjEFVWkyQWCEJNHGNbaiMV6wzlVmutembc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Ao3PeGVsWAShlINJJLPOfBz1zJQrKnz0+yQz0tqUW6lr1zcnD2KJw5Dgx6JkuduQN\n\t/TfOs+8b5thcEWSTMQfZi+4Qgd+LB1UHkqHOF5asAwcxG+RiIlXJ3/3FfB7yG6olsZ\n\t2Mk7W4Jvyn9VQGNPxv427Bvw0KyPchT1bIBWMLDA=","Date":"Wed, 3 Mar 2021 19:09:27 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210303100927.GB477268@pyrite.rasen.tech>","References":"<20210302150501.15191-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210302150501.15191-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop\n\tunused variable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15436,"web_url":"https://patchwork.libcamera.org/comment/15436/","msgid":"<YD9j3FEtU2N/IPQY@pendragon.ideasonboard.com>","date":"2021-03-03T10:24:28","subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop\n\tunused variable","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Wed, Mar 03, 2021 at 07:09:27PM +0900, paul.elder@ideasonboard.com wrote:\n> On Tue, Mar 02, 2021 at 05:05:00PM +0200, Laurent Pinchart wrote:\n> > The has_input variable is unused, drop it.\n> \n> Oh, oops.\n> \n> I think it's the opposite way though. This means that I forgot to\n> implement support for functions with no inputs :S\n> \n> More things on my todo list :)\n> \n> Unless you think there's no need for us to support such functions.\n\nYou're right, I think that would be useful. Let's move this to your todo\nlist and drop this patch.\n\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  .../ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 1 -\n> >  1 file changed, 1 deletion(-)\n> > \n> > diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> > index ba34a361f811..d451fab35e83 100644\n> > --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> > +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> > @@ -174,7 +174,6 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n> >  \n> >  {{proxy_funcs.func_sig(proxy_name, method, \"IPC\")}}\n> >  {\n> > -{%- set has_input = true if method|method_param_inputs|length > 0 %}\n> >  {%- set has_output = true if method|method_param_outputs|length > 0 or method|method_return_value != \"void\" %}\n> >  {%- set cmd = cmd_enum_name + \"::\" + method.mojom_name|cap %}\n> >  \tIPCMessage::Header _header = { static_cast<uint32_t>({{cmd}}), seq_++ };","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0302FBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Mar 2021 10:25:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6541068A98;\n\tWed,  3 Mar 2021 11:24:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3899E68A69\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Mar 2021 11:24:58 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9D5D5ED;\n\tWed,  3 Mar 2021 11:24:57 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"a+WnQQpq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614767097;\n\tbh=iMnFB67InWW8e/S2ScZ1pfPkYN0d3XaWss6SIkHRlPw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=a+WnQQpqvpfCkPeHEjB5Czkr3BH68wN/1MdpnSGRTix4xbplVheRYqEj01lTOjsAr\n\tnIlurQuL9qASCcnTfIW65HXVPb74ml+E8BgHMXIDY65KBWohDv6ufCTCdIoreEBn2l\n\tA57q0FPmDjEXVzvs0nUW0sMyn/a+SwOKVDcrSAlI=","Date":"Wed, 3 Mar 2021 12:24:28 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"paul.elder@ideasonboard.com","Message-ID":"<YD9j3FEtU2N/IPQY@pendragon.ideasonboard.com>","References":"<20210302150501.15191-1-laurent.pinchart@ideasonboard.com>\n\t<20210303100927.GB477268@pyrite.rasen.tech>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210303100927.GB477268@pyrite.rasen.tech>","Subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop\n\tunused variable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15469,"web_url":"https://patchwork.libcamera.org/comment/15469/","msgid":"<20210304051947.GA2049@pyrite.rasen.tech>","date":"2021-03-04T05:19:47","subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop\n\tunused variable","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Wed, Mar 03, 2021 at 12:24:28PM +0200, Laurent Pinchart wrote:\n> Hi Paul,\n> \n> On Wed, Mar 03, 2021 at 07:09:27PM +0900, paul.elder@ideasonboard.com wrote:\n> > On Tue, Mar 02, 2021 at 05:05:00PM +0200, Laurent Pinchart wrote:\n> > > The has_input variable is unused, drop it.\n> > \n> > Oh, oops.\n> > \n> > I think it's the opposite way though. This means that I forgot to\n> > implement support for functions with no inputs :S\n> > \n> > More things on my todo list :)\n> > \n> > Unless you think there's no need for us to support such functions.\n> \n> You're right, I think that would be useful. Let's move this to your todo\n> list and drop this patch.\n> \n\nUhh after a second look, I think this is actually correct.\n\nipc_->send{Async,Sync}() must take an IPCMessage (unless we want to\nchange it so its optional), so we still need to initialize and pass\nIPCMessage _ipcInputBuf, and there's no point in has_input. Apparently\nfunctions with no input parameters were already supported :)\n\n> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> > > ---\n> > >  .../ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 1 -\n> > >  1 file changed, 1 deletion(-)\n> > > \n> > > diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> > > index ba34a361f811..d451fab35e83 100644\n> > > --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> > > +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> > > @@ -174,7 +174,6 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n> > >  \n> > >  {{proxy_funcs.func_sig(proxy_name, method, \"IPC\")}}\n> > >  {\n> > > -{%- set has_input = true if method|method_param_inputs|length > 0 %}\n> > >  {%- set has_output = true if method|method_param_outputs|length > 0 or method|method_return_value != \"void\" %}\n> > >  {%- set cmd = cmd_enum_name + \"::\" + method.mojom_name|cap %}\n> > >  \tIPCMessage::Header _header = { static_cast<uint32_t>({{cmd}}), seq_++ };","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 59BA4BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Mar 2021 05:19:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE28968A92;\n\tThu,  4 Mar 2021 06:19:56 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CF6060106\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Mar 2021 06:19:55 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BBAB127A;\n\tThu,  4 Mar 2021 06:19:53 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"c0BinYGr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614835195;\n\tbh=Lqhmpj44zz0wsFrsHPB9LS+nxRYNEtfSlZHlonX+7vw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=c0BinYGrE+/kQdAMqHIVtLTQ817/2OmDaO14o4EPwjHEtUXtjgDSD81WVpCFBU7tk\n\tQ6xR1hTq3fOouav5Ea5NUGphdZTQIArOZ/NyTcRgASJ0bSxch5t8TcQLiABtZv+ts1\n\tKd0N07mVVSXvBGy6XwHYEyAEi8uxx+B0S2SVwaTc=","Date":"Thu, 4 Mar 2021 14:19:47 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210304051947.GA2049@pyrite.rasen.tech>","References":"<20210302150501.15191-1-laurent.pinchart@ideasonboard.com>\n\t<20210303100927.GB477268@pyrite.rasen.tech>\n\t<YD9j3FEtU2N/IPQY@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YD9j3FEtU2N/IPQY@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] utils: ipc: templates: Drop\n\tunused variable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]