* [PATCH] scripts/kernel-doc: Fix build time warnings
@ 2024-10-10 22:59 André Almeida
2024-10-11 3:13 ` Randy Dunlap
2024-10-14 16:00 ` Jonathan Corbet
0 siblings, 2 replies; 3+ messages in thread
From: André Almeida @ 2024-10-10 22:59 UTC (permalink / raw)
To: Jonathan Corbet, Randy Dunlap, Mauro Carvalho Chehab
Cc: linux-doc, linux-kernel, kernel-dev, André Almeida
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 <andrealmeid@igalia.com>
---
scripts/kernel-doc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 2791f8195203..8728f9824c65 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;
--
2.47.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/kernel-doc: Fix build time warnings
2024-10-10 22:59 [PATCH] scripts/kernel-doc: Fix build time warnings André Almeida
@ 2024-10-11 3:13 ` Randy Dunlap
2024-10-14 16:00 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2024-10-11 3:13 UTC (permalink / raw)
To: André Almeida, Jonathan Corbet, Mauro Carvalho Chehab
Cc: linux-doc, linux-kernel, kernel-dev
On 10/10/24 3:59 PM, André Almeida wrote:
> 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 <andrealmeid@igalia.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> scripts/kernel-doc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 2791f8195203..8728f9824c65 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;
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/kernel-doc: Fix build time warnings
2024-10-10 22:59 [PATCH] scripts/kernel-doc: Fix build time warnings André Almeida
2024-10-11 3:13 ` Randy Dunlap
@ 2024-10-14 16:00 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2024-10-14 16:00 UTC (permalink / raw)
To: André Almeida, Randy Dunlap, Mauro Carvalho Chehab
Cc: linux-doc, linux-kernel, kernel-dev, André Almeida
André Almeida <andrealmeid@igalia.com> writes:
> 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 <andrealmeid@igalia.com>
> ---
> scripts/kernel-doc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-14 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-10 22:59 [PATCH] scripts/kernel-doc: Fix build time warnings André Almeida
2024-10-11 3:13 ` Randy Dunlap
2024-10-14 16:00 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®