Show a patch.

GET /api/patches/17291/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17291,
    "url": "https://patchwork.libcamera.org/api/patches/17291/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17291/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20220903213330.213117-2-Rauch.Christian@gmx.de>",
    "date": "2022-09-03T21:33:30",
    "name": "[libcamera-devel,v4,2/2] libcamera: controls: initialise control info to ControlTypeNone by default",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8eb49c6c8c989398aa4c3ab0fce7924786c14348",
    "submitter": {
        "id": 111,
        "url": "https://patchwork.libcamera.org/api/people/111/?format=api",
        "name": "Christian Rauch",
        "email": "Rauch.Christian@gmx.de"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17291/mbox/",
    "series": [
        {
            "id": 3467,
            "url": "https://patchwork.libcamera.org/api/series/3467/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3467",
            "date": "2022-09-03T21:33:30",
            "name": "[libcamera-devel,v4,1/2] libcamera: control_serializer: store/load all ControlValue types",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/3467/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17291/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17291/checks/",
    "tags": {},
    "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 2E502C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  3 Sep 2022 21:33:36 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5B19162042;\n\tSat,  3 Sep 2022 23:33:35 +0200 (CEST)",
            "from mout.gmx.net (mout.gmx.net [212.227.17.22])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65E5062037\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  3 Sep 2022 23:33:33 +0200 (CEST)",
            "from voyager ([88.152.184.103]) by mail.gmx.net (mrgmx105\n\t[212.227.17.168]) with ESMTPSA (Nemesis) id 1N79yG-1pSviK2REy-017Xvl;\n\tSat, 03 Sep 2022 23:33:32 +0200"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662240815;\n\tbh=gKiKom5Nle+pQr+GU5OV9C9zRSsgI3HhlA91zS/pjKA=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=rkuWokGG0pvafsHFMXVUibq8NAoDvba/cUv6BF/VFtnUtrmM+AyAOI0hgjQ7G8h3n\n\tj3xD2BbUWZHLwzFEjdR7ZUqetc0u7WssqM4gGzYoFwJeTDmXvKxFOQpl4TUCTIvwHD\n\tIfSnT29gN/52IuKOi7wiFazhft72KRvgHfKZ64Kjctw8UhWSoGpFrNz743g2bB3wja\n\t8IYu6ha7BB0wAlfu+UXs2sPi0h3s2prwlCyrtHF7pJ9TqiyCt1sLBzIpvLikBcMcLe\n\tI4cBMHQxHyvEEuJ9Fzuvv60zcM7dRHRLQADLRHFBhhNSVsr46Ey1XwP6lQN3l8x+GF\n\tBrRE0u/IA6eRA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;\n\ts=badeba3b8450; t=1662240812;\n\tbh=gKiKom5Nle+pQr+GU5OV9C9zRSsgI3HhlA91zS/pjKA=;\n\th=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References;\n\tb=DVV+osAGd+7Lmy/uNuKv0UlCEXD/FkHYkThyOZNF7c1l5vgmZ9nB/2tTA3WGIZSSK\n\t1T0ntjMCZHaB3ITWlprFhmE7bSNv9a5dlbRn8eXX7jNNnbBfyJz9nf05K+mVeWNjL2\n\tBOUajrnomfH0gsHs4oqKUBvFj7kre0/oFWVNBKRo="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=gmx.net header.i=@gmx.net\n\theader.b=\"DVV+osAG\"; dkim-atps=neutral",
        "X-UI-Sender-Class": "01bb95c1-4bf8-414a-932a-4f6e2808ef9c",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  3 Sep 2022 23:33:30 +0200",
        "Message-Id": "<20220903213330.213117-2-Rauch.Christian@gmx.de>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220903213330.213117-1-Rauch.Christian@gmx.de>",
        "References": "<20220903213330.213117-1-Rauch.Christian@gmx.de>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-Provags-ID": "V03:K1:Zm9ZCWzWZSs86C6Q2Ziaq4M0NSYXvg/+cFAWXvNF0GJ2gAW6egK\n\tEfjCmn19T+gyP9GD5j/Iaz5IH7CgORAos5UofDdgoYPErbdo6otW5UawSZeJRftk8AyKP2W\n\tcBWQZiaqKV4rnQuVW+23dX//x47Dvt0JpdPYUyDdnSBfM0X9zmxVcD8o5A4nI+SDsMXuQIy\n\tt+WzsGMaW6XooMeIyce8w==",
        "X-Spam-Flag": "NO",
        "X-UI-Out-Filterresults": "notjunk:1; V03:K0:wIcRAzePm+g=:QsSvGYwM6bXRvOHaNeUril\n\twjWdsB01a0uimAKpJlJmj1I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trC8gnuSAwt0HVTY5netzVF3jj09s6T3ej1qJcGnjIZk9TDBMvONUUqft3Pc3yxk87TpX/u9II\n\tROfr1u2/0Q2YFf0vHN7BEXpYCBG1OPvrKG1Djne70s+ELRZJQsWykOfPV4kteo82xSuVSMX4Y\n\tIF5IvNwGFg9qJcfoX4UOjnbL4q",
        "Subject": "[libcamera-devel] [PATCH v4 2/2] libcamera: controls: initialise\n\tcontrol info to ControlTypeNone by default",
        "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>",
        "From": "Christian Rauch via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Christian Rauch <Rauch.Christian@gmx.de>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The default ControlInfo constructor allows partially initialising the\nmin/max/def values. Uninitialised values are assigned to 0 by default.\nThis implicit initialisation makes it impossible to distinguish between\nan uninitialised and an explicitly 0-initialised ControlValue.\n\nDefault construct the ControlValue in the ControlInfo default contructor to\nexplicitly represent uninitialised values by the ControlTypeNone type.\n\nSigned-off-by: Christian Rauch <Rauch.Christian@gmx.de>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/controls.h   | 6 +++---\n test/controls/control_info.cpp | 4 ++--\n 2 files changed, 5 insertions(+), 5 deletions(-)\n\n--\n2.34.1",
    "diff": "diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex ebc168fc..38d0a3e8 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -268,9 +268,9 @@ private:\n class ControlInfo\n {\n public:\n-\texplicit ControlInfo(const ControlValue &min = 0,\n-\t\t\t     const ControlValue &max = 0,\n-\t\t\t     const ControlValue &def = 0);\n+\texplicit ControlInfo(const ControlValue &min = {},\n+\t\t\t     const ControlValue &max = {},\n+\t\t\t     const ControlValue &def = {});\n \texplicit ControlInfo(Span<const ControlValue> values,\n \t\t\t     const ControlValue &def = {});\n \texplicit ControlInfo(std::set<bool> values, bool def);\ndiff --git a/test/controls/control_info.cpp b/test/controls/control_info.cpp\nindex 2827473b..56b4101f 100644\n--- a/test/controls/control_info.cpp\n+++ b/test/controls/control_info.cpp\n@@ -26,8 +26,8 @@ protected:\n \t\t */\n \t\tControlInfo brightness;\n\n-\t\tif (brightness.min().get<int32_t>() != 0 ||\n-\t\t    brightness.max().get<int32_t>() != 0) {\n+\t\tif (brightness.min().type() != ControlType::ControlTypeNone ||\n+\t\t    brightness.max().type() != ControlType::ControlTypeNone) {\n \t\t\tcout << \"Invalid control range for Brightness\" << endl;\n \t\t\treturn TestFail;\n \t\t}\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "2/2"
    ]
}