Patch Detail
Show a patch.
GET /api/patches/23371/?format=api
{ "id": 23371, "url": "https://patchwork.libcamera.org/api/patches/23371/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23371/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20250515120012.3127231-7-barnabas.pocze@ideasonboard.com>", "date": "2025-05-15T12:00:10", "name": "[RFC,v1,6/8] libcamera: ipa_data_serializer: Remove some vector `reserve()` calls", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d578f2258d3a9634eb04488287fc828f635e28b6", "submitter": { "id": 216, "url": "https://patchwork.libcamera.org/api/people/216/?format=api", "name": "Barnabás Pőcze", "email": "barnabas.pocze@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23371/mbox/", "series": [ { "id": 5173, "url": "https://patchwork.libcamera.org/api/series/5173/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5173", "date": "2025-05-15T12:00:04", "name": "utils: codegen: ipc: Simplify deserialization", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5173/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23371/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23371/checks/", "tags": {}, "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 208F6C331E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 May 2025 12:00:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BF9BA68D73;\n\tThu, 15 May 2025 14:00:27 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9090368C92\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 May 2025 14:00:18 +0200 (CEST)", "from pb-laptop.local (185.221.142.248.nat.pool.zt.hu\n\t[185.221.142.248])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F61C1121;\n\tThu, 15 May 2025 14:00: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=\"rIYl1I3E\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1747310401;\n\tbh=82tyq6j3KwSy/Q4N6O2oal8z5jmNHJqniAzCsWeApZk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rIYl1I3EHi8xyUTtmKxZQSJm5TFJRE5370fnF0UYizIt6LwnXETi9ZiQ2QA4QXTQY\n\tFL0c2kMfrEGh1m63U03cUtsNM5uK7z9HSUcQe8V0bvMeKwrKLwZiGnaQleoGcKqD9B\n\t60XvotfAFCuKG6SElTbyE2Ta1VARy7Q9v+5PHAN8=", "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Paul Elder <paul.elder@ideasonboard.com>", "Subject": "[RFC PATCH v1 6/8] libcamera: ipa_data_serializer: Remove some\n\tvector `reserve()` calls", "Date": "Thu, 15 May 2025 14:00:10 +0200", "Message-ID": "<20250515120012.3127231-7-barnabas.pocze@ideasonboard.com>", "X-Mailer": "git-send-email 2.49.0", "In-Reply-To": "<20250515120012.3127231-1-barnabas.pocze@ideasonboard.com>", "References": "<20250515120012.3127231-1-barnabas.pocze@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "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>" }, "content": "`appendPOD()` does a single insertion, so if only a single `appendPOD()`\nwill be called on a vector before returning, then calling `reserve()`\nis not that useful, so remove it.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/internal/ipa_data_serializer.h | 1 -\n src/libcamera/ipa_data_serializer.cpp | 1 -\n 2 files changed, 2 deletions(-)", "diff": "diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h\nindex b4614f21d..b1fefba58 100644\n--- a/include/libcamera/internal/ipa_data_serializer.h\n+++ b/include/libcamera/internal/ipa_data_serializer.h\n@@ -309,7 +309,6 @@ public:\n \tserialize(const Flags<E> &data, [[maybe_unused]] ControlSerializer *cs = nullptr)\n \t{\n \t\tstd::vector<uint8_t> dataVec;\n-\t\tdataVec.reserve(sizeof(Flags<E>));\n \t\tappendPOD<uint32_t>(dataVec, static_cast<typename Flags<E>::Type>(data));\n \n \t\treturn { dataVec, {} };\ndiff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp\nindex 2189a2466..0537f785b 100644\n--- a/src/libcamera/ipa_data_serializer.cpp\n+++ b/src/libcamera/ipa_data_serializer.cpp\n@@ -196,7 +196,6 @@ IPADataSerializer<type>::serialize(const type &data,\t\t\t\\\n \t\t\t\t [[maybe_unused]] ControlSerializer *cs) \\\n {\t\t\t\t\t\t\t\t\t\\\n \tstd::vector<uint8_t> dataVec;\t\t\t\t\t\\\n-\tdataVec.reserve(sizeof(type));\t\t\t\t\t\\\n \tappendPOD<type>(dataVec, data);\t\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \treturn { dataVec, {} };\t\t\t\t\t\t\\\n", "prefixes": [ "RFC", "v1", "6/8" ] }