From patchwork Fri Apr 23 10:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 12099 X-Patchwork-Delegate: paul.elder@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3F00ABDB15 for ; Fri, 23 Apr 2021 10:47:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F052C6887E; Fri, 23 Apr 2021 12:47:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Z6kI95xu"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 473BB602D1 for ; Fri, 23 Apr 2021 12:47:23 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C11A332; Fri, 23 Apr 2021 12:47:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1619174842; bh=xc75bAVMG8Fk+xiu0QkHuxuR+saagzzTBvvrPLAM4so=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z6kI95xuQFV4oaydbD9PXnAghiTCgbJBlJQm1qJefcQEhmTPvdRZAsdoL3BLAmgKy Nne09c6YMZm36E2ybCRvblBUpQyW1SDJwEj+rr/inY6RhgFA8jdmTL089L9VoUoWtW valdY5m29w/WbVjjz2AnTnxKTr0OZ6JdPdHCUUG8= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 23 Apr 2021 19:47:09 +0900 Message-Id: <20210423104711.401547-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210423104711.401547-1-paul.elder@ideasonboard.com> References: <20210423104711.401547-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/3] utils: ipc: Include instead of forward-declare CameraSensorInfo X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" For structs defined in core.mojom that have the skipHeader tag, if they're only used in function parameters (in a mojom file) then a forward-declaration is sufficient. However, if the struct is used in another struct in a mojom file, then the forward-declaration is insufficient, and the definition needs to be included. Do so for CameraSensorInfo, which is the only forward-declared struct in ipa_interface.h, and update the documentation comment. Signed-off-by: Paul Elder Tested-by: Umang Jain Reviewed-by: Laurent Pinchart --- Changes in v3: - update the documentation in core.mojom too --- include/libcamera/ipa/core.mojom | 3 +-- include/libcamera/ipa/ipa_interface.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom index 5363f1c5..70de71ea 100644 --- a/include/libcamera/ipa/core.mojom +++ b/include/libcamera/ipa/core.mojom @@ -38,8 +38,7 @@ * implemented in ipa_data_serializer.h, as it cannot be defined in mojom * - [skipHeader] and [skipSerdes] only work here in core.mojom. * - If a struct definition has [skipHeader], then the header where the - * struct is defined must be #included (or the struct forward-declared) in - * ipa_interface.h + * struct is defined must be #included in ipa_interface.h * - If a field in a struct has a FileDescriptor, but is not explicitly * defined so in mojom, then the field must be marked with the [hasFd] * attribute. diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h index 5d99e2cf..dfe1b40a 100644 --- a/include/libcamera/ipa/ipa_interface.h +++ b/include/libcamera/ipa/ipa_interface.h @@ -18,15 +18,15 @@ #include #include +#include "libcamera/internal/camera_sensor.h" + namespace libcamera { /* * Structs that are defined in core.mojom and have the skipHeader tag must be - * forward-declared or #included here. + * #included here. */ -struct CameraSensorInfo; - class IPAInterface { public: