Skip to content

Commit 82f5ee3

Browse files
andrealmeidJonathan Corbet
authored andcommitted
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 <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f7e1d19 commit 82f5ee3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/kernel-doc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ my @export_file_list;
160160

161161
my @build_time;
162162
if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) &&
163-
(my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
163+
(my $seconds = `date -d "${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
164164
@build_time = gmtime($seconds);
165165
} else {
166166
@build_time = localtime;

0 commit comments

Comments
 (0)