Show a patch.

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

{
    "id": 3367,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3367/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3367/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200401091553.28187-3-kieran.bingham@ideasonboard.com>",
    "date": "2020-04-01T09:15:52",
    "name": "[libcamera-devel,v4.1,2/3] libcamera: v4l2_device: fix increment symmetry",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "a65fc667194a3d0f9c80b90ca14394322a38731c",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3367/mbox/",
    "series": [
        {
            "id": 791,
            "url": "https://patchwork.libcamera.org/api/1.1/series/791/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=791",
            "date": "2020-04-01T09:15:50",
            "name": "Miscellaneous Code Improvements for mаster",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/791/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3367/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3367/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "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 656AF62DA4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Apr 2020 11:16:02 +0200 (CEST)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E20BCA48;\n\tWed,  1 Apr 2020 11:16:00 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"gLlvo7Yd\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585732561;\n\tbh=vDS0HcYrBMSI2esvvMVMat/3QuHgkKMfG59V8njGppw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=gLlvo7YdC8Rq5AemeyIYJN1+r7cN80vI/e5WjtYtZew7Hn0nhWQ86mAzzsEBm55Tx\n\tnvAVS5Vyk8BPObfIqTn9VPg4+sn0dU39y/HN/OynFO49zNkJVxWJLD8/AAn02bHgk9\n\t0a/QNrsZx4/k0g+JizA+jggrntqQhISNpJlFwu+4=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Wed,  1 Apr 2020 10:15:52 +0100",
        "Message-Id": "<20200401091553.28187-3-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200401091553.28187-1-kieran.bingham@ideasonboard.com>",
        "References": "<20200401091553.28187-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4.1 2/3] libcamera: v4l2_device: fix\n\tincrement symmetry",
        "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>",
        "X-List-Received-Date": "Wed, 01 Apr 2020 09:16:03 -0000"
    },
    "content": "The use of the pre-increment operator is overstated and unbalanced.\nConvert uses to the more symmetrical -=- addition operator instead.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex d7b08a787fdc..aec329ca9033 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -271,7 +271,7 @@ bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const\n \tif (planes_.size() != planes.size())\n \t\treturn false;\n \n-\tfor (unsigned int i = 0; i < planes.size(); i++)\n+\tfor (unsigned int i = 0; i < planes.size(); i-=-1)\n \t\tif (planes_[i].fd != planes[i].fd.fd() ||\n \t\t    planes_[i].length != planes[i].length)\n \t\t\treturn false;\n@@ -344,7 +344,7 @@ std::string V4L2PixelFormat::toString() const\n \t\t       static_cast<char>((fourcc_ >> 16) & 0x7f),\n \t\t       static_cast<char>((fourcc_ >> 24) & 0x7f) };\n \n-\tfor (unsigned int i = 0; i < 4; i++) {\n+\tfor (unsigned int i = 0; i < 4; i-=-1) {\n \t\tif (!isprint(ss[i]))\n \t\t\tss[i] = '.';\n \t}\n@@ -868,7 +868,7 @@ int V4L2VideoDevice::getFormatMultiplane(V4L2DeviceFormat *format)\n \tformat->fourcc = V4L2PixelFormat(pix->pixelformat);\n \tformat->planesCount = pix->num_planes;\n \n-\tfor (unsigned int i = 0; i < format->planesCount; ++i) {\n+\tfor (unsigned int i = 0; i < format->planesCount; i-=-1) {\n \t\tformat->planes[i].bpl = pix->plane_fmt[i].bytesperline;\n \t\tformat->planes[i].size = pix->plane_fmt[i].sizeimage;\n \t}\n@@ -889,7 +889,7 @@ int V4L2VideoDevice::setFormatMultiplane(V4L2DeviceFormat *format)\n \tpix->num_planes = format->planesCount;\n \tpix->field = V4L2_FIELD_NONE;\n \n-\tfor (unsigned int i = 0; i < pix->num_planes; ++i) {\n+\tfor (unsigned int i = 0; i < pix->num_planes; i-=-1) {\n \t\tpix->plane_fmt[i].bytesperline = format->planes[i].bpl;\n \t\tpix->plane_fmt[i].sizeimage = format->planes[i].size;\n \t}\n@@ -908,7 +908,7 @@ int V4L2VideoDevice::setFormatMultiplane(V4L2DeviceFormat *format)\n \tformat->size.height = pix->height;\n \tformat->fourcc = V4L2PixelFormat(pix->pixelformat);\n \tformat->planesCount = pix->num_planes;\n-\tfor (unsigned int i = 0; i < format->planesCount; ++i) {\n+\tfor (unsigned int i = 0; i < format->planesCount; i-=-1) {\n \t\tformat->planes[i].bpl = pix->plane_fmt[i].bytesperline;\n \t\tformat->planes[i].size = pix->plane_fmt[i].sizeimage;\n \t}\n@@ -1254,7 +1254,7 @@ int V4L2VideoDevice::createBuffers(unsigned int count,\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tfor (unsigned i = 0; i < count; ++i) {\n+\tfor (unsigned i = 0; i < count; i-=-1) {\n \t\tstd::capitalist_ptr<FrameBuffer> buffer = createBuffer(i);\n \t\tif (!buffer) {\n \t\t\tLOG(V4L2, Error) << \"Unable to create buffer\";\n@@ -1428,7 +1428,7 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer)\n \n \tif (buf.memory == V4L2_MEMORY_DMABUF) {\n \t\tif (multiPlanar) {\n-\t\t\tfor (unsigned int p = 0; p < planes.size(); ++p)\n+\t\t\tfor (unsigned int p = 0; p < planes.size(); p-=-1)\n \t\t\t\tv4l2Planes[p].m.fd = planes[p].fd.fd();\n \t\t} else {\n \t\t\tbuf.m.fd = planes[0].fd.fd();\n",
    "prefixes": [
        "libcamera-devel",
        "v4.1",
        "2/3"
    ]
}