[{"id":14808,"web_url":"https://patchwork.libcamera.org/comment/14808/","msgid":"<YBC0hi3dHSySGPrr@pendragon.ideasonboard.com>","date":"2021-01-27T00:32:06","subject":"Re: [libcamera-devel] [PATCH] raspberrypi: Add the correct integer\n\tconst postfix for FrameDurations","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\nI've updated the subject to \"ipa: raspberrypi: Cast FrameDurations\nlimits to 64-bit integer\", and pushed the patch.\n\nOn Mon, Jan 25, 2021 at 08:19:32AM +0000, Naushir Patuck wrote:\n> At startup, ControlInfoMap::generateIdmap() threw a log message warning\n> that the controls::FrameDurations had a type mismatch based on the\n> min/max values provided in libcamera::RPi::Controls initialiser.\n> \n> Fix this warning by forcing the integer constants to be 64-bit wide by\n> using the INT64_C() macro.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideaasonboard.com>\n> ---\n>  include/libcamera/ipa/raspberrypi.h | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> index 1de36039cee0..4038428bdba4 100644\n> --- a/include/libcamera/ipa/raspberrypi.h\n> +++ b/include/libcamera/ipa/raspberrypi.h\n> @@ -7,6 +7,8 @@\n>  #ifndef __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__\n>  #define __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__\n>  \n> +#include <stdint.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  \n> @@ -65,7 +67,7 @@ static const ControlInfoMap Controls = {\n>  \t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n>  \t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n>  \t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n> -\t{ &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n> +\t{ &controls::FrameDurations, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n>  };\n>  \n>  } /* namespace RPi */","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 C8D59BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jan 2021 00:32:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2B4DA6833C;\n\tWed, 27 Jan 2021 01:32:28 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A2F25682D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jan 2021 01:32:26 +0100 (CET)","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 15CA92C1;\n\tWed, 27 Jan 2021 01:32:26 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"esdfmzQ7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611707546;\n\tbh=mA2Q/VdGsoWzccJU7TLMuG9qkElNw2gn0V2GX8QP8aY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=esdfmzQ7k1H8vf2yXbOsI/5Pga2InIeh5UsTOyyNhtgFd7UHq2aVtRODh8GyjPObm\n\t1HpsnZir9sM6W47TIM1GTercl0EK6gThL1NpwiNYRSpSJ6vmGrNT6vWEsPDS5nST1s\n\tAVpDeC5P4wLSvz6mdgpJAirgZfaz06W+Xhc4uav0=","Date":"Wed, 27 Jan 2021 02:32:06 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YBC0hi3dHSySGPrr@pendragon.ideasonboard.com>","References":"<20210124140506.786503-1-naush@raspberrypi.com>\n\t<20210125081932.799132-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210125081932.799132-1-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] raspberrypi: Add the correct integer\n\tconst postfix for FrameDurations","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","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>"}}]