Show a patch.

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

{
    "id": 1734,
    "url": "https://patchwork.libcamera.org/api/patches/1734/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1734/",
    "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": "<20190806195518.16739-4-jacopo@jmondi.org>",
    "date": "2019-08-06T19:55:15",
    "name": "[libcamera-devel,v2,3/6] include: android: Add SPDX tags",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5e3b8ed71ecb52007db5b2a10b8d253b4a86964b",
    "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/1734/mbox/",
    "series": [
        {
            "id": 446,
            "url": "https://patchwork.libcamera.org/api/series/446/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=446",
            "date": "2019-08-06T19:55:12",
            "name": "android: Add initial Camera HAL implementation",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/446/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1734/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1734/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B087361620\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Aug 2019 21:54:15 +0200 (CEST)",
            "from uno.homenet.telecomitalia.it\n\t(host150-24-dynamic.51-79-r.retail.telecomitalia.it [79.51.24.150])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id C37151C0002;\n\tTue,  6 Aug 2019 19:54:14 +0000 (UTC)"
        ],
        "X-Originating-IP": "79.51.24.150",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  6 Aug 2019 21:55:15 +0200",
        "Message-Id": "<20190806195518.16739-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20190806195518.16739-1-jacopo@jmondi.org>",
        "References": "<20190806195518.16739-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 3/6] include: android: Add SPDX tags",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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": "Tue, 06 Aug 2019 19:54:15 -0000"
    },
    "content": "Add SPDX indentifier to Apache-2.0 licensed android headers.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n .../libhardware/include/hardware/camera3.h    |  1 +\n .../include/hardware/camera_common.h          |  1 +\n .../libhardware/include/hardware/fb.h         |  1 +\n .../libhardware/include/hardware/gralloc.h    | 61 ++++++++++---------\n .../libhardware/include/hardware/hardware.h   |  1 +\n .../android/metadata/camera_metadata_hidden.h |  1 +\n .../android/metadata/system/camera_metadata.h |  1 +\n .../metadata/system/camera_metadata_tags.h    |  3 +-\n .../metadata/system/camera_vendor_tags.h      |  1 +\n .../android/system/core/include/android/log.h |  1 +\n .../system/core/include/cutils/compiler.h     |  1 +\n .../core/include/cutils/native_handle.h       | 17 +++---\n .../system/core/include/system/camera.h       |  1 +\n .../system/core/include/system/graphics.h     |  1 +\n .../system/core/include/system/window.h       |  1 +\n 15 files changed, 54 insertions(+), 39 deletions(-)",
    "diff": "diff --git a/include/android/hardware/libhardware/include/hardware/camera3.h b/include/android/hardware/libhardware/include/hardware/camera3.h\nindex 49664dc3ceb6..d89bc9304b00 100644\n--- a/include/android/hardware/libhardware/include/hardware/camera3.h\n+++ b/include/android/hardware/libhardware/include/hardware/camera3.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2013 The Android Open Source Project\n  *\ndiff --git a/include/android/hardware/libhardware/include/hardware/camera_common.h b/include/android/hardware/libhardware/include/hardware/camera_common.h\nindex 7658dd4062f3..26df06987030 100644\n--- a/include/android/hardware/libhardware/include/hardware/camera_common.h\n+++ b/include/android/hardware/libhardware/include/hardware/camera_common.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2012 The Android Open Source Project\n  *\ndiff --git a/include/android/hardware/libhardware/include/hardware/fb.h b/include/android/hardware/libhardware/include/hardware/fb.h\nindex 9df94165b9b1..9ea9a6e60f05 100644\n--- a/include/android/hardware/libhardware/include/hardware/fb.h\n+++ b/include/android/hardware/libhardware/include/hardware/fb.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2008 The Android Open Source Project\n  *\ndiff --git a/include/android/hardware/libhardware/include/hardware/gralloc.h b/include/android/hardware/libhardware/include/hardware/gralloc.h\nindex ef86f9039395..9d14104b4842 100644\n--- a/include/android/hardware/libhardware/include/hardware/gralloc.h\n+++ b/include/android/hardware/libhardware/include/hardware/gralloc.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2008 The Android Open Source Project\n  *\n@@ -154,20 +155,20 @@ enum {\n  */\n typedef struct gralloc_module_t {\n     struct hw_module_t common;\n-    \n+\n     /*\n      * (*registerBuffer)() must be called before a buffer_handle_t that has not\n      * been created with (*alloc_device_t::alloc)() can be used.\n-     * \n+     *\n      * This is intended to be used with buffer_handle_t's that have been\n      * received in this process through IPC.\n-     * \n+     *\n      * This function checks that the handle is indeed a valid one and prepares\n      * it for use with (*lock)() and (*unlock)().\n-     * \n-     * It is not necessary to call (*registerBuffer)() on a handle created \n+     *\n+     * It is not necessary to call (*registerBuffer)() on a handle created\n      * with (*alloc_device_t::alloc)().\n-     * \n+     *\n      * returns an error if this buffer_handle_t is not valid.\n      */\n     int (*registerBuffer)(struct gralloc_module_t const* module,\n@@ -177,25 +178,25 @@ typedef struct gralloc_module_t {\n      * (*unregisterBuffer)() is called once this handle is no longer needed in\n      * this process. After this call, it is an error to call (*lock)(),\n      * (*unlock)(), or (*registerBuffer)().\n-     * \n+     *\n      * This function doesn't close or free the handle itself; this is done\n      * by other means, usually through libcutils's native_handle_close() and\n-     * native_handle_free(). \n-     * \n+     * native_handle_free().\n+     *\n      * It is an error to call (*unregisterBuffer)() on a buffer that wasn't\n      * explicitly registered first.\n      */\n     int (*unregisterBuffer)(struct gralloc_module_t const* module,\n             buffer_handle_t handle);\n-    \n+\n     /*\n-     * The (*lock)() method is called before a buffer is accessed for the \n+     * The (*lock)() method is called before a buffer is accessed for the\n      * specified usage. This call may block, for instance if the h/w needs\n      * to finish rendering or if CPU caches need to be synchronized.\n-     * \n-     * The caller promises to modify only pixels in the area specified \n+     *\n+     * The caller promises to modify only pixels in the area specified\n      * by (l,t,w,h).\n-     * \n+     *\n      * The content of the buffer outside of the specified area is NOT modified\n      * by this call.\n      *\n@@ -208,9 +209,9 @@ typedef struct gralloc_module_t {\n      *\n      * THREADING CONSIDERATIONS:\n      *\n-     * It is legal for several different threads to lock a buffer from \n+     * It is legal for several different threads to lock a buffer from\n      * read access, none of the threads are blocked.\n-     * \n+     *\n      * However, locking a buffer simultaneously for write or read/write is\n      * undefined, but:\n      * - shall not result in termination of the process\n@@ -219,21 +220,21 @@ typedef struct gralloc_module_t {\n      * into an indeterminate state.\n      *\n      * If the buffer was created with a usage mask incompatible with the\n-     * requested usage flags here, -EINVAL is returned. \n-     * \n+     * requested usage flags here, -EINVAL is returned.\n+     *\n      */\n-    \n+\n     int (*lock)(struct gralloc_module_t const* module,\n             buffer_handle_t handle, int usage,\n             int l, int t, int w, int h,\n             void** vaddr);\n \n-    \n+\n     /*\n      * The (*unlock)() method must be called after all changes to the buffer\n      * are completed.\n      */\n-    \n+\n     int (*unlock)(struct gralloc_module_t const* module,\n             buffer_handle_t handle);\n \n@@ -326,32 +327,32 @@ typedef struct gralloc_module_t {\n typedef struct alloc_device_t {\n     struct hw_device_t common;\n \n-    /* \n+    /*\n      * (*alloc)() Allocates a buffer in graphic memory with the requested\n      * parameters and returns a buffer_handle_t and the stride in pixels to\n      * allow the implementation to satisfy hardware constraints on the width\n-     * of a pixmap (eg: it may have to be multiple of 8 pixels). \n+     * of a pixmap (eg: it may have to be multiple of 8 pixels).\n      * The CALLER TAKES OWNERSHIP of the buffer_handle_t.\n      *\n      * If format is HAL_PIXEL_FORMAT_YCbCr_420_888, the returned stride must be\n      * 0, since the actual strides are available from the android_ycbcr\n      * structure.\n-     * \n+     *\n      * Returns 0 on success or -errno on error.\n      */\n-    \n+\n     int (*alloc)(struct alloc_device_t* dev,\n             int w, int h, int format, int usage,\n             buffer_handle_t* handle, int* stride);\n \n     /*\n-     * (*free)() Frees a previously allocated buffer. \n+     * (*free)() Frees a previously allocated buffer.\n      * Behavior is undefined if the buffer is still mapped in any process,\n      * but shall not result in termination of the program or security breaches\n      * (allowing a process to get access to another process' buffers).\n      * THIS FUNCTION TAKES OWNERSHIP of the buffer_handle_t which becomes\n-     * invalid after the call. \n-     * \n+     * invalid after the call.\n+     *\n      * Returns 0 on success or -errno on error.\n      */\n     int (*free)(struct alloc_device_t* dev,\n@@ -369,9 +370,9 @@ typedef struct alloc_device_t {\n \n /** convenience API for opening and closing a supported device */\n \n-static inline int gralloc_open(const struct hw_module_t* module, \n+static inline int gralloc_open(const struct hw_module_t* module,\n         struct alloc_device_t** device) {\n-    return module->methods->open(module, \n+    return module->methods->open(module,\n             GRALLOC_HARDWARE_GPU0, (struct hw_device_t**)device);\n }\n \ndiff --git a/include/android/hardware/libhardware/include/hardware/hardware.h b/include/android/hardware/libhardware/include/hardware/hardware.h\nindex 74f57aa4c28f..10b73df7150a 100644\n--- a/include/android/hardware/libhardware/include/hardware/hardware.h\n+++ b/include/android/hardware/libhardware/include/hardware/hardware.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2008 The Android Open Source Project\n  *\ndiff --git a/include/android/metadata/camera_metadata_hidden.h b/include/android/metadata/camera_metadata_hidden.h\nindex 31f1ad19e868..91b11e43463d 100644\n--- a/include/android/metadata/camera_metadata_hidden.h\n+++ b/include/android/metadata/camera_metadata_hidden.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright 2014 The Android Open Source Project\n  *\ndiff --git a/include/android/metadata/system/camera_metadata.h b/include/android/metadata/system/camera_metadata.h\nindex 46e7ac000298..1672b09ee947 100644\n--- a/include/android/metadata/system/camera_metadata.h\n+++ b/include/android/metadata/system/camera_metadata.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2012 The Android Open Source Project\n  *\ndiff --git a/include/android/metadata/system/camera_metadata_tags.h b/include/android/metadata/system/camera_metadata_tags.h\nindex adf18b8f4c2f..5b1d93e80191 100644\n--- a/include/android/metadata/system/camera_metadata_tags.h\n+++ b/include/android/metadata/system/camera_metadata_tags.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2012 The Android Open Source Project\n  *\n@@ -375,7 +376,7 @@ typedef enum camera_metadata_tag {\n     ANDROID_STATISTICS_OIS_Y_SHIFTS,                  // float[]      | ndk_public   | HIDL v3.3\n     ANDROID_STATISTICS_END,\n \n-    ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = \n+    ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =\n                                                       // byte[]       | public       | HIDL v3.2\n             ANDROID_STATISTICS_INFO_START,\n     ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT,   // int32        | system       | HIDL v3.2\ndiff --git a/include/android/metadata/system/camera_vendor_tags.h b/include/android/metadata/system/camera_vendor_tags.h\nindex 0bb542608c91..167ff7393a2c 100644\n--- a/include/android/metadata/system/camera_vendor_tags.h\n+++ b/include/android/metadata/system/camera_vendor_tags.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright 2014 The Android Open Source Project\n  *\ndiff --git a/include/android/system/core/include/android/log.h b/include/android/system/core/include/android/log.h\nindex 1c171b7bf2b5..dbad9dd18a2e 100644\n--- a/include/android/system/core/include/android/log.h\n+++ b/include/android/system/core/include/android/log.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2009 The Android Open Source Project\n  *\ndiff --git a/include/android/system/core/include/cutils/compiler.h b/include/android/system/core/include/cutils/compiler.h\nindex 70f884a1e701..efd1b1c36fa5 100644\n--- a/include/android/system/core/include/cutils/compiler.h\n+++ b/include/android/system/core/include/cutils/compiler.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2009 The Android Open Source Project\n  *\ndiff --git a/include/android/system/core/include/cutils/native_handle.h b/include/android/system/core/include/cutils/native_handle.h\nindex 268c5d3f51b7..ebedc105c596 100644\n--- a/include/android/system/core/include/cutils/native_handle.h\n+++ b/include/android/system/core/include/cutils/native_handle.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2009 The Android Open Source Project\n  *\n@@ -31,33 +32,33 @@ typedef struct native_handle\n \n /*\n  * native_handle_close\n- * \n+ *\n  * closes the file descriptors contained in this native_handle_t\n- * \n+ *\n  * return 0 on success, or a negative error code on failure\n- * \n+ *\n  */\n int native_handle_close(const native_handle_t* h);\n \n \n /*\n  * native_handle_create\n- * \n+ *\n  * creates a native_handle_t and initializes it. must be destroyed with\n  * native_handle_delete().\n- * \n+ *\n  */\n native_handle_t* native_handle_create(int numFds, int numInts);\n \n /*\n  * native_handle_delete\n- * \n+ *\n  * frees a native_handle_t allocated with native_handle_create().\n  * This ONLY frees the memory allocated for the native_handle_t, but doesn't\n  * close the file descriptors; which can be achieved with native_handle_close().\n- * \n+ *\n  * return 0 on success, or a negative error code on failure\n- * \n+ *\n  */\n int native_handle_delete(native_handle_t* h);\n \ndiff --git a/include/android/system/core/include/system/camera.h b/include/android/system/core/include/system/camera.h\nindex 5d0873ac42a6..a1b68d054d93 100644\n--- a/include/android/system/core/include/system/camera.h\n+++ b/include/android/system/core/include/system/camera.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2011 The Android Open Source Project\n  *\ndiff --git a/include/android/system/core/include/system/graphics.h b/include/android/system/core/include/system/graphics.h\nindex afd9f7bdb32f..909ffe68e78b 100644\n--- a/include/android/system/core/include/system/graphics.h\n+++ b/include/android/system/core/include/system/graphics.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2011 The Android Open Source Project\n  *\ndiff --git a/include/android/system/core/include/system/window.h b/include/android/system/core/include/system/window.h\nindex 508ce00bacec..2c9d6063fdb5 100644\n--- a/include/android/system/core/include/system/window.h\n+++ b/include/android/system/core/include/system/window.h\n@@ -1,3 +1,4 @@\n+/* SPDX-License-Identifier: Apache-2.0 */\n /*\n  * Copyright (C) 2011 The Android Open Source Project\n  *\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "3/6"
    ]
}