[{"id":37434,"web_url":"https://patchwork.libcamera.org/comment/37434/","msgid":"<176607417097.1127434.9785860061139751178@ping.linuxembedded.co.uk>","date":"2025-12-18T16:09:30","subject":"Re: [PATCH v1 2/3] libcamera: v4l2_subdevice: Avoid reconstructing\n\tthe `std::regex` object","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2025-12-18 14:07:00)\n> Make the `std::regex` object have static lifetime to avoid\n> reconstructing it on every call.\n> \n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/libcamera/v4l2_subdevice.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 00205bc72..5e337a8cc 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -1725,7 +1725,7 @@ const std::string &V4L2Subdevice::model()\n>          * an I2C address, and use the full entity name otherwise.\n>          */\n>         std::string entityName = entity_->name();\n> -       std::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n> +       static const std::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n>         std::smatch match;\n>  \n>         if (std::regex_search(entityName, match, i2cRegex))\n> -- \n> 2.52.0\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 C5ECDC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Dec 2025 16:09:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7557F61EDB;\n\tThu, 18 Dec 2025 17:09:34 +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 A56D261A61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Dec 2025 17:09:33 +0100 (CET)","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 86BE21189;\n\tThu, 18 Dec 2025 17:09:26 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"vRjTeibv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1766074166;\n\tbh=mj9i8JyhSchajpmvHiVj8MWTwj2lYnin/mp3MZCQP3k=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=vRjTeibvkw4KFowLrd4VlT3OgnLOa4q6DSNKyVDMvPZB0Q0QJlu+FfsFGibuZ3xYh\n\t3cuAwIlItGlBmpNE+nKWzsxpcNhrHt8jK5r2b1V6GtB2FdMX3FP4JMFKyTnFNkYm7C\n\tkueoqt7xlxbufINT7pNC1QQgO7SyN6Z0WdYnnFQs=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251218140701.83069-2-barnabas.pocze@ideasonboard.com>","References":"<20251218140701.83069-1-barnabas.pocze@ideasonboard.com>\n\t<20251218140701.83069-2-barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v1 2/3] libcamera: v4l2_subdevice: Avoid reconstructing\n\tthe `std::regex` object","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 18 Dec 2025 16:09:30 +0000","Message-ID":"<176607417097.1127434.9785860061139751178@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":37435,"web_url":"https://patchwork.libcamera.org/comment/37435/","msgid":"<5fdb27ca-8e40-4f82-9edd-79fc28c75fb3@ideasonboard.com>","date":"2025-12-18T16:15:04","subject":"Re: [PATCH v1 3/3] libcamera: v4l2_subdevice: Avoid unnecessary copy","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 12. 18. 17:08 keltezéssel, Kieran Bingham írta:\n> Quoting Barnabás Pőcze (2025-12-18 14:07:01)\n>> There is no reason make a copy of the name, so don't do it,\n>> and instead use a reference.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   src/libcamera/v4l2_subdevice.cpp | 2 +-\n>>   1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n>> index 5e337a8cc..a69de154e 100644\n>> --- a/src/libcamera/v4l2_subdevice.cpp\n>> +++ b/src/libcamera/v4l2_subdevice.cpp\n>> @@ -1724,7 +1724,7 @@ const std::string &V4L2Subdevice::model()\n>>           * part of the entity name before the first space if the name contains\n>>           * an I2C address, and use the full entity name otherwise.\n>>           */\n>> -       std::string entityName = entity_->name();\n>> +       const std::string &entityName = entity_->name();\n> \n> Not a string view? I thought this would be the use case for a read only\n> view? Or would that prevent the copy/assignment below?\n\n`std::regex_search()` does not support `std::string_view` natively,\nso as far as I'm aware one would have to write:\n\n   std::regex_search(entityName.begin(), entityName.end(), ...)\n\nand `entity_->name()` already returns `const std::string&`, so\nthere is no copying there. So it would work, but this was less changes.\n\n\n> \n> But this sounds fine to me.\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n>>          static const std::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n>>          std::smatch match;\n>>   \n>> -- \n>> 2.52.0\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 7F8EEBD7D8\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Dec 2025 16:15:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 968F061EBE;\n\tThu, 18 Dec 2025 17:15:11 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4084261A61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Dec 2025 17:15:10 +0100 (CET)","from [192.168.33.31] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0EF8019A2;\n\tThu, 18 Dec 2025 17:15:01 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"urQpsefo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1766074502;\n\tbh=kOggIJRmTDKLcimexCPTcJEgvMQ+N8cLsFLcRJ1LkO4=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=urQpsefo0HvgCOKvG448Oim7UJx7utaIhRKu7pk/YMplaPSaxgSRzXcbHfabTxACD\n\tphOdTFmFztWYJYkXIegjrGqF9Ye9/2rvB0rYNckwgf+zb0poSA6wtLcNpDJ8SpEBsI\n\tfnt/TBkMhisDchv+Z+6S/katioQz8FIFNfRJ7VEI=","Message-ID":"<5fdb27ca-8e40-4f82-9edd-79fc28c75fb3@ideasonboard.com>","Date":"Thu, 18 Dec 2025 17:15:04 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1 3/3] libcamera: v4l2_subdevice: Avoid unnecessary copy","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20251218140701.83069-1-barnabas.pocze@ideasonboard.com>\n\t<20251218140701.83069-3-barnabas.pocze@ideasonboard.com>\n\t<176607413143.1127434.10214794944602021042@ping.linuxembedded.co.uk>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<176607413143.1127434.10214794944602021042@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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":37483,"web_url":"https://patchwork.libcamera.org/comment/37483/","msgid":"<176762642454.50667.822403440479416836@isaac-ThinkPad-T16-Gen-2>","date":"2026-01-05T15:20:24","subject":"Re: [PATCH v1 2/3] libcamera: v4l2_subdevice: Avoid reconstructing\n\tthe `std::regex` object","submitter":{"id":215,"url":"https://patchwork.libcamera.org/api/people/215/","name":"Isaac Scott","email":"isaac.scott@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2025-12-18 14:07:00)\n> Make the `std::regex` object have static lifetime to avoid\n> reconstructing it on every call.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/libcamera/v4l2_subdevice.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 00205bc72..5e337a8cc 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -1725,7 +1725,7 @@ const std::string &V4L2Subdevice::model()\n>          * an I2C address, and use the full entity name otherwise.\n>          */\n>         std::string entityName = entity_->name();\n> -       std::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n> +       static const std::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n>         std::smatch match;\n\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n>  \n>         if (std::regex_search(entityName, match, i2cRegex))\n> -- \n> 2.52.0\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 F1BFBBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jan 2026 15:20:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 08C0A61F9F;\n\tMon,  5 Jan 2026 16:20:30 +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 4654961F35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jan 2026 16:20:28 +0100 (CET)","from thinkpad.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 DA85A18D7;\n\tMon,  5 Jan 2026 16:20:07 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jcuJ/33l\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767626408;\n\tbh=0wajZhb0doczi/SmGw0ZsQr2Thc8ktJ4toHDGVYpyr4=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=jcuJ/33lmFclsVWbKABF67WMgJNm7/5AGO5WjrFNs51Va/YTvbcN3HgyVGjUIwSQU\n\tO685F8amHbU0EurgQgHu9by17fkhtXmZsD46vXFBnvNqGfVfRa8r9idAH/4OguhQgj\n\t2vRvr9cHLvs2Yuc196A/E7ec50wjLw4GX1TIj0Fg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251218140701.83069-2-barnabas.pocze@ideasonboard.com>","References":"<20251218140701.83069-1-barnabas.pocze@ideasonboard.com>\n\t<20251218140701.83069-2-barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v1 2/3] libcamera: v4l2_subdevice: Avoid reconstructing\n\tthe `std::regex` object","From":"Isaac Scott <isaac.scott@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 05 Jan 2026 15:20:24 +0000","Message-ID":"<176762642454.50667.822403440479416836@isaac-ThinkPad-T16-Gen-2>","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":37484,"web_url":"https://patchwork.libcamera.org/comment/37484/","msgid":"<176762646296.50667.5234538836283919946@isaac-ThinkPad-T16-Gen-2>","date":"2026-01-05T15:21:02","subject":"Re: [PATCH v1 3/3] libcamera: v4l2_subdevice: Avoid unnecessary copy","submitter":{"id":215,"url":"https://patchwork.libcamera.org/api/people/215/","name":"Isaac Scott","email":"isaac.scott@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2025-12-18 14:07:01)\n> There is no reason make a copy of the name, so don't do it,\n> and instead use a reference.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/libcamera/v4l2_subdevice.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 5e337a8cc..a69de154e 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -1724,7 +1724,7 @@ const std::string &V4L2Subdevice::model()\n>          * part of the entity name before the first space if the name contains\n>          * an I2C address, and use the full entity name otherwise.\n>          */\n> -       std::string entityName = entity_->name();\n> +       const std::string &entityName = entity_->name();\n\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n>         static const std::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n>         std::smatch match;\n>  \n> -- \n> 2.52.0\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 18B89BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jan 2026 15:21:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C3D6561FBF;\n\tMon,  5 Jan 2026 16:21:06 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 63F9C61F35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jan 2026 16:21:05 +0100 (CET)","from thinkpad.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 2775518D7;\n\tMon,  5 Jan 2026 16:20:45 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DHr2xUt+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767626445;\n\tbh=bt0eLjLHSMqJ7StIxGY+GHxLp131TCHuDW7RVjJxZpY=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=DHr2xUt+jQuLS5IGm4V/+bfkt7EMbvGnKJHEf7G63nX7w1BS4wS+aMM0u2Aw7DrVm\n\to/Tqfeuzpz7LKSTbwLf6fulEyswMQrwxBmIaBn6c+pJ+WJnk7NTIgjpSPT3KQk546m\n\tfPeZZjQQALUx0GPFrs7HZ0jYbBURTi6BK+NMOS7E=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251218140701.83069-3-barnabas.pocze@ideasonboard.com>","References":"<20251218140701.83069-1-barnabas.pocze@ideasonboard.com>\n\t<20251218140701.83069-3-barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v1 3/3] libcamera: v4l2_subdevice: Avoid unnecessary copy","From":"Isaac Scott <isaac.scott@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 05 Jan 2026 15:21:02 +0000","Message-ID":"<176762646296.50667.5234538836283919946@isaac-ThinkPad-T16-Gen-2>","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":37487,"web_url":"https://patchwork.libcamera.org/comment/37487/","msgid":"<20260106005509.GN10026@pendragon.ideasonboard.com>","date":"2026-01-06T00:55:09","subject":"Re: [PATCH v1 1/3] libcamera: v4l2_subdevice: Remove unnecessary\n\tvariable","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Dec 18, 2025 at 03:06:59PM +0100, Barnabás Pőcze wrote:\n> `model` is not used, so remove it.\n> \n> Fixes: 5d2aad02e86d45 (\"libcamera: add model() for retrieving model name in V4L2Subdevice\")\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nI wonder how no compiler has warned us about this for 4 years.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/v4l2_subdevice.cpp | 1 -\n>  1 file changed, 1 deletion(-)\n> \n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 199424600..00205bc72 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -1728,7 +1728,6 @@ const std::string &V4L2Subdevice::model()\n>  \tstd::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n>  \tstd::smatch match;\n>  \n> -\tstd::string model;\n>  \tif (std::regex_search(entityName, match, i2cRegex))\n>  \t\tmodel_ = entityName.substr(0, entityName.find(' '));\n>  \telse","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 F013EBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jan 2026 00:55:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E110D61FC0;\n\tTue,  6 Jan 2026 01:55:30 +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 ED4146142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jan 2026 01:55:28 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi\n\t[81.175.209.152])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id E08E66DF;\n\tTue,  6 Jan 2026 01:55:07 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lD+MlyGA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767660908;\n\tbh=ixoCARHOILmlwLh3WYKw3CMEFl0H2c4Bzf4KKVTDCSw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lD+MlyGA1ZBgKvk/Z/kl2dbZdg0aPVH81D9XytS7JVl1OndvfYFVoL9uSbnrROxVi\n\thTUOL9YoMv9984kHk9WxUnv3WR9QoU60HZx3PxQirTEAcfbM6uZrNDkxt0Z3dJLsks\n\toEeJ+G/vMPKyqbHAcQctUeJukualYSc2AlvIvNoI=","Date":"Tue, 6 Jan 2026 02:55:09 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1 1/3] libcamera: v4l2_subdevice: Remove unnecessary\n\tvariable","Message-ID":"<20260106005509.GN10026@pendragon.ideasonboard.com>","References":"<20251218140701.83069-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20251218140701.83069-1-barnabas.pocze@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":37971,"web_url":"https://patchwork.libcamera.org/comment/37971/","msgid":"<e6ac66b5-4ac2-47c7-aa3a-e1752e8d86d5@ideasonboard.com>","date":"2026-01-27T15:08:27","subject":"Re: [PATCH v1 1/3] libcamera: v4l2_subdevice: Remove unnecessary\n\tvariable","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 06. 1:55 keltezéssel, Laurent Pinchart írta:\n> On Thu, Dec 18, 2025 at 03:06:59PM +0100, Barnabás Pőcze wrote:\n>> `model` is not used, so remove it.\n>>\n>> Fixes: 5d2aad02e86d45 (\"libcamera: add model() for retrieving model name in V4L2Subdevice\")\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> I wonder how no compiler has warned us about this for 4 years.\n\nI think it is the same reason why no warnings about `std::lock_guard`, etc.\nare emitted. The side effects of the constructor/destructor might be important.\n\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>> ---\n>>   src/libcamera/v4l2_subdevice.cpp | 1 -\n>>   1 file changed, 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n>> index 199424600..00205bc72 100644\n>> --- a/src/libcamera/v4l2_subdevice.cpp\n>> +++ b/src/libcamera/v4l2_subdevice.cpp\n>> @@ -1728,7 +1728,6 @@ const std::string &V4L2Subdevice::model()\n>>   \tstd::regex i2cRegex{ \" [0-9]+-[0-9a-f]{4}\" };\n>>   \tstd::smatch match;\n>>   \n>> -\tstd::string model;\n>>   \tif (std::regex_search(entityName, match, i2cRegex))\n>>   \t\tmodel_ = entityName.substr(0, entityName.find(' '));\n>>   \telse\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 B1491C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Jan 2026 15:08:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C585F61FCE;\n\tTue, 27 Jan 2026 16:08:33 +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 5CBEC61FBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Jan 2026 16:08:32 +0100 (CET)","from [192.168.33.37] (185.221.142.123.nat.pool.zt.hu\n\t[185.221.142.123])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F0AAB78E;\n\tTue, 27 Jan 2026 16:07:55 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"k1t57njJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1769526476;\n\tbh=VdbgILaiNUKblsh15v3cDIWVTHx5cxFV+zDBI44lx9Q=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=k1t57njJm7Kw7DeUOw0SBrS1I0nWoI5s6TeLyOL9fokiH6qReCK4oOenAaOMkln8C\n\t+aaPbCgLrBAP03D9p+ihW89aiCYJvbFbL+sHTITjBCya3jnknwtRcM8Z4e1eZSX7AS\n\tW4C4Y0WngovgdsQaYhoqwH8u1wWUyUKoo+cnKSMs=","Message-ID":"<e6ac66b5-4ac2-47c7-aa3a-e1752e8d86d5@ideasonboard.com>","Date":"Tue, 27 Jan 2026 16:08:27 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v1 1/3] libcamera: v4l2_subdevice: Remove unnecessary\n\tvariable","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20251218140701.83069-1-barnabas.pocze@ideasonboard.com>\n\t<20260106005509.GN10026@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260106005509.GN10026@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>"}}]