[PATCH v1 2/2] libcamera: Drop remaining file name from header comment blocks
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed May 8 23:34:09 CEST 2024
Hi Dan,
On Wed, May 08, 2024 at 10:06:14PM +0100, Daniel Scally wrote:
> On 08/05/2024 21:59, Laurent Pinchart wrote:
> > Source files in libcamera start by a comment block header, which
> > includes the file name and a one-line description of the file contents.
> > While the latter is useful to get a quick overview of the file contents
> > at a glance, the former is mostly a source of inconvenience. The name in
> > the comments can easily get out of sync with the file name when files
> > are renamed, and copy & paste during development have often lead to
> > incorrect names being used to start with.
> >
> > Readers of the source code are expected to know which file they're
> > looking it. Drop the file name from the header comment blocks in all
> > remaining locations that were not caught by the automated script as they
> > are out of sync with the file name.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> Reviewed-by: Daniel Scally <dan.scally at ideasonboard.com>
>
> But one heads up below...
>
> > ---
> > include/libcamera/base/thread_annotations.h | 2 +-
> > include/libcamera/fence.h | 2 +-
> > src/android/camera_ops.cpp | 2 +-
> > src/android/mm/cros_frame_buffer_allocator.cpp | 3 +--
> > src/android/mm/generic_frame_buffer_allocator.cpp | 2 +-
> > src/apps/cam/sdl_sink.cpp | 2 +-
> > src/apps/ipa-verify/main.cpp | 2 +-
> > src/apps/lc-compliance/helpers/capture.cpp | 2 +-
> > src/apps/lc-compliance/helpers/capture.h | 2 +-
> > src/apps/qcam/format_converter.cpp | 2 +-
> > src/apps/qcam/format_converter.h | 2 +-
> > src/apps/qcam/message_handler.h | 2 +-
> > src/apps/qcam/viewfinder_gl.cpp | 2 +-
> > src/apps/qcam/viewfinder_gl.h | 3 +--
> > src/gstreamer/gstlibcamera-utils.cpp | 2 +-
> > src/gstreamer/gstlibcamera.cpp | 2 +-
> > src/gstreamer/gstlibcameraprovider.cpp | 2 +-
> > src/ipa/ipu3/algorithms/agc.cpp | 2 +-
> > src/ipa/ipu3/algorithms/blc.h | 2 +-
> > src/ipa/rpi/controller/denoise_algorithm.h | 2 +-
> > src/ipa/rpi/controller/rpi/denoise.cpp | 2 +-
> > src/ipa/rpi/controller/tonemap_status.h | 2 +-
> > src/ipa/rpi/vc4/vc4.cpp | 2 +-
> > src/libcamera/base/backtrace.cpp | 2 +-
> > src/libcamera/camera_manager.cpp | 2 +-
> > src/libcamera/delayed_controls.cpp | 2 +-
> > src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 2 +-
> > src/libcamera/pipeline/rkisp1/rkisp1_path.h | 2 +-
> > src/v4l2/v4l2_camera_file.cpp | 2 +-
> > test/bayer-format.cpp | 2 +-
> > test/byte-stream-buffer.cpp | 2 +-
> > test/controls/control_info_map.cpp | 2 +-
> > test/gstreamer/gstreamer_device_provider_test.cpp | 2 +-
> > test/gstreamer/gstreamer_test.h | 2 +-
> > test/log/log_api.cpp | 2 +-
> > test/object-delete.cpp | 2 +-
> > test/shared-fd.cpp | 2 +-
> > test/v4l2_videodevice/v4l2_videodevice_test.h | 2 +-
> > utils/gen-ipa-pub-key.py | 2 +-
> > utils/rkisp1/rkisp1-capture.sh | 3 +--
> > 40 files changed, 40 insertions(+), 43 deletions(-)
[snip]
> > diff --git a/src/apps/qcam/format_converter.cpp b/src/apps/qcam/format_converter.cpp
> > index de76b32c7ffd..32123493f905 100644
> > --- a/src/apps/qcam/format_converter.cpp
> > +++ b/src/apps/qcam/format_converter.cpp
> > @@ -2,7 +2,7 @@
> > /*
> > * Copyright (C) 2019, Google Inc.
> > *
> > - * format_convert.cpp - qcam - Convert buffer to RGB
> > + * Convert buffer to RGB
> > */
>
> This drops the "qcam -" as well as the "format_convert.cpp" - I think that's fine to do but I
> thought I'd mention it incase it was accidental
It was on purpose. The majority of files in qcam don't have that prefix,
so I went for consistency.
> > #include "format_converter.h"
[snip]
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list