From patchwork Fri Dec 1 17:13:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deborah Brouwer X-Patchwork-Id: 749678 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="E/ip3Yyh" Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8836CC1 for ; Fri, 1 Dec 2023 09:13:58 -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 8FC79660739A; Fri, 1 Dec 2023 17:13:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701450837; bh=h0L/2NqgPJXZ3xbM9wW5LpycyHfj3lM2vysHgZ0kprI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/ip3YyhBCc6V10Wi3cmqj7LNp6fmt4hGNxJbNLv2hd/wMgRlh/CAgP00kZURquIw lQFZhUNUQdsxDfzoSI1vgsQVp1QeAoaHz2ObOlgsGTyGqWURGJDiDqA/xbyQwv9Fbh 0GYAgRBMARWKwIPM+CqwSJ40o3ldmbxpk5AISNNnJcIw+p6v5Wl4M8kDiO/8wi9WVd MrfNzc8KuCEnvyHu7dYAoat4HFdqAP8p3BV9bnvNBFyTHo8WyZYWrsEkqyvnK0f2Ox KilQIM/qKnxHjeTWYg5NYM9ZodSwhgiOgqjmZl0rzaobnEJrqe9GkLtJIwELdS1GTL p/ygXRGZVqCHQ== From: Deborah Brouwer To: linux-media@vger.kernel.org Cc: hverkuil-cisco@xs4all.nl, Deborah Brouwer Subject: [PATCH v3 1/4] v4l2-tracer: autogenerate files that can be added to git Date: Fri, 1 Dec 2023 09:13:30 -0800 Message-ID: <864bad34a41467f9d669ff3d422842ab47f52ed1.1701450544.git.deborah.brouwer@collabora.com> 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";