{"id":2317,"url":"https://patchwork.libcamera.org/api/patches/2317/?format=json","web_url":"https://patchwork.libcamera.org/patch/2317/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20191108205409.18845-22-laurent.pinchart@ideasonboard.com>","date":"2019-11-08T20:54:06","name":"[libcamera-devel,v2,21/24] ipa: Declare the ipaCreate() function prototype","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"77322e0ba06caa5e3d97594c34d1ec8ca674d182","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/2317/mbox/","series":[{"id":568,"url":"https://patchwork.libcamera.org/api/series/568/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=568","date":"2019-11-08T20:53:45","name":"Control serialization and IPA C API","version":2,"mbox":"https://patchwork.libcamera.org/series/568/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2317/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2317/checks/","tags":{},"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 E7FFE60180\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Nov 2019 21:54:29 +0100 (CET)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8BD2F2D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Nov 2019 21:54:29 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1573246469;\n\tbh=8Wn8OxFo8oHZj/VGcpU2ja0SkDrF2F/Wtw9rxZAG9QY=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=q8iK00Lv9mWWBNWcyx6hsK8XPH7cgvmb+MeCFrsXq4kwGfS4Q/y3+/R55KYd6lZZS\n\tb93YOJz9PJ+k58n62XBzyERB9Dw5gwCBEHz/SX/up3yLASHX6bP9pTUwk9D+lHxMGx\n\tDl5XVlTVW2csO4xnq085EN1XL0JMOL220V4sHdNc=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  8 Nov 2019 22:54:06 +0200","Message-Id":"<20191108205409.18845-22-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.23.0","In-Reply-To":"<20191108205409.18845-1-laurent.pinchart@ideasonboard.com>","References":"<20191108205409.18845-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 21/24] ipa: Declare the ipaCreate()\n\tfunction prototype","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>","X-List-Received-Date":"Fri, 08 Nov 2019 20:54:30 -0000"},"content":"IPA modules have to implement a public ipaCreate() function, but its\nprototype isn't declared in any header file. This allows for modules to\nget the prototype wrong without being warned by the compiler. Fix it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/ipa/ipa_interface.h     |  2 ++\n src/libcamera/ipa_interface.cpp | 10 ++++++++++\n 2 files changed, 12 insertions(+)","diff":"diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h\nindex 3a423e37671f..92f1aac50b85 100644\n--- a/include/ipa/ipa_interface.h\n+++ b/include/ipa/ipa_interface.h\n@@ -80,6 +80,8 @@ struct ipa_context_ops {\n \t\t\t      const struct ipa_operation_data *data);\n };\n \n+struct ipa_context *ipaCreate();\n+\n #ifdef __cplusplus\n }\n \ndiff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp\nindex 89fce0e8347f..cb2767a04711 100644\n--- a/src/libcamera/ipa_interface.cpp\n+++ b/src/libcamera/ipa_interface.cpp\n@@ -261,6 +261,16 @@\n  * \\sa libcamera::IPAInterface::processEvent()\n  */\n \n+/**\n+ * \\fn ipaCreate()\n+ * \\brief Entry point to the IPA modules\n+ *\n+ * This function is the entry point to the IPA modules. It is implemented by\n+ * every IPA module, and called by libcamera to create a new IPA context.\n+ *\n+ * \\return A newly created IPA context\n+ */\n+\n namespace libcamera {\n \n /**\n","prefixes":["libcamera-devel","v2","21/24"]}