Cover Letter Detail
Show a cover letter.
GET /api/covers/21130/?format=api
{ "id": 21130, "url": "https://patchwork.libcamera.org/api/covers/21130/?format=api", "web_url": "https://patchwork.libcamera.org/cover/21130/", "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": "<20240902154212.1281257-1-mzamazal@redhat.com>", "date": "2024-09-02T15:41:53", "name": "[v3,00/18] Remove unused includes", "submitter": { "id": 177, "url": "https://patchwork.libcamera.org/api/people/177/?format=api", "name": "Milan Zamazal", "email": "mzamazal@redhat.com" }, "mbox": "https://patchwork.libcamera.org/cover/21130/mbox/", "series": [ { "id": 4556, "url": "https://patchwork.libcamera.org/api/series/4556/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4556", "date": "2024-09-02T15:41:53", "name": "Remove unused includes", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4556/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/21130/comments/", "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 ACF6FBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 2 Sep 2024 15:42:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C5007618FF;\n\tMon, 2 Sep 2024 17:42:31 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89E3B618FD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 2 Sep 2024 17:42:29 +0200 (CEST)", "from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-292-NpoYo1m_NrW882zjzuIHlA-1;\n\tMon, 02 Sep 2024 11:42:27 -0400", "from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.15])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 13B8B1955D4C; Mon, 2 Sep 2024 15:42:26 +0000 (UTC)", "from nuthatch.redhat.com (unknown [10.45.224.69])\n\tby mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 665A21955F1B; Mon, 2 Sep 2024 15:42:24 +0000 (UTC)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"HEXp1ops\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1725291748;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding;\n\tbh=yFCAKel0mGIlYEvOZp53tZ3FhoC00hKLiB27WauHo5w=;\n\tb=HEXp1opsTS7LKixW51zjSkko5p6XEJX+b5MhInojLnny/ddRbPASUWJxke0caDpcYpuRhg\n\tRU7fAGzXqxDZ/XuwqP4ilijTQyERidWcaIZdqUUS/EXA3fnHLQnNDJtOzoZ+8lp+yTHA/N\n\tE46QBC5DY31GYmKFUpPgkbgWioLh+kc=", "X-MC-Unique": "NpoYo1m_NrW882zjzuIHlA-1", "From": "Milan Zamazal <mzamazal@redhat.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v3 00/18] Remove unused includes", "Date": "Mon, 2 Sep 2024 17:41:53 +0200", "Message-ID": "<20240902154212.1281257-1-mzamazal@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.15", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "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": "There is quite a lot of include’s that are actually unused. They don’t\ncause much trouble but they should still be removed in order to:\n\n- keep order,\n- avoid LSP warnings when working with the code,\n- to remove unneeded extra lines.\n\nI have identified the unused includes by inspecting warnings issued by\nLSP. LSP understands the difference between direct and indirect\nimports. I have inspected its reports in some cases and it seems to be\ncorrect most of the time so I trust it and haven’t inspected everything,\nwhich would be waste of resources. I have noticed only two problems:\n\n- LSP reports in my environment unused <chrono> includes despite of\n presence of\n\n using std::literals::chrono_literals;\n\n or\n\n using std::chrono_literals;\n\n (these two should be probably unified but this is out of scope of this\n series). This happens also in a trivial code and is most likely a\n bug.\n\n- LSP may report unnecessary inclusion of\n \"libcamera/internal/framebuffer.h\" although it is actually needed to\n be able to access something from FrameBuffer::Private.\n\nIt’s interesting that in both the cases LSP reports the corresponding\nproblems when the supposedly unused include is removed.\n\nI’m also not sure whether header include removal can affect Doxygen\noutput in some way. I supposed it doesn’t but if it does then the\npatches must be inspected for such cases.\n\nI haven’t removed includes of \"FOO.h\" in FOO.cpp files even if the\ninclude is unused (which happens when FOO.cpp contains only\ndocumentation).\n\nMy LSP based autoformatter reformatted some of the modified files. Many\nof the suggested changes look right so I kept most of them (and helped\nthe autoformatter to do a better thing in some cases), in separate\ncommits, rather than discarding them. It’s annoying when editing a\nsource file and the autoformatter changes the code elsewhere; if the\nautoformatter is wrong anywhere then the autoformatting rules should be\nfixed if possible.\n\nI have inspected many source files but not all of them. Although the\ncleanup is most likely a bit incomplete, it should still make things\nsignificantly better.\n\nI’m sorry for another long patch series but I tried to split the patches\nin order to make them reasonably sized (and easy to review!) and by\npossible areas of responsibility.\n\nChanges in v3:\n- Comments from Laurent’s review addressed: More include’s removed, more\n added and many formatting changes reverted.\n- Some more missing include’s added.\n\nChanges in v2:\n- Add a missing include in tests.\n\nMilan Zamazal (18):\n tests: Add a missing iostream include\n libcamera: ipu3: Remove unused includes\n libcamera: ipu3: Replace wrong include\n libcamera: ipu3: Formatting improvements\n libcamera: rkisp1: Remove unused includes\n libcamera: rkisp1: Formatting improvements\n libcamera: libipa: Remove unused includes\n libcamera: uvcvideo: Fix includes\n libcamera: v4l2: Remove unused includes\n libcamera: v4l2: Fix an include placement\n libcamera: v4l2: Fix indirect include\n libcamera: ipa: Remove unused includes\n libcamera: libcamera: Remove unused includes\n libcamera: libcamera: Add missing includes\n libcamera: libcamera: Formatting improvements\n libcamera: includes: Add missing includes\n libcamera: includes: Remove unused includes\n libcamera: includes: Formatting improvements\n\n include/libcamera/base/event_dispatcher.h | 2 --\n include/libcamera/base/log.h | 1 -\n include/libcamera/base/memfd.h | 2 --\n include/libcamera/base/signal.h | 1 -\n include/libcamera/base/span.h | 1 -\n include/libcamera/base/timer.h | 1 -\n include/libcamera/base/utils.h | 3 +--\n include/libcamera/framebuffer.h | 1 -\n include/libcamera/internal/camera_manager.h | 1 -\n include/libcamera/internal/camera_sensor.h | 1 -\n .../internal/device_enumerator_sysfs.h | 1 -\n include/libcamera/internal/dma_buf_allocator.h | 2 --\n include/libcamera/internal/formats.h | 1 -\n .../libcamera/internal/ipa_data_serializer.h | 11 ++++-------\n include/libcamera/internal/ipa_proxy.h | 2 --\n .../libcamera/internal/ipc_pipe_unixsocket.h | 1 -\n include/libcamera/internal/media_device.h | 1 -\n include/libcamera/internal/pipeline_handler.h | 3 ---\n include/libcamera/internal/request.h | 1 +\n include/libcamera/internal/shared_mem_object.h | 1 -\n include/libcamera/ipa/ipa_interface.h | 5 -----\n include/libcamera/logging.h | 2 ++\n include/libcamera/pixel_format.h | 1 -\n include/libcamera/request.h | 1 -\n include/libcamera/stream.h | 1 -\n include/libcamera/transform.h | 2 --\n src/ipa/ipu3/algorithms/af.cpp | 3 ---\n src/ipa/ipu3/algorithms/agc.cpp | 3 +--\n src/ipa/ipu3/algorithms/blc.cpp | 6 ++----\n src/ipa/ipu3/ipu3.cpp | 18 +++++++-----------\n src/ipa/libipa/histogram.h | 1 -\n src/ipa/libipa/matrix.h | 1 -\n src/ipa/libipa/matrix_interpolator.cpp | 7 -------\n src/ipa/libipa/matrix_interpolator.h | 2 --\n src/ipa/libipa/pwl.cpp | 2 --\n src/ipa/libipa/pwl.h | 3 ---\n src/ipa/libipa/vector.h | 4 ++--\n src/ipa/rkisp1/algorithms/agc.h | 1 -\n src/ipa/rkisp1/algorithms/awb.cpp | 7 ++++---\n src/ipa/rkisp1/algorithms/ccm.cpp | 6 +-----\n src/ipa/rkisp1/algorithms/dpf.cpp | 4 +++-\n src/ipa/rkisp1/rkisp1.cpp | 11 ++++++-----\n src/ipa/rkisp1/utils.h | 1 -\n src/libcamera/base/event_dispatcher_poll.cpp | 3 +--\n src/libcamera/camera.cpp | 7 +++++--\n src/libcamera/controls.cpp | 3 +--\n src/libcamera/converter/converter_v4l2_m2m.cpp | 1 -\n src/libcamera/formats.cpp | 3 +--\n src/libcamera/ipa_data_serializer.cpp | 5 +++--\n src/libcamera/ipa_module.cpp | 5 ++---\n src/libcamera/ipa_proxy.cpp | 1 -\n src/libcamera/orientation.cpp | 13 ++++++++-----\n src/libcamera/pipeline/ipu3/frames.cpp | 3 ++-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 18 +++++++++---------\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 3 +--\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 6 ++++--\n src/libcamera/pipeline_handler.cpp | 1 -\n src/libcamera/process.cpp | 6 ++----\n src/libcamera/sensor/camera_sensor.cpp | 8 +++-----\n src/libcamera/shared_mem_object.cpp | 5 ++---\n src/libcamera/stream.cpp | 6 ++++--\n src/libcamera/v4l2_device.cpp | 2 --\n src/libcamera/v4l2_subdevice.cpp | 5 ++---\n src/libcamera/v4l2_videodevice.cpp | 1 -\n src/v4l2/v4l2_camera.h | 3 ++-\n src/v4l2/v4l2_camera_proxy.cpp | 3 +--\n src/v4l2/v4l2_compat.cpp | 1 -\n src/v4l2/v4l2_compat_manager.cpp | 1 -\n .../generated_serializer_test.cpp | 1 +\n 69 files changed, 88 insertions(+), 156 deletions(-)" }