[{"id":29885,"web_url":"https://patchwork.libcamera.org/comment/29885/","msgid":"<ZmqhpiyCd3wvnIgC@pyrite.rasen.tech>","date":"2024-06-13T07:37:10","subject":"Re: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Thu, Jun 13, 2024 at 04:39:37AM +0300, Laurent Pinchart wrote:\n> Now that YAML deserialization of Vector instances is supported through\n> YamlObject::get(), remove the Vector::readYaml() function. It turns out\n> not be used.\n\ns/not/to not/\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/ipa/libipa/vector.cpp | 13 -------------\n>  src/ipa/libipa/vector.h   | 23 -----------------------\n>  2 files changed, 36 deletions(-)\n> \n> diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp\n> index 4e987d82fa70..b071b261b9c4 100644\n> --- a/src/ipa/libipa/vector.cpp\n> +++ b/src/ipa/libipa/vector.cpp\n> @@ -40,19 +40,6 @@ namespace ipa {\n>   * The size of \\a data must be equal to the dimension size Rows of the vector.\n>   */\n>  \n> -/**\n> - * \\fn Vector::readYaml\n> - * \\brief Populate the vector with yaml data\n> - * \\param yaml Yaml data to populate the vector with\n> - *\n> - * Any existing data in the vector will be overwritten. The size of the data\n> - * read from \\a yaml must be equal to the dimension size Rows of the vector.\n> - *\n> - * The yaml data is expected to be a list with elements of type T.\n> - *\n> - * \\return 0 on success, negative error code otherwise\n> - */\n> -\n>  /**\n>   * \\fn T Vector::operator[](size_t i) const\n>   * \\brief Index to an element in the vector\n> diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h\n> index 4b2fe581ecc2..2a2906202ce4 100644\n> --- a/src/ipa/libipa/vector.h\n> +++ b/src/ipa/libipa/vector.h\n> @@ -39,29 +39,6 @@ public:\n>  \t\t\tdata_[i] = data[i];\n>  \t}\n>  \n> -\tint readYaml(const libcamera::YamlObject &yaml)\n> -\t{\n> -\t\tif (yaml.size() != Rows) {\n> -\t\t\tLOG(Vector, Error)\n> -\t\t\t\t<< \"Wrong number of values in vector: expected \"\n> -\t\t\t\t<< Rows << \", got \" << yaml.size();\n> -\t\t\treturn -EINVAL;\n> -\t\t}\n> -\n> -\t\tunsigned int i = 0;\n> -\t\tfor (const auto &x : yaml.asList()) {\n> -\t\t\tauto value = x.get<T>();\n> -\t\t\tif (!value) {\n> -\t\t\t\tLOG(Vector, Error) << \"Failed to read vector value\";\n> -\t\t\t\treturn -EINVAL;\n> -\t\t\t}\n> -\n> -\t\t\tdata_[i++] = *value;\n> -\t\t}\n> -\n> -\t\treturn 0;\n> -\t}\n> -\n>  \tconst T &operator[](size_t i) const\n>  \t{\n>  \t\tASSERT(i < data_.size());\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 65007C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 07:37:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 453736548F;\n\tThu, 13 Jun 2024 09:37:19 +0200 (CEST)","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 8C1F76548B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 09:37:17 +0200 (CEST)","from pyrite.rasen.tech (h175-177-049-156.catv02.itscom.jp\n\t[175.177.49.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3ACEFBEB;\n\tThu, 13 Jun 2024 09:37:01 +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=\"sPsk0NYV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718264223;\n\tbh=hHfmya5RaNKF58W9th1ltIHto6LE5C+6X90PifF51/I=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sPsk0NYVMF+C2V+BA8NzESMMMqqClA/MUcBq6ZGxnSw+gUYFkL6xeEbslT8ymNtfV\n\twdyJHRQcPZGEs9lyuHOkfjIc596Dn/WIqnzT0pMHhk4pt1FLzNi41xmJVRUaQnWBWN\n\tFJaqNFvKwLS+MHocHnmSSXJbUlmf8FJtGl0HXkh8=","Date":"Thu, 13 Jun 2024 16:37:10 +0900","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Subject":"Re: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function","Message-ID":"<ZmqhpiyCd3wvnIgC@pyrite.rasen.tech>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-5-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240613013944.23344-5-laurent.pinchart@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29911,"web_url":"https://patchwork.libcamera.org/comment/29911/","msgid":"<171827690626.2248009.6553887228024126625@ping.linuxembedded.co.uk>","date":"2024-06-13T11:08:26","subject":"Re: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-13 02:39:37)\n> Now that YAML deserialization of Vector instances is supported through\n> YamlObject::get(), remove the Vector::readYaml() function. It turns out\n> not be used.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI think the 'not used' is not yet - as this was added as a dependency\nfor Pauls other series, so I'm curious how the rebasing goes on top of\nthis for that work...\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/libipa/vector.cpp | 13 -------------\n>  src/ipa/libipa/vector.h   | 23 -----------------------\n>  2 files changed, 36 deletions(-)\n> \n> diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp\n> index 4e987d82fa70..b071b261b9c4 100644\n> --- a/src/ipa/libipa/vector.cpp\n> +++ b/src/ipa/libipa/vector.cpp\n> @@ -40,19 +40,6 @@ namespace ipa {\n>   * The size of \\a data must be equal to the dimension size Rows of the vector.\n>   */\n>  \n> -/**\n> - * \\fn Vector::readYaml\n> - * \\brief Populate the vector with yaml data\n> - * \\param yaml Yaml data to populate the vector with\n> - *\n> - * Any existing data in the vector will be overwritten. The size of the data\n> - * read from \\a yaml must be equal to the dimension size Rows of the vector.\n> - *\n> - * The yaml data is expected to be a list with elements of type T.\n> - *\n> - * \\return 0 on success, negative error code otherwise\n> - */\n> -\n>  /**\n>   * \\fn T Vector::operator[](size_t i) const\n>   * \\brief Index to an element in the vector\n> diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h\n> index 4b2fe581ecc2..2a2906202ce4 100644\n> --- a/src/ipa/libipa/vector.h\n> +++ b/src/ipa/libipa/vector.h\n> @@ -39,29 +39,6 @@ public:\n>                         data_[i] = data[i];\n>         }\n>  \n> -       int readYaml(const libcamera::YamlObject &yaml)\n> -       {\n> -               if (yaml.size() != Rows) {\n> -                       LOG(Vector, Error)\n> -                               << \"Wrong number of values in vector: expected \"\n> -                               << Rows << \", got \" << yaml.size();\n> -                       return -EINVAL;\n> -               }\n> -\n> -               unsigned int i = 0;\n> -               for (const auto &x : yaml.asList()) {\n> -                       auto value = x.get<T>();\n> -                       if (!value) {\n> -                               LOG(Vector, Error) << \"Failed to read vector value\";\n> -                               return -EINVAL;\n> -                       }\n> -\n> -                       data_[i++] = *value;\n> -               }\n> -\n> -               return 0;\n> -       }\n> -\n>         const T &operator[](size_t i) const\n>         {\n>                 ASSERT(i < data_.size());\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 DB0DABD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 11:08:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 89B0D65494;\n\tThu, 13 Jun 2024 13:08:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 203ED6548D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 13:08:29 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2D4E14CF;\n\tThu, 13 Jun 2024 13:08:15 +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=\"uZo2dxzQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718276895;\n\tbh=r8sAkFNc14ff67q8p0VVoOUK3xE45IwCEbGYOhwbQyA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=uZo2dxzQrXunoiJN9wJgdZL5WGqcBJgv6YlNvi3s46I31eVmKgpDslIp2TBnOWCjs\n\tZIaUR/kIv6Zmto7Red281xXDYIvdS7TIIVUqS/0///N+TR34aXTevsUJoenXHIb71m\n\tN9DrRKZZsbfmrnY/YO8LjlURyhBsUNYh2XaWgBcs=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240613013944.23344-5-laurent.pinchart@ideasonboard.com>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-5-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Paul Elder <paul.elder@ideasonboard.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 13 Jun 2024 12:08:26 +0100","Message-ID":"<171827690626.2248009.6553887228024126625@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29916,"web_url":"https://patchwork.libcamera.org/comment/29916/","msgid":"<20240613111833.GF6019@pendragon.ideasonboard.com>","date":"2024-06-13T11:18:33","subject":"Re: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jun 13, 2024 at 12:08:26PM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2024-06-13 02:39:37)\n> > Now that YAML deserialization of Vector instances is supported through\n> > YamlObject::get(), remove the Vector::readYaml() function. It turns out\n> > not be used.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> I think the 'not used' is not yet - as this was added as a dependency\n> for Pauls other series, so I'm curious how the rebasing goes on top of\n> this for that work...\n\nUnless I missed some patches, Vector::readYaml() isn't used there\neither.\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > ---\n> >  src/ipa/libipa/vector.cpp | 13 -------------\n> >  src/ipa/libipa/vector.h   | 23 -----------------------\n> >  2 files changed, 36 deletions(-)\n> > \n> > diff --git a/src/ipa/libipa/vector.cpp b/src/ipa/libipa/vector.cpp\n> > index 4e987d82fa70..b071b261b9c4 100644\n> > --- a/src/ipa/libipa/vector.cpp\n> > +++ b/src/ipa/libipa/vector.cpp\n> > @@ -40,19 +40,6 @@ namespace ipa {\n> >   * The size of \\a data must be equal to the dimension size Rows of the vector.\n> >   */\n> >  \n> > -/**\n> > - * \\fn Vector::readYaml\n> > - * \\brief Populate the vector with yaml data\n> > - * \\param yaml Yaml data to populate the vector with\n> > - *\n> > - * Any existing data in the vector will be overwritten. The size of the data\n> > - * read from \\a yaml must be equal to the dimension size Rows of the vector.\n> > - *\n> > - * The yaml data is expected to be a list with elements of type T.\n> > - *\n> > - * \\return 0 on success, negative error code otherwise\n> > - */\n> > -\n> >  /**\n> >   * \\fn T Vector::operator[](size_t i) const\n> >   * \\brief Index to an element in the vector\n> > diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h\n> > index 4b2fe581ecc2..2a2906202ce4 100644\n> > --- a/src/ipa/libipa/vector.h\n> > +++ b/src/ipa/libipa/vector.h\n> > @@ -39,29 +39,6 @@ public:\n> >                         data_[i] = data[i];\n> >         }\n> >  \n> > -       int readYaml(const libcamera::YamlObject &yaml)\n> > -       {\n> > -               if (yaml.size() != Rows) {\n> > -                       LOG(Vector, Error)\n> > -                               << \"Wrong number of values in vector: expected \"\n> > -                               << Rows << \", got \" << yaml.size();\n> > -                       return -EINVAL;\n> > -               }\n> > -\n> > -               unsigned int i = 0;\n> > -               for (const auto &x : yaml.asList()) {\n> > -                       auto value = x.get<T>();\n> > -                       if (!value) {\n> > -                               LOG(Vector, Error) << \"Failed to read vector value\";\n> > -                               return -EINVAL;\n> > -                       }\n> > -\n> > -                       data_[i++] = *value;\n> > -               }\n> > -\n> > -               return 0;\n> > -       }\n> > -\n> >         const T &operator[](size_t i) const\n> >         {\n> >                 ASSERT(i < data_.size());","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 39FCCC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 11:18:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD99B65490;\n\tThu, 13 Jun 2024 13:18:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 06D3D65462\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 13:18:54 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EAA3D4CF;\n\tThu, 13 Jun 2024 13:18:39 +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=\"sqjnPlgD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718277520;\n\tbh=zl3MG7qL9zXRYNJ3P9zwbEEBMds2cY2fKNM5KUTN+z4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sqjnPlgDegbFkWLrMtQbF8m6qIqC7QO6jyiTOk+PE1YQi0iGSUKGIfr6Ef1TM3esf\n\t9EF8lNBe2FeRa22qfsXElWl8mu8VCltjahX4GUWGmmbM5re1d2mI2PdVFk2GmGY+3W\n\tIXK6RKl2RynRwSEQ0vN5WGLMZYxOfvETuOvoSrmA=","Date":"Thu, 13 Jun 2024 14:18:33 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tPaul Elder <paul.elder@ideasonboard.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Subject":"Re: [PATCH 04/11] ipa: libipa: vector: Drop readYaml() function","Message-ID":"<20240613111833.GF6019@pendragon.ideasonboard.com>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-5-laurent.pinchart@ideasonboard.com>\n\t<171827690626.2248009.6553887228024126625@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<171827690626.2248009.6553887228024126625@ping.linuxembedded.co.uk>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]