Show a patch.

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

{
    "id": 11937,
    "url": "https://patchwork.libcamera.org/api/patches/11937/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11937/",
    "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": "<20210415044854.3348529-3-hiroh@chromium.org>",
    "date": "2021-04-15T04:48:54",
    "name": "[libcamera-devel,v2,3/3] libcamera: V4L2Device: Use std::vector in updateControls()",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "f9f2997ab18680ec315ec083916e3d8167f1c03b",
    "submitter": {
        "id": 63,
        "url": "https://patchwork.libcamera.org/api/people/63/?format=api",
        "name": "Hirokazu Honda",
        "email": "hiroh@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11937/mbox/",
    "series": [
        {
            "id": 1932,
            "url": "https://patchwork.libcamera.org/api/series/1932/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1932",
            "date": "2021-04-15T04:48:52",
            "name": "[libcamera-devel,v2,1/3] libcamera: V4L2Device: Use std::vector for v4l2_ext_control in getControls()",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1932/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11937/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11937/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 87144BD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Apr 2021 04:49:06 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 088A26881D;\n\tThu, 15 Apr 2021 06:49:06 +0200 (CEST)",
            "from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com\n\t[IPv6:2607:f8b0:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8ECBF602C7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 Apr 2021 06:49:04 +0200 (CEST)",
            "by mail-pf1-x42b.google.com with SMTP id m11so15242484pfc.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Apr 2021 21:49:04 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:84f5:7981:dfbe:8f02])\n\tby smtp.gmail.com with ESMTPSA id\n\tkk6sm833885pjb.51.2021.04.14.21.49.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 14 Apr 2021 21:49:02 -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=\"j/cHkXR7\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=gWtprvFvs554lUgEhHva3qqaLvBV08DOn0Hn5nAhrtQ=;\n\tb=j/cHkXR7Kr4syRej+OwNICulx2RKVACiH4Sh8FSP+U1KrnGKR5pY/8kQ7kDeZ3F3Uw\n\tT0TCzLrdMCGDtrGz9j6PIWtPBawAz7EJ6RvRsqSXvJKsmGOHeplwAVoNeAbaOnJ/wHhq\n\t5w5+WEK8XFmuLBMXv03IG0cO7oIFTcUBO6zNQ=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=gWtprvFvs554lUgEhHva3qqaLvBV08DOn0Hn5nAhrtQ=;\n\tb=VgbJ+e3YUcBBFmscsBFtr6IFKJ6Ec6X7xcgeK8KngD/fHgF1RFX4Scq7ApCV3p0rCf\n\tlmSVl5/7aurga6bMP3yjNqHkSbNbR67MGXs4xDO4//vHu/tg8Jm2grY+zI2Y6POeDdxg\n\tnbZVkfiVEpg66H9/pEL3d9dgpQOrwBaunuhbusvYtbdTPoJo17769NfSZvL1OWPtGBnI\n\tErOOixsaZo9CBW/e+LsHJAqM4mcrD9Jyw2bWMnL/4reaieuec7oemSUUWci6gsYgqJIZ\n\tebRP4/GRhV1DbktjDLH3ZWtXhNxB84onGaAH2orsR28ERi5cJoKtQvjqNoVsveE9Luk7\n\t7NHA==",
        "X-Gm-Message-State": "AOAM532kJEUuzHvQy9nbeBZz1Cn320w6rDX0fWRO0jJJJai9BXP99vwX\n\tRk/Icq32qF8IYezjQJcDW5jk1YyPkrSdoQ==",
        "X-Google-Smtp-Source": "ABdhPJxGzXZ7LJAQgIC1/4US3Uz0pPVOjqdomQmOvT/ndNVenGd9UmxU17lnm6XJiD9ZLlkY/TlrAg==",
        "X-Received": "by 2002:a63:1b5e:: with SMTP id\n\tb30mr1770458pgm.254.1618462143098; \n\tWed, 14 Apr 2021 21:49:03 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 15 Apr 2021 13:48:54 +0900",
        "Message-Id": "<20210415044854.3348529-3-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.31.1.368.gbe11c130af-goog",
        "In-Reply-To": "<20210415044854.3348529-1-hiroh@chromium.org>",
        "References": "<20210415044854.3348529-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 3/3] libcamera: V4L2Device: Use\n\tstd::vector in updateControls()",
        "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>",
        "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>"
    },
    "content": "V4L2Device::updateControls() takes two arguments, raw array and\nits size, for the v4l2_ext_control values. This replaces it with\nstd::vector.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n include/libcamera/internal/v4l2_device.h |  3 +--\n src/libcamera/v4l2_device.cpp            | 11 ++++-------\n 2 files changed, 5 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\nindex d006bf68..4cce3840 100644\n--- a/include/libcamera/internal/v4l2_device.h\n+++ b/include/libcamera/internal/v4l2_device.h\n@@ -55,8 +55,7 @@ protected:\n private:\n \tvoid listControls();\n \tvoid updateControls(ControlList *ctrls,\n-\t\t\t    const struct v4l2_ext_control *v4l2Ctrls,\n-\t\t\t    unsigned int count);\n+\t\t\t    const std::vector<v4l2_ext_control> &v4l2Ctrls);\n \n \tvoid eventAvailable(EventNotifier *notifier);\n \ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 5ec1b10e..217a39e3 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -250,7 +250,7 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)\n \t\tv4l2Ctrls.resize(errorIdx);\n \t}\n \n-\tupdateControls(&ctrls, v4l2Ctrls.data(), v4l2Ctrls.size());\n+\tupdateControls(&ctrls, v4l2Ctrls);\n \n \treturn ctrls;\n }\n@@ -350,7 +350,7 @@ int V4L2Device::setControls(ControlList *ctrls)\n \t\tret = errorIdx;\n \t}\n \n-\tupdateControls(ctrls, v4l2Ctrls.data(), v4l2Ctrls.size());\n+\tupdateControls(ctrls, v4l2Ctrls);\n \n \treturn ret;\n }\n@@ -514,14 +514,11 @@ void V4L2Device::listControls()\n  * values in \\a v4l2Ctrls\n  * \\param[inout] ctrls List of V4L2 controls to update\n  * \\param[in] v4l2Ctrls List of V4L2 extended controls as returned by the driver\n- * \\param[in] count The number of controls to update\n  */\n void V4L2Device::updateControls(ControlList *ctrls,\n-\t\t\t\tconst struct v4l2_ext_control *v4l2Ctrls,\n-\t\t\t\tunsigned int count)\n+\t\t\t\tconst std::vector<v4l2_ext_control> &v4l2Ctrls)\n {\n-\tfor (unsigned int i = 0; i < count; i++) {\n-\t\tconst struct v4l2_ext_control &v4l2Ctrl = v4l2Ctrls[i];\n+\tfor (const v4l2_ext_control &v4l2Ctrl : v4l2Ctrls) {\n \t\tconst unsigned int id = v4l2Ctrl.id;\n \t\tif (!ctrls->contains(id)) {\n \t\t\tLOG(V4L2, Error) << \"ControlList doesn't contain id: \"\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "3/3"
    ]
}