mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: "André Almeida" <andrealmeid@igalia.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-dev@igalia.com
Subject: Re: [PATCH] scripts/kernel-doc: Fix build time warnings
Date: Thu, 10 Oct 2024 20:13:59 -0700	[thread overview]
Message-ID: <0e8cb8e7-548f-4100-97a2-41576749fb63@infradead.org> (raw)
In-Reply-To: <20241010225933.166436-1-andrealmeid@igalia.com>



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

  reply	other threads:[~2024-10-11  3:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10 22:59 André Almeida
2024-10-11  3:13 ` Randy Dunlap [this message]
2024-10-14 16:00 ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e8cb8e7-548f-4100-97a2-41576749fb63@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=andrealmeid@igalia.com \
    --cc=corbet@lwn.net \
    --cc=kernel-dev@igalia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®