Show a patch.

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

{
    "id": 11436,
    "url": "https://patchwork.libcamera.org/api/patches/11436/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11436/",
    "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": "<20210302115108.103328-4-jacopo@jmondi.org>",
    "date": "2021-03-02T11:51:01",
    "name": "[libcamera-devel,v3,03/10] android: camera_buffer: Drop 'const' from buffer_handle_t",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "7eb4b5109f7aeeb79d99d24dd9e8afe20a756791",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11436/mbox/",
    "series": [
        {
            "id": 1738,
            "url": "https://patchwork.libcamera.org/api/series/1738/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1738",
            "date": "2021-03-02T11:50:58",
            "name": "android: Supports memory backends",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1738/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11436/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11436/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 92D33BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Mar 2021 11:50:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6EF9C68AA6;\n\tTue,  2 Mar 2021 12:50:50 +0100 (CET)",
            "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B7AC468A93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Mar 2021 12:50:48 +0100 (CET)",
            "from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 2D8E9200003;\n\tTue,  2 Mar 2021 11:50:46 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  2 Mar 2021 12:51:01 +0100",
        "Message-Id": "<20210302115108.103328-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210302115108.103328-1-jacopo@jmondi.org>",
        "References": "<20210302115108.103328-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 03/10] android: camera_buffer: Drop\n\t'const' from buffer_handle_t",
        "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": "Han-lin Chen <hanlinchen@chromium.org>,\n\tDaniel Hung-yu Wu <hywu@google.com>",
        "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": "The buffer_handle_t type is defined as 'const native_handle_t*'.\nDrop the 'const' specifier from the parameter of the CameraBuffer\nclass constructor and in the Android generic memory backend.\n\nAlso rename 'camera3buffer' in 'camera3Buffer' to comply with the\ncoding style guidelines.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_buffer.h              |  2 +-\n src/android/mm/generic_camera_buffer.cpp | 12 ++++++------\n 2 files changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h\nindex 00b061502d6e..0590cd84652b 100644\n--- a/src/android/camera_buffer.h\n+++ b/src/android/camera_buffer.h\n@@ -14,7 +14,7 @@\n class CameraBuffer : public libcamera::MappedBuffer\n {\n public:\n-\tCameraBuffer(const buffer_handle_t camera3buffer, int flags);\n+\tCameraBuffer(buffer_handle_t camera3Buffer, int flags);\n \t~CameraBuffer();\n };\n \ndiff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp\nindex bd9152cf9a16..d1407f9cddf4 100644\n--- a/src/android/mm/generic_camera_buffer.cpp\n+++ b/src/android/mm/generic_camera_buffer.cpp\n@@ -13,16 +13,16 @@ using namespace libcamera;\n \n LOG_DECLARE_CATEGORY(HAL)\n \n-CameraBuffer::CameraBuffer(const buffer_handle_t camera3buffer, int flags)\n+CameraBuffer::CameraBuffer(buffer_handle_t camera3Buffer, int flags)\n {\n-\tmaps_.reserve(camera3buffer->numFds);\n+\tmaps_.reserve(camera3Buffer->numFds);\n \terror_ = 0;\n \n-\tfor (int i = 0; i < camera3buffer->numFds; i++) {\n-\t\tif (camera3buffer->data[i] == -1)\n+\tfor (int i = 0; i < camera3Buffer->numFds; i++) {\n+\t\tif (camera3Buffer->data[i] == -1)\n \t\t\tcontinue;\n \n-\t\toff_t length = lseek(camera3buffer->data[i], 0, SEEK_END);\n+\t\toff_t length = lseek(camera3Buffer->data[i], 0, SEEK_END);\n \t\tif (length < 0) {\n \t\t\terror_ = -errno;\n \t\t\tLOG(HAL, Error) << \"Failed to query plane length\";\n@@ -30,7 +30,7 @@ CameraBuffer::CameraBuffer(const buffer_handle_t camera3buffer, int flags)\n \t\t}\n \n \t\tvoid *address = mmap(nullptr, length, flags, MAP_SHARED,\n-\t\t\t\t     camera3buffer->data[i], 0);\n+\t\t\t\t     camera3Buffer->data[i], 0);\n \t\tif (address == MAP_FAILED) {\n \t\t\terror_ = -errno;\n \t\t\tLOG(HAL, Error) << \"Failed to mmap plane\";\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "03/10"
    ]
}