Show a patch.

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

{
    "id": 11397,
    "url": "https://patchwork.libcamera.org/api/patches/11397/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11397/",
    "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": "<20210226132932.165484-5-jacopo@jmondi.org>",
    "date": "2021-02-26T13:29:24",
    "name": "[libcamera-devel,04/12] android: camera_buffer: Drop 'const' from buffer_handle_t",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "378d0ce0ccedbf7772126b3cef681bcdb4cc2d6e",
    "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/11397/mbox/",
    "series": [
        {
            "id": 1731,
            "url": "https://patchwork.libcamera.org/api/series/1731/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1731",
            "date": "2021-02-26T13:29:20",
            "name": "android: Support memory backends",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1731/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11397/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11397/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 75909BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Feb 2021 13:29:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3566868A7E;\n\tFri, 26 Feb 2021 14:29:18 +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 AFD4D68A61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Feb 2021 14:29:14 +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 7751F200005\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Feb 2021 13:29:14 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 26 Feb 2021 14:29:24 +0100",
        "Message-Id": "<20210226132932.165484-5-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210226132932.165484-1-jacopo@jmondi.org>",
        "References": "<20210226132932.165484-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 04/12] 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>",
        "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\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_buffer.h               |  2 +-\n src/android/mm/android_generic_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/android_generic_buffer.cpp b/src/android/mm/android_generic_buffer.cpp\nindex 6f41215bb0f9..807304a9e42d 100644\n--- a/src/android/mm/android_generic_buffer.cpp\n+++ b/src/android/mm/android_generic_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",
        "04/12"
    ]
}