[{"id":18064,"web_url":"https://patchwork.libcamera.org/comment/18064/","msgid":"<20210709160514.ejgzokbhcmv24z77@uno.localdomain>","date":"2021-07-09T16:05:14","subject":"Re: [libcamera-devel] [PATCH v6 1/8] ipa: raspberrypi: Make\n\tdevice_status.h C++ only header, and update comments","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Naush,\n\nOn Fri, Jul 09, 2021 at 03:58:18PM +0100, Naushir Patuck wrote:\n> This header file is no longer C compatible, so remove the extern \"C\"\n> declaration.\n>\n> Replace C++ style comments with C style based on libcamera guidelines.\n>\n> There are no functional changes in this commit.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> ---\n>  .../raspberrypi/controller/device_status.h    | 24 +++++++------------\n>  1 file changed, 9 insertions(+), 15 deletions(-)\n>\n> diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\n> index f74235248b12..733378dbfa27 100644\n> --- a/src/ipa/raspberrypi/controller/device_status.h\n> +++ b/src/ipa/raspberrypi/controller/device_status.h\n> @@ -1,6 +1,6 @@\n>  /* SPDX-License-Identifier: BSD-2-Clause */\n>  /*\n> - * Copyright (C) 2019, Raspberry Pi (Trading) Limited\n> + * Copyright (C) 2019-2021, Raspberry Pi (Trading) Limited\n>   *\n>   * device_status.h - device (image sensor) status\n>   */\n> @@ -8,25 +8,19 @@\n>\n>  #include <libcamera/base/utils.h>\n>\n> -// Definition of \"device metadata\" which stores things like shutter time and\n> -// analogue gain that downstream control algorithms will want to know.\n> -\n> -#ifdef __cplusplus\n> -extern \"C\" {\n> -#endif\n> +/*\n> + * Definition of \"device metadata\" which stores things like shutter time and\n> + * analogue gain that downstream control algorithms will want to know.\n> + */\n>\n>  struct DeviceStatus {\n> -\t// time shutter is open\n> +\t/* time shutter is open */\n>  \tlibcamera::utils::Duration shutter_speed;\n>  \tdouble analogue_gain;\n> -\t// 1.0/distance-in-metres, or 0 if unknown\n> +\t/* 1.0/distance-in-metres, or 0 if unknown */\n>  \tdouble lens_position;\n> -\t// 1/f so that brightness quadruples when this doubles, or 0 if unknown\n> +\t/* 1/f so that brightness quadruples when this doubles, or 0 if unknown */\n>  \tdouble aperture;\n> -\t// proportional to brightness with 0 = no flash, 1 = maximum flash\n> +\t/* proportional to brightness with 0 = no flash, 1 = maximum flash */\n>  \tdouble flash_intensity;\n>  };\n> -\n> -#ifdef __cplusplus\n> -}\n> -#endif\n> --\n> 2.25.1\n>","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 0B1A1BD794\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Jul 2021 16:04:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CE0DC6851B;\n\tFri,  9 Jul 2021 18:04:27 +0200 (CEST)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EA72605AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Jul 2021 18:04:26 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id CE7C020003;\n\tFri,  9 Jul 2021 16:04:25 +0000 (UTC)"],"Date":"Fri, 9 Jul 2021 18:05:14 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20210709160514.ejgzokbhcmv24z77@uno.localdomain>","References":"<20210709145825.2943443-1-naush@raspberrypi.com>\n\t<20210709145825.2943443-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210709145825.2943443-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v6 1/8] ipa: raspberrypi: Make\n\tdevice_status.h C++ only header, and update comments","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":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18076,"web_url":"https://patchwork.libcamera.org/comment/18076/","msgid":"<YOs6ZLdzsMQorKHi@pendragon.ideasonboard.com>","date":"2021-07-11T18:37:24","subject":"Re: [libcamera-devel] [PATCH v6 1/8] ipa: raspberrypi: Make\n\tdevice_status.h C++ only header, and update comments","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Fri, Jul 09, 2021 at 03:58:18PM +0100, Naushir Patuck wrote:\n> This header file is no longer C compatible, so remove the extern \"C\"\n> declaration.\n> \n> Replace C++ style comments with C style based on libcamera guidelines.\n> \n> There are no functional changes in this commit.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  .../raspberrypi/controller/device_status.h    | 24 +++++++------------\n>  1 file changed, 9 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\n> index f74235248b12..733378dbfa27 100644\n> --- a/src/ipa/raspberrypi/controller/device_status.h\n> +++ b/src/ipa/raspberrypi/controller/device_status.h\n> @@ -1,6 +1,6 @@\n>  /* SPDX-License-Identifier: BSD-2-Clause */\n>  /*\n> - * Copyright (C) 2019, Raspberry Pi (Trading) Limited\n> + * Copyright (C) 2019-2021, Raspberry Pi (Trading) Limited\n>   *\n>   * device_status.h - device (image sensor) status\n>   */\n> @@ -8,25 +8,19 @@\n>  \n>  #include <libcamera/base/utils.h>\n>  \n> -// Definition of \"device metadata\" which stores things like shutter time and\n> -// analogue gain that downstream control algorithms will want to know.\n> -\n> -#ifdef __cplusplus\n> -extern \"C\" {\n> -#endif\n> +/*\n> + * Definition of \"device metadata\" which stores things like shutter time and\n> + * analogue gain that downstream control algorithms will want to know.\n> + */\n>  \n>  struct DeviceStatus {\n> -\t// time shutter is open\n> +\t/* time shutter is open */\n>  \tlibcamera::utils::Duration shutter_speed;\n>  \tdouble analogue_gain;\n> -\t// 1.0/distance-in-metres, or 0 if unknown\n> +\t/* 1.0/distance-in-metres, or 0 if unknown */\n>  \tdouble lens_position;\n> -\t// 1/f so that brightness quadruples when this doubles, or 0 if unknown\n> +\t/* 1/f so that brightness quadruples when this doubles, or 0 if unknown */\n>  \tdouble aperture;\n> -\t// proportional to brightness with 0 = no flash, 1 = maximum flash\n> +\t/* proportional to brightness with 0 = no flash, 1 = maximum flash */\n>  \tdouble flash_intensity;\n>  };\n> -\n> -#ifdef __cplusplus\n> -}\n> -#endif","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 3DE98BD794\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 Jul 2021 18:38:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8F2976851D;\n\tSun, 11 Jul 2021 20:38:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F6E968519\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 Jul 2021 20:38:11 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C5289CC;\n\tSun, 11 Jul 2021 20:38:10 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QU71phMx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1626028691;\n\tbh=jzuvJKyFWSkhAwR8CS5Qvj+bYtGlk0vBG9Zr26TivtI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QU71phMxuL5kHgecM3zrNeUJUuhddhHeAOxl1askYJDQUWzOSY2AvMJUmBhf0byhO\n\tq/tOG9omggTAIkqRDfFxWAMmJXiJQ8Spk0Z7l1MaTSRMJsn5DjoHreOfdexfMzMeoP\n\t29LgatZPvO1x4brRhfRPWlpgiwT+B/IzUGor711E=","Date":"Sun, 11 Jul 2021 21:37:24 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YOs6ZLdzsMQorKHi@pendragon.ideasonboard.com>","References":"<20210709145825.2943443-1-naush@raspberrypi.com>\n\t<20210709145825.2943443-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210709145825.2943443-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v6 1/8] ipa: raspberrypi: Make\n\tdevice_status.h C++ only header, and update comments","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":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]