From: André Almeida Date: Thu, 10 Oct 2024 22:59:33 +0000 (-0300) Subject: scripts/kernel-doc: Fix build time warnings X-Git-Tag: v6.13-rc1~170^2~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82f5ee35d0b960c54370a72418b9ec0dca382262;p=thirdparty%2Flinux.git scripts/kernel-doc: Fix build time warnings As stated at Documentation/kbuild/llvm.rst, to make usage of ccache one must set KBUILD_BUILD_TIMESTAMP=''. Setting this together with W=1 will trigger the following warning for every compiled file: date: invalid date ‘+%s’ This comes from kernel-doc script, that produces the following command when KBUILD_BUILD_TIMESTAMP is empty: date -d"" +%s That triggers the warning above. Add a space between the flag `-d` and the string argument to fix date command and remove the warning. Signed-off-by: André Almeida Acked-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20241010225933.166436-1-andrealmeid@igalia.com --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 2791f81952038..8728f9824c65a 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -160,7 +160,7 @@ my @export_file_list; my @build_time; if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) && - (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') { + (my $seconds = `date -d "${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') { @build_time = gmtime($seconds); } else { @build_time = localtime;