From patchwork Mon Jun 24 19:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20369 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 38CE2BD87C for ; Mon, 24 Jun 2024 19:30:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DA489654AA; Mon, 24 Jun 2024 21:30:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="T8oNxdNH"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F21EA654A1 for ; Mon, 24 Jun 2024 21:30:06 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E3BD518ED; Mon, 24 Jun 2024 21:29:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719257385; bh=j9RrLLxmhULYnH+F2cHOe2p0fXdHEv3+MjmL7WvbinU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T8oNxdNHffTZ1AlaHDob9ssJI86fC+ybr2n024vjhh6FqQl5cyltGpawJHzkDhZrV zymORmU5A+btLSndVq4YZKcEeG1DdhXTy7hdoI4RmqYCDdolrTAsknup47OdOMavDM dT76QZqM+to3pQhfTa3RqFmcoMbjPxGwY8TVuhWE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH 02/10] ipa: ipa_interface: Declare ipaCreate() in libcamera namespace Date: Mon, 24 Jun 2024 22:29:33 +0300 Message-ID: <20240624192941.22943-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240624192941.22943-1-laurent.pinchart@ideasonboard.com> References: <20240624192941.22943-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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" The ipaCreate() function is the entry point to IPA modules. It is declared in ipa_interface.h, and defined by each module. As the function is defined with extern "C" linkage, the namespace in which it is contained is not very relevant from a caller's point of view. For the IPA module implementer, however, defining the function in the libcamera namespace avoids adding an explicit libcamera:: prefix to the symbols used by the function. This is why all IPA modules define their ipaCreate() entry point in the libcamera namespace. The ipa_interface.h file, however, declares the function in the global namespace. This doesn't cause any issue at runtime, but will cause a missing declaration warning when we enable them. To prepare for that, move the function declaration to the libcamera namespace. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- include/libcamera/ipa/ipa_interface.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h index b93f1a15b2c9..53cf5377fcc6 100644 --- a/include/libcamera/ipa/ipa_interface.h +++ b/include/libcamera/ipa/ipa_interface.h @@ -33,8 +33,8 @@ public: virtual ~IPAInterface() = default; }; -} /* namespace libcamera */ - extern "C" { libcamera::IPAInterface *ipaCreate(); } + +} /* namespace libcamera */