public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Will Deacon <will@kernel.org>
Cc: catalin.marinas@arm.com, linuxarm@huawei.com,
	Tian Tao <tiantao6@hisilicon.com>,
	tglx@linutronix.de, vincenzo.frascino@arm.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: vdso: Add extern declarations for vDSO time-related functions
Date: Fri, 18 Sep 2020 16:41:28 +0200	[thread overview]
Message-ID: <20200918144128.GA630656@myrica> (raw)
In-Reply-To: <20200915114801.GA26191@willie-the-truck>

On Tue, Sep 15, 2020 at 12:48:02PM +0100, Will Deacon wrote:
> On Tue, Sep 15, 2020 at 07:24:30PM +0800, Tian Tao wrote:
> > Add extern declarations for vDSO time-related functions to notify the
> > compiler these functions will be used in somewhere to fix
> > "no previous prototype" compile warning.
> > 
> > arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: no previous
> > prototype for ‘__kernel_clock_gettime’ [-Wmissing-prototypes]
> > int __kernel_clock_gettime(clockid_t clock,
> >      ^
> > arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: no previous
> > prototype for ‘__kernel_gettimeofday’ [-Wmissing-prototypes]
> > int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
> >      ^
> > arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: no previous
> > prototype for ‘__kernel_clock_getres’ [-Wmissing-prototypes]
> > int __kernel_clock_getres(clockid_t clock_id,
> 
> I think this warning is silly and we should ignore it. The function is
> only called from userspace, so why should we add a declaration in the
> kernel?

I was about to send the same patch - the warning is pretty distracting
since the VDSO is rebuilt frequently, and it's thrown both by GCC with W=1
and by sparse with C=1.

Thanks,
Jean

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2020-09-18 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 11:24 [PATCH] arm64: vdso: Add extern declarations for vDSO time-related functions Tian Tao
2020-09-15 11:48 ` Will Deacon
2020-09-15 12:06   ` tiantao (H)
2020-09-18 14:41   ` Jean-Philippe Brucker [this message]

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=20200918144128.GA630656@myrica \
    --to=jean-philippe@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=tiantao6@hisilicon.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@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