[{"id":17237,"web_url":"https://patchwork.libcamera.org/comment/17237/","msgid":"<YKzIUVvIvCOZH80O@pendragon.ideasonboard.com>","date":"2021-05-25T09:50:09","subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nThank you for the patch.\n\nOn Tue, May 25, 2021 at 02:33:41PM +0900, Hirokazu Honda wrote:\n> The commit (34bee5e8) of removing the controls order assumption\n> doesn't change the update ControlValue type in\n> V4L2Device::updateControls(). However, this is wrong because the\n> ControlValue is set to a placeholder ControlValue in\n> V4L2Device::getControls(), so the type is ControlTypeNone.\n> We should rather look up the type in V4L2Device::controls_ with a\n> specified id.\n\nAs we've merged a revert to quickly fix the master branch, could you\nrepost this squashed with the original patch ?\n\n> Fixes: 34bee5e8 (libcamera: V4L2Device: Remove the controls order assumption in updateControls())\n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  src/libcamera/v4l2_device.cpp | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 7f7e5b8f..cc4f52bf 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -621,7 +621,11 @@ void V4L2Device::updateControls(ControlList *ctrls,\n>  \t\tconst unsigned int id = v4l2Ctrl.id;\n>  \n>  \t\tControlValue value = ctrls->get(id);\n> -\t\tswitch (value.type()) {\n> +\n> +\t\tauto iter = controls_.find(id);\n\nMaybe const auto ?\n\n> +\t\tASSERT(iter != controls_.end());\n> +\t\tconst ControlType type = iter->first->type();\n> +\t\tswitch (type) {\n>  \t\tcase ControlTypeInteger64:\n>  \t\t\tvalue.set<int64_t>(v4l2Ctrl.value64);\n>  \t\t\tbreak;","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 3A1A3C3202\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 09:50:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7002D68921;\n\tTue, 25 May 2021 11:50:18 +0200 (CEST)","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 85EA2602AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 11:50:16 +0200 (CEST)","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 00832344;\n\tTue, 25 May 2021 11:50:15 +0200 (CEST)"],"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=\"HVkZMWu6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621936216;\n\tbh=idNbdYbpnu8Dpml4BduHP2HXZrB89mxtoQFuwt9qLWY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HVkZMWu6ONyYsy55p7dMLfVms124vdIQwxer1/A9yCpid/HhjGlDpCySnyETg9TNv\n\t6LKfEgjXp7MUYKpOsH0oo0W/vJp9uo8dYX495swmmFNm6GMV5qbqy+UvcmvulL2W66\n\t9rV1eymupaPU/WCp5oglDB0m52fEDEDHLVVxP7mE=","Date":"Tue, 25 May 2021 12:50:09 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YKzIUVvIvCOZH80O@pendragon.ideasonboard.com>","References":"<20210525053341.2574042-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210525053341.2574042-1-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17242,"web_url":"https://patchwork.libcamera.org/comment/17242/","msgid":"<20210525103626.2a45u4iawg5miqm7@uno.localdomain>","date":"2021-05-25T10:36:26","subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro,\n\nOn Tue, May 25, 2021 at 02:33:41PM +0900, Hirokazu Honda wrote:\n> The commit (34bee5e8) of removing the controls order assumption\n\nWe usually spell the commit message out as:\n\nCommit 34bee5e84ecb (\"libcamera: V4L2Device: Remove the controls order\nassumption in updateControls()\") removed the control odering\nassumption without changing the updateControls() function accordingly.\n\n> doesn't change the update ControlValue type in\n> V4L2Device::updateControls(). However, this is wrong because the\n> ControlValue is set to a placeholder ControlValue in\n> V4L2Device::getControls(), so the type is ControlTypeNone.\n> We should rather look up the type in V4L2Device::controls_ with a\n> specified id.\n\n>\n> Fixes: 34bee5e8 (libcamera: V4L2Device: Remove the controls order assumption in updateControls())\n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  src/libcamera/v4l2_device.cpp | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 7f7e5b8f..cc4f52bf 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -621,7 +621,11 @@ void V4L2Device::updateControls(ControlList *ctrls,\n>  \t\tconst unsigned int id = v4l2Ctrl.id;\n>\n>  \t\tControlValue value = ctrls->get(id);\n\nI've just noticed we do\n\n                ControlValue value = ctrls.get()\n                switch() {\n                        value.set();\n                }\n                ctrls.set(id, value);\n\nCan't we just take a reference and modify value ?\n(not related to this patch though).\n\n> -\t\tswitch (value.type()) {\n> +\n> +\t\tauto iter = controls_.find(id);\n\nconst auto & ?\n\n> +\t\tASSERT(iter != controls_.end());\n> +\t\tconst ControlType type = iter->first->type();\n> +\t\tswitch (type) {\n\nYou could save the local variable if you want to\n\n>  \t\tcase ControlTypeInteger64:\n>  \t\t\tvalue.set<int64_t>(v4l2Ctrl.value64);\n>  \t\t\tbreak;\n> --\n> 2.31.1.818.g46aad6cb9e-goog\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 B3F69C3202\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 10:35:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F17846891F;\n\tTue, 25 May 2021 12:35:41 +0200 (CEST)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 530AB6050E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 12:35:41 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B19C1240009;\n\tTue, 25 May 2021 10:35:40 +0000 (UTC)"],"Date":"Tue, 25 May 2021 12:36:26 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20210525103626.2a45u4iawg5miqm7@uno.localdomain>","References":"<20210525053341.2574042-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210525053341.2574042-1-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17247,"web_url":"https://patchwork.libcamera.org/comment/17247/","msgid":"<CAO5uPHOHFd=dp4M5_05eBe3ZSEZsoRMG9o6QM-wA1u8QY9W=ug@mail.gmail.com>","date":"2021-05-26T06:26:05","subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Laurent,\n\nOn Tue, May 25, 2021 at 6:50 PM Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Hiro,\n>\n> Thank you for the patch.\n>\n> On Tue, May 25, 2021 at 02:33:41PM +0900, Hirokazu Honda wrote:\n> > The commit (34bee5e8) of removing the controls order assumption\n> > doesn't change the update ControlValue type in\n> > V4L2Device::updateControls(). However, this is wrong because the\n> > ControlValue is set to a placeholder ControlValue in\n> > V4L2Device::getControls(), so the type is ControlTypeNone.\n> > We should rather look up the type in V4L2Device::controls_ with a\n> > specified id.\n>\n> As we've merged a revert to quickly fix the master branch, could you\n> repost this squashed with the original patch ?\n>\n>\nThanks. I will do and test with your submit patch.\n\n\n> > Fixes: 34bee5e8 (libcamera: V4L2Device: Remove the controls order\n> assumption in updateControls())\n> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> > ---\n> >  src/libcamera/v4l2_device.cpp | 6 +++++-\n> >  1 file changed, 5 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/v4l2_device.cpp\n> b/src/libcamera/v4l2_device.cpp\n> > index 7f7e5b8f..cc4f52bf 100644\n> > --- a/src/libcamera/v4l2_device.cpp\n> > +++ b/src/libcamera/v4l2_device.cpp\n> > @@ -621,7 +621,11 @@ void V4L2Device::updateControls(ControlList *ctrls,\n> >               const unsigned int id = v4l2Ctrl.id;\n> >\n> >               ControlValue value = ctrls->get(id);\n> > -             switch (value.type()) {\n> > +\n> > +             auto iter = controls_.find(id);\n>\n> Maybe const auto ?\n>\n> > +             ASSERT(iter != controls_.end());\n> > +             const ControlType type = iter->first->type();\n> > +             switch (type) {\n> >               case ControlTypeInteger64:\n> >                       value.set<int64_t>(v4l2Ctrl.value64);\n> >                       break;\n>\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 A1259C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 06:26:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1D7D6891F;\n\tWed, 26 May 2021 08:26:17 +0200 (CEST)","from mail-ej1-x631.google.com (mail-ej1-x631.google.com\n\t[IPv6:2a00:1450:4864:20::631])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 78C446891B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 08:26:16 +0200 (CEST)","by mail-ej1-x631.google.com with SMTP id b9so570060ejc.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 23:26:16 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"R2vwio+d\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=AILvOsU8kHw3SNuUbfd8i9u+ZVbapW1QiX9stgVcR+I=;\n\tb=R2vwio+dZZJxwnkfXalW4V0vKVy8QlPg/g5PV/LyC7ujTDLKaA/X6rmvDz8+mBqCmb\n\tsACh2v5JhND1qz5qijupP79H9HT7YzypFkwyEe9HiSbXHl67Vfu7CPWYHOx5PaS2rXtP\n\truBQ0bTZaabPdspbQakkTY1adF/D2sNDxjU0k=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=AILvOsU8kHw3SNuUbfd8i9u+ZVbapW1QiX9stgVcR+I=;\n\tb=iSO8uaoen4JCq/pzihjE2iFlbTaEpas7jyX7m88cIwkqK8uHj3O28wG00OPmh+NS3b\n\tenCPlAk4VtXx1v9nlZTwkGfcOe9tlDPiFi65FhZ2oy3mtH5xyT/pBay5rTFTHs5FiDXe\n\tZ64aDM6s4z+WTcEhdDxOLOC9u5xgPWQLDlHUOfhCCEvSHbKUl9GCJSA19gzpMSq2m72v\n\tVb4i14aHJI8h/+xQcLBXO0u6/R+GLTW6wWlU4pm+BGBjgd3hcXYe/BuNWbBao92ucJss\n\t6Mdj4BPD8lQxTAJQkGehFGDrZ9oV+zoEkDhI14N8VLFlk1TP/R+NAlQUcXpD5erp9yGj\n\t6U4A==","X-Gm-Message-State":"AOAM5307V1UN1QF/fL1UHbZZfp9NgG1k1hlNtJOjJtX96LKJ+4tgLJmq\n\tBmdtSmQmiFtegdlv35LT4YHaeE+drTg4xQJvaS9rBA==","X-Google-Smtp-Source":"ABdhPJw+7JkelByFeYbeAay9rSN9Lv5SC2Tmy/B9PGw/ZHPjXtIfqapXVLVKuP5VXucGcYLMsSz/K2r2V/A6V5eAku0=","X-Received":"by 2002:a17:906:3a04:: with SMTP id\n\tz4mr31997851eje.221.1622010376122; \n\tTue, 25 May 2021 23:26:16 -0700 (PDT)","MIME-Version":"1.0","References":"<20210525053341.2574042-1-hiroh@chromium.org>\n\t<YKzIUVvIvCOZH80O@pendragon.ideasonboard.com>","In-Reply-To":"<YKzIUVvIvCOZH80O@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 26 May 2021 15:26:05 +0900","Message-ID":"<CAO5uPHOHFd=dp4M5_05eBe3ZSEZsoRMG9o6QM-wA1u8QY9W=ug@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"0000000000004a899605c335b808\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17248,"web_url":"https://patchwork.libcamera.org/comment/17248/","msgid":"<CAO5uPHOBRitp6a8biZzTeER3HbWg9SZcLLs8Ste63N-GuUs_UQ@mail.gmail.com>","date":"2021-05-26T06:33:52","subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo, thanks for reviewing,\n\nOn Tue, May 25, 2021 at 7:35 PM Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> Hi Hiro,\n>\n> On Tue, May 25, 2021 at 02:33:41PM +0900, Hirokazu Honda wrote:\n> > The commit (34bee5e8) of removing the controls order assumption\n>\n> We usually spell the commit message out as:\n>\n> Commit 34bee5e84ecb (\"libcamera: V4L2Device: Remove the controls order\n> assumption in updateControls()\") removed the control odering\n> assumption without changing the updateControls() function accordingly.\n>\n> > doesn't change the update ControlValue type in\n> > V4L2Device::updateControls(). However, this is wrong because the\n> > ControlValue is set to a placeholder ControlValue in\n> > V4L2Device::getControls(), so the type is ControlTypeNone.\n> > We should rather look up the type in V4L2Device::controls_ with a\n> > specified id.\n>\n> >\n> > Fixes: 34bee5e8 (libcamera: V4L2Device: Remove the controls order\n> assumption in updateControls())\n> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> > ---\n> >  src/libcamera/v4l2_device.cpp | 6 +++++-\n> >  1 file changed, 5 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/v4l2_device.cpp\n> b/src/libcamera/v4l2_device.cpp\n> > index 7f7e5b8f..cc4f52bf 100644\n> > --- a/src/libcamera/v4l2_device.cpp\n> > +++ b/src/libcamera/v4l2_device.cpp\n> > @@ -621,7 +621,11 @@ void V4L2Device::updateControls(ControlList *ctrls,\n> >               const unsigned int id = v4l2Ctrl.id;\n> >\n> >               ControlValue value = ctrls->get(id);\n>\n> I've just noticed we do\n>\n>                 ControlValue value = ctrls.get()\n>                 switch() {\n>                         value.set();\n>                 }\n>                 ctrls.set(id, value);\n>\n> Can't we just take a reference and modify value ?\n> (not related to this patch though).\n>\n>\nYeah, that looks strange that we couldn't get a reference.\nI asked Laurent in the previous review (I couldn't dig up for a moment\nthough).\nWith this set/get, we enforce to validate the new value in set() by\nControlList::find().\n\nThanks,\n-Hiro\n\n\n> > -             switch (value.type()) {\n> > +\n> > +             auto iter = controls_.find(id);\n>\n> const auto & ?\n>\n> > +             ASSERT(iter != controls_.end());\n> > +             const ControlType type = iter->first->type();\n> > +             switch (type) {\n>\n> You could save the local variable if you want to\n>\n> >               case ControlTypeInteger64:\n> >                       value.set<int64_t>(v4l2Ctrl.value64);\n> >                       break;\n> > --\n> > 2.31.1.818.g46aad6cb9e-goog\n> >\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 856AFC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 06:34:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D079968924;\n\tWed, 26 May 2021 08:34:05 +0200 (CEST)","from mail-ed1-x534.google.com (mail-ed1-x534.google.com\n\t[IPv6:2a00:1450:4864:20::534])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0B31C6891B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 08:34:04 +0200 (CEST)","by mail-ed1-x534.google.com with SMTP id j10so21566594edw.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 23:34:04 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"g7dn8MXw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=Gp4kwhQEJLtsmvmoBF6Oa74Nutl03nG0oMg6A8x8tR8=;\n\tb=g7dn8MXwh9H60dy0yk6v85rS0r/BAmSD+8uTK6tyiIcjdwavfJSaBTmveFVwDLv/SU\n\tMW1Y7IAfqz+fOqLVATBxEW71RUeBnoJfTlBulWdpS3zGJ41Z6PPZ/l0rKyrPmz0qS/+S\n\tWx3F7KO/G/zOO9KiXpbnr6zzqOioJJkDwl0l8=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=Gp4kwhQEJLtsmvmoBF6Oa74Nutl03nG0oMg6A8x8tR8=;\n\tb=Rbic/WgIsQIFU1lanOtVNHHHLVSQQUubh7kuGyjcR3sdMsKuYqnvLUDsVonrQSPh6V\n\tiLscV526gr+mHFSwMH3x6ZldlvEwAfg8zhZF7EmPtzNIQzGOmkGZ99keQ9arNVDq8gPC\n\tA4GLP5J9BKMl3pfqnVJfXiAaCm7jq7CykqrUZXnWWkKJo77MMvURz5nsWwDnUKc2cepH\n\tDVGFWmisu/lmFIFYbv9PvrnluFlmC0PGf4dJCvyujxOpI8foIxqukOC8HyigfYj6amuG\n\t8ihGhX71EJ7bEBsvGECiGh+bo4SU4Vc9pd8x4P4VbCd97+LNsWMc09/AdaaNyFBAjPyX\n\t034g==","X-Gm-Message-State":"AOAM533KxJRePsZai3ULePeXMfWjRdfXI+IYwNCCAU4vaYTl/kig9vOo\n\tkPpvxrJ2mqlAQdPsLEApP1dAQE2wPFpHdfkF8yVaQ1D3gzw=","X-Google-Smtp-Source":"ABdhPJzj2aupVpxiR4sQw+kLj4epRgMbahdBbEZ5teqW7F8iQMonRobJw6lXau86R5tNBsWJWyzdTcf0SR3U43og6rE=","X-Received":"by 2002:a05:6402:2547:: with SMTP id\n\tl7mr36323286edb.73.1622010843549; \n\tTue, 25 May 2021 23:34:03 -0700 (PDT)","MIME-Version":"1.0","References":"<20210525053341.2574042-1-hiroh@chromium.org>\n\t<20210525103626.2a45u4iawg5miqm7@uno.localdomain>","In-Reply-To":"<20210525103626.2a45u4iawg5miqm7@uno.localdomain>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 26 May 2021 15:33:52 +0900","Message-ID":"<CAO5uPHOBRitp6a8biZzTeER3HbWg9SZcLLs8Ste63N-GuUs_UQ@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"multipart/alternative; boundary=\"00000000000026e91105c335d4b6\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: V4L2Device: Fix a type\n\tmismatch of ControlValue","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]