[{"id":2328,"web_url":"https://patchwork.libcamera.org/comment/2328/","msgid":"<20190807090746.GD5048@pendragon.ideasonboard.com>","date":"2019-08-07T09:07:46","subject":"Re: [libcamera-devel] [PATCH v2 3/6] include: android: Add SPDX tags","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Tue, Aug 06, 2019 at 09:55:15PM +0200, Jacopo Mondi wrote:\n> Add SPDX indentifier to Apache-2.0 licensed android headers.\n> \n> Signed-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(-)\n> \n> diff --git a/include/android/hardware/libhardware/include/hardware/camera3.h b/include/android/hardware/libhardware/include/hardware/camera3.h\n> index 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>   *\n> diff --git a/include/android/hardware/libhardware/include/hardware/camera_common.h b/include/android/hardware/libhardware/include/hardware/camera_common.h\n> index 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>   *\n> diff --git a/include/android/hardware/libhardware/include/hardware/fb.h b/include/android/hardware/libhardware/include/hardware/fb.h\n> index 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>   *\n> diff --git a/include/android/hardware/libhardware/include/hardware/gralloc.h b/include/android/hardware/libhardware/include/hardware/gralloc.h\n> index 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\nWith all the unrelated changes dropped,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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>  \n> diff --git a/include/android/hardware/libhardware/include/hardware/hardware.h b/include/android/hardware/libhardware/include/hardware/hardware.h\n> index 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>   *\n> diff --git a/include/android/metadata/camera_metadata_hidden.h b/include/android/metadata/camera_metadata_hidden.h\n> index 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>   *\n> diff --git a/include/android/metadata/system/camera_metadata.h b/include/android/metadata/system/camera_metadata.h\n> index 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>   *\n> diff --git a/include/android/metadata/system/camera_metadata_tags.h b/include/android/metadata/system/camera_metadata_tags.h\n> index 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\n> diff --git a/include/android/metadata/system/camera_vendor_tags.h b/include/android/metadata/system/camera_vendor_tags.h\n> index 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>   *\n> diff --git a/include/android/system/core/include/android/log.h b/include/android/system/core/include/android/log.h\n> index 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>   *\n> diff --git a/include/android/system/core/include/cutils/compiler.h b/include/android/system/core/include/cutils/compiler.h\n> index 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>   *\n> diff --git a/include/android/system/core/include/cutils/native_handle.h b/include/android/system/core/include/cutils/native_handle.h\n> index 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>  \n> diff --git a/include/android/system/core/include/system/camera.h b/include/android/system/core/include/system/camera.h\n> index 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>   *\n> diff --git a/include/android/system/core/include/system/graphics.h b/include/android/system/core/include/system/graphics.h\n> index 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>   *\n> diff --git a/include/android/system/core/include/system/window.h b/include/android/system/core/include/system/window.h\n> index 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>   *","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0706A615FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Aug 2019 11:07:49 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4FE63814;\n\tWed,  7 Aug 2019 11:07:48 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1565168868;\n\tbh=r9nMQ8u2ycanap51zXC/UjPJAwUkTiaDudOOeCrq314=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=h2yWmUFdqKWPU606N8MxxvMHlILmsAnoNWxfvS1ppx2nbq/pAfsdQreJdLwjhVw1X\n\tt3sqhZqJb/W2bS+U5iarFuLLfLRLDK5ohxEtN5GOJSyM0YWGKT8FHVJUHeautTxE+k\n\tfptCinKeef94aJNy3hdwoWkirQWgvmR8oH0YKE+g=","Date":"Wed, 7 Aug 2019 12:07:46 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190807090746.GD5048@pendragon.ideasonboard.com>","References":"<20190806195518.16739-1-jacopo@jmondi.org>\n\t<20190806195518.16739-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190806195518.16739-4-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [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":"Wed, 07 Aug 2019 09:07:49 -0000"}},{"id":2331,"web_url":"https://patchwork.libcamera.org/comment/2331/","msgid":"<20190807091936.sra7feekrxhzz2sa@uno.localdomain>","date":"2019-08-07T09:19:36","subject":"Re: [libcamera-devel] [PATCH v2 3/6] include: android: Add SPDX tags","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Wed, Aug 07, 2019 at 12:07:46PM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Tue, Aug 06, 2019 at 09:55:15PM +0200, Jacopo Mondi wrote:\n> > Add SPDX indentifier to Apache-2.0 licensed android headers.\n> >\n> > Signed-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(-)\n> >\n> > diff --git a/include/android/hardware/libhardware/include/hardware/camera3.h b/include/android/hardware/libhardware/include/hardware/camera3.h\n> > index 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> >   *\n> > diff --git a/include/android/hardware/libhardware/include/hardware/camera_common.h b/include/android/hardware/libhardware/include/hardware/camera_common.h\n> > index 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> >   *\n> > diff --git a/include/android/hardware/libhardware/include/hardware/fb.h b/include/android/hardware/libhardware/include/hardware/fb.h\n> > index 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> >   *\n> > diff --git a/include/android/hardware/libhardware/include/hardware/gralloc.h b/include/android/hardware/libhardware/include/hardware/gralloc.h\n> > index 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> With all the unrelated changes dropped,\n>\n\nOh! I totlly missed them! That's my vi config that automatically\ndeletes all spaces at the end of a line when I save and close a file!\n(I could blame them for having files checked in in the official\nrespository with spaces at end of the line, but...)\n\nIt also mean I didn't carefully enough looked at the resulting patch,\nI'm sorry about this!\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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> >\n> > diff --git a/include/android/hardware/libhardware/include/hardware/hardware.h b/include/android/hardware/libhardware/include/hardware/hardware.h\n> > index 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> >   *\n> > diff --git a/include/android/metadata/camera_metadata_hidden.h b/include/android/metadata/camera_metadata_hidden.h\n> > index 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> >   *\n> > diff --git a/include/android/metadata/system/camera_metadata.h b/include/android/metadata/system/camera_metadata.h\n> > index 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> >   *\n> > diff --git a/include/android/metadata/system/camera_metadata_tags.h b/include/android/metadata/system/camera_metadata_tags.h\n> > index 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\n> > diff --git a/include/android/metadata/system/camera_vendor_tags.h b/include/android/metadata/system/camera_vendor_tags.h\n> > index 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> >   *\n> > diff --git a/include/android/system/core/include/android/log.h b/include/android/system/core/include/android/log.h\n> > index 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> >   *\n> > diff --git a/include/android/system/core/include/cutils/compiler.h b/include/android/system/core/include/cutils/compiler.h\n> > index 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> >   *\n> > diff --git a/include/android/system/core/include/cutils/native_handle.h b/include/android/system/core/include/cutils/native_handle.h\n> > index 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> >\n> > diff --git a/include/android/system/core/include/system/camera.h b/include/android/system/core/include/system/camera.h\n> > index 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> >   *\n> > diff --git a/include/android/system/core/include/system/graphics.h b/include/android/system/core/include/system/graphics.h\n> > index 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> >   *\n> > diff --git a/include/android/system/core/include/system/window.h b/include/android/system/core/include/system/window.h\n> > index 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>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 ED763615FF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Aug 2019 11:18:16 +0200 (CEST)","from uno.localdomain\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 C29F21C0005;\n\tWed,  7 Aug 2019 09:18:15 +0000 (UTC)"],"X-Originating-IP":"79.51.24.150","Date":"Wed, 7 Aug 2019 11:19:36 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190807091936.sra7feekrxhzz2sa@uno.localdomain>","References":"<20190806195518.16739-1-jacopo@jmondi.org>\n\t<20190806195518.16739-4-jacopo@jmondi.org>\n\t<20190807090746.GD5048@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"apq5od2gtynciuaz\"","Content-Disposition":"inline","In-Reply-To":"<20190807090746.GD5048@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [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":"Wed, 07 Aug 2019 09:18:17 -0000"}}]