Patch Detail
Show a patch.
GET /api/1.1/patches/3986/?format=api
{ "id": 3986, "url": "https://patchwork.libcamera.org/api/1.1/patches/3986/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3986/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200608132356.33328-1-email@uajain.com>", "date": "2020-06-08T13:24:02", "name": "[libcamera-devel] test: v4l2_subdevice: list_formats: Port to use utils::hex() output helper", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4d2d03ca13ff499ecdfcba4b428ad2c9c7d2d1a8", "submitter": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/people/1/?format=api", "name": "Umang Jain", "email": "email@uajain.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3986/mbox/", "series": [ { "id": 973, "url": "https://patchwork.libcamera.org/api/1.1/series/973/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=973", "date": "2020-06-08T13:24:02", "name": "[libcamera-devel] test: v4l2_subdevice: list_formats: Port to use utils::hex() output helper", "version": 1, "mbox": "https://patchwork.libcamera.org/series/973/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3986/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3986/checks/", "tags": {}, "headers": { "Return-Path": "<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>", "Received": [ "from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9718561027\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 8 Jun 2020 15:24:03 +0200 (CEST)", "by filterdrecv-p3mdw1-6f5df8956d-n66lk with SMTP id\n\tfilterdrecv-p3mdw1-6f5df8956d-n66lk-17-5EDE3BF2-E\n\t2020-06-08 13:24:02.289788716 +0000 UTC m=+407407.655616022", "from mail.uajain.com (unknown)\n\tby ismtpd0003p1maa1.sendgrid.net (SG) with ESMTP id\n\tkMPHC9JaSuS_0VXAGU7PHQ for <libcamera-devel@lists.libcamera.org>;\n\tMon, 08 Jun 2020 13:24:01.646 +0000 (UTC)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"bn0mlFJ3\"; \n\tdkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=from:subject:mime-version:to:cc:content-transfer-encoding:\n\tcontent-type;\n\ts=s1; bh=UNBiLZAaaRgnb/+gkXesISEjpGhYdbe3uUVm6erhUU8=;\n\tb=bn0mlFJ3wMWK+X915tUIWucDFy1xO3zVwO3YoFtUpU3siieTcZCOtvhzJ6VgzbP1rra/\n\t8fDkAnN20Oi0gV6D7bePdQwCI8USnjITkFTgtRnzXsuDXSm3IZV9DI9ww9bHPfYv9SJt3S\n\t4J+1p8uxA5uheyFKtjLLDpk6ttAap5hv4=", "From": "Umang Jain <email@uajain.com>", "Date": "Mon, 08 Jun 2020 13:24:02 +0000 (UTC)", "Message-Id": "<20200608132356.33328-1-email@uajain.com>", "Mime-Version": "1.0", "X-SG-EID": "1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcp6CL6ozs3IeZvk96OtB41JBdNkBEV+sF3FeC3+sz9lPa/qnGitvKxJFBfaHZWyNY5XjJVJ5ZF/3Rgb+ZhiFkAnPSzB7ieen5dAZboT6+H4YsblOTm/n+cF2Dh4vf4TB4Sbh/ZTfpbfgn2TBMEWNNKJT/eQi88mHQ6tOcbSuzNV10qkla8IktgcVFdo82q09QL59hobR+CWxsAo/PWDAAYQ==", "To": "libcamera-devel@lists.libcamera.org", "Content-Transfer-Encoding": "7bit", "Content-Type": "text/plain; charset=us-ascii", "Subject": "[libcamera-devel] [PATCH] test: v4l2_subdevice: list_formats: Port\n\tto use utils::hex() output helper", "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": "Mon, 08 Jun 2020 13:24:06 -0000" }, "content": "The hex stream output helper was introduced in f391048a.\nIt simplifies writing hexadecimal values to an ostream which can be used\nhere in this test too. As the helper doesn't modify the stream configuration\n(refer to utils::hex() documentation), this eliminates the need of restoring\nthe stream's format state as pointed out by the coverity scan.\n\nReported-by: Coverity CID=279058\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n test/v4l2_subdevice/list_formats.cpp | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)", "diff": "diff --git a/test/v4l2_subdevice/list_formats.cpp b/test/v4l2_subdevice/list_formats.cpp\nindex 25503c3..a55af11 100644\n--- a/test/v4l2_subdevice/list_formats.cpp\n+++ b/test/v4l2_subdevice/list_formats.cpp\n@@ -5,12 +5,12 @@\n * libcamera V4L2 Subdevice format handling test\n */\n \n-#include <iomanip>\n #include <iostream>\n #include <vector>\n \n #include <libcamera/geometry.h>\n \n+#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_subdevice.h\"\n \n #include \"v4l2_subdevice_test.h\"\n@@ -36,8 +36,7 @@ void ListFormatsTest::printFormats(unsigned int pad,\n {\n \tcout << \"Enumerate formats on pad \" << pad << endl;\n \tfor (const SizeRange &size : sizes) {\n-\t\tcout << \"\tmbus code: 0x\" << setfill('0') << setw(4)\n-\t\t << hex << code << endl;\n+\t\tcout << \"\tmbus code: \" << utils::hex(code, 4) << endl;\n \t\tcout << \"\tmin width: \" << dec << size.min.width << endl;\n \t\tcout << \"\tmin height: \" << dec << size.min.height << endl;\n \t\tcout << \"\tmax width: \" << dec << size.max.width << endl;\n", "prefixes": [ "libcamera-devel" ] }