From patchwork Mon Nov 27 20:09:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deborah Brouwer X-Patchwork-Id: 747950 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="nr7uBuwG" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6588C1B6 for ; Mon, 27 Nov 2023 12:09:49 -0800 (PST) Received: from mz550.lan (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dbrouwer) by madras.collabora.co.uk (Postfix) with ESMTPSA id 6E6386606F5E; Mon, 27 Nov 2023 20:09:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701115788; bh=h0L/2NqgPJXZ3xbM9wW5LpycyHfj3lM2vysHgZ0kprI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nr7uBuwGyYI8Enf0cZrRhLU8JjxHepYTS+HtWv2BTkhbm4gMHdTiVlQKPYLb57RrW fq1N/ztZWzuP+O1XYkJALK/C+QSWR3qC6s26GqThfM56EoqmeTeIWZOx4eJaEgNdkK hHQEt5USZVgnun+Bti2bsJiACguqjkemxU+jb7k+1qCArtZKzQMvbJ5c/Je9wF0a7x qy0qZrLHXZ9wwEgy6grbkNFuv4L8W5RN6gpAE5Qeb4DjqJABxmjj9M1LtP0J/80xYO lEBZBZSksmHhYBmTTTF7AFlKXXxlxok9ON1Te/y7bSzkELJP/6vU7L02Hu5UnUmrB0 4s1J5B8cBIq6Q== From: Deborah Brouwer To: linux-media@vger.kernel.org Cc: hverkuil-cisco@xs4all.nl, Deborah Brouwer Subject: [PATCH 1/4] v4l2-tracer: autogenerate files that can be added to git Date: Mon, 27 Nov 2023 12:09:11 -0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 A comment at the beginning of the autogenerated files provides an absolute path to the location of the autogeneration script. In preparation for adding these files to the git repository, remove this absolute path. Also, the autogeneration script was adding an extra newline to trace-gen.cpp which was causing a whitespace warning, so remove that too. Signed-off-by: Deborah Brouwer --- utils/v4l2-tracer/v4l2-tracer-gen.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/utils/v4l2-tracer/v4l2-tracer-gen.pl b/utils/v4l2-tracer/v4l2-tracer-gen.pl index cb9c3ab5..1e4cadda 100755 --- a/utils/v4l2-tracer/v4l2-tracer-gen.pl +++ b/utils/v4l2-tracer/v4l2-tracer-gen.pl @@ -865,29 +865,29 @@ sub do_open($$) { $fh_trace_cpp = do_open("trace", "trace-gen.cpp"); printf $fh_trace_cpp "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n"; -printf $fh_trace_cpp " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__; +printf $fh_trace_cpp " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n"; printf $fh_trace_cpp "#include \"v4l2-tracer-common.h\"\n\n"; $fh_trace_h = do_open("trace", "trace-gen.h"); printf $fh_trace_h "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n"; -printf $fh_trace_h " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__; +printf $fh_trace_h " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n"; printf $fh_trace_h "\#ifndef TRACE_GEN_H\n"; printf $fh_trace_h "\#define TRACE_GEN_H\n\n"; $fh_retrace_cpp = do_open("retrace", "retrace-gen.cpp"); printf $fh_retrace_cpp "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n"; -printf $fh_retrace_cpp " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__; +printf $fh_retrace_cpp " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n"; printf $fh_retrace_cpp "#include \"v4l2-tracer-common.h\"\n\n"; $fh_retrace_h = do_open("retrace", "retrace-gen.h"); printf $fh_retrace_h "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n"; -printf $fh_retrace_h " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__; +printf $fh_retrace_h " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n"; printf $fh_retrace_h "\#ifndef RETRACE_GEN_H\n"; printf $fh_retrace_h "\#define RETRACE_GEN_H\n\n"; $fh_common_info_h = do_open("common", "v4l2-tracer-info-gen.h"); printf $fh_common_info_h "/* SPDX-License-Identifier: GPL-2.0-only */\n/*\n * Copyright 2022 Collabora Ltd.\n"; -printf $fh_common_info_h " *\n * AUTOMATICALLY GENERATED BY \'%s\' DO NOT EDIT\n */\n\n", __FILE__; +printf $fh_common_info_h " *\n * AUTOMATICALLY GENERATED BY v4l2-tracer-gen.pl DO NOT EDIT\n */\n\n"; printf $fh_common_info_h "\#ifndef V4L2_TRACER_INFO_GEN_H\n"; printf $fh_common_info_h "\#define V4L2_TRACER_INFO_GEN_H\n\n"; printf $fh_common_info_h "#include \"v4l2-tracer-common.h\"\n\n"; @@ -1067,6 +1067,8 @@ printf $fh_common_info_h "\t{ -1, \"\" }\n};\n"; printf $fh_trace_h "\n#endif\n"; close $fh_trace_h; +# Delete the last of two new lines to avoid a whitespace error +truncate($fh_trace_cpp, tell($fh_trace_cpp) - 1); close $fh_trace_cpp; printf $fh_retrace_h "\n#endif\n";