From: "heying (H)" <heying24@huawei.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: <mpe@ellerman.id.au>, <benh@kernel.crashing.org>,
<paulus@samba.org>, <a.zummo@towertech.it>,
<christophe.leroy@csgroup.eu>, <npiggin@gmail.com>,
<msuchanek@suse.de>, <tglx@linutronix.de>, <peterz@infradead.org>,
<geert@linux-m68k.org>, <geert+renesas@glider.be>,
<kernelfans@gmail.com>, <frederic@kernel.org>,
<linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
<linux-rtc@vger.kernel.org>
Subject: Re: [PATCH V3 -next] powerpc: kernel/time.c - cleanup warnings
Date: Wed, 24 Mar 2021 17:46:19 +0800 [thread overview]
Message-ID: <18a8d444-f1a5-61e0-b9f2-f85c03d71686@huawei.com> (raw)
In-Reply-To: <YFsGYgdNH5HrlqDJ@piout.net>
Dear Alexandre,
在 2021/3/24 17:29, Alexandre Belloni 写道:
> On 24/03/2021 05:09:39-0400, He Ying wrote:
>> We found these warnings in arch/powerpc/kernel/time.c as follows:
>> warning: symbol 'decrementer_max' was not declared. Should it be static?
>> warning: symbol 'rtc_lock' was not declared. Should it be static?
>> warning: symbol 'dtl_consumer' was not declared. Should it be static?
>>
>> Declare 'decrementer_max' in powerpc asm/time.h.
>> Include linux/mc146818rtc.h in powerpc kernel/time.c where 'rtc_lock'
>> is declared. And remove duplicated declaration of 'rtc_lock' in powerpc
>> platforms/chrp/time.c because it has included linux/mc146818rtc.h.
>> Move 'dtl_consumer' definition behind "include <asm/dtl.h>" because it
>> is declared there.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: He Ying <heying24@huawei.com>
>> ---
>> V2:
>> - Instead of including linux/mc146818rtc.h in powerpc kernel/time.c, declare
>> rtc_lock in powerpc asm/time.h.
>> V3:
>> - Recover to V1, that is including linux/mc146818rtc.h in powerpc
>> kernel/time.c. And remove duplicated declaration of 'rtc_lock' in powerpc
>> platforms/chrp/time.c because it has included linux/mc146818rtc.h.
>>
>> arch/powerpc/include/asm/time.h | 1 +
>> arch/powerpc/kernel/time.c | 9 ++++-----
>> arch/powerpc/platforms/chrp/time.c | 2 --
>> 3 files changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
>> index 8dd3cdb25338..2cd2b50bedda 100644
>> --- a/arch/powerpc/include/asm/time.h
>> +++ b/arch/powerpc/include/asm/time.h
>> @@ -22,6 +22,7 @@ extern unsigned long tb_ticks_per_jiffy;
>> extern unsigned long tb_ticks_per_usec;
>> extern unsigned long tb_ticks_per_sec;
>> extern struct clock_event_device decrementer_clockevent;
>> +extern u64 decrementer_max;
>>
>>
>> extern void generic_calibrate_decr(void);
>> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
>> index b67d93a609a2..ac81f043bf49 100644
>> --- a/arch/powerpc/kernel/time.c
>> +++ b/arch/powerpc/kernel/time.c
>> @@ -55,8 +55,9 @@
>> #include <linux/sched/cputime.h>
>> #include <linux/sched/clock.h>
>> #include <linux/processor.h>
>> -#include <asm/trace.h>
>> +#include <linux/mc146818rtc.h>
> I'm fine with that but I really think my suggestion to make the rtc_lock
> local to the platforms was better because it is only used to synchronize
> between concurrent invocations of chrp_set_rtc_time or
> maple_set_rtc_time. The rtc core will never do that and the only case
> would be concurrent calls to rtc_ops.set_time and
> update_persistent_clock64 (which should also be removed at some point).
Many thanks for your suggestion. As you suggest, rtc_lock should be
local to platforms.
Does it mean not only powerpc but also all other platforms should adapt
this change?
It might be a big change. I have no idea if that's OK. What are other
maintainers' opinions?
Thanks.
next prev parent reply other threads:[~2021-03-24 9:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 9:09 [PATCH V3 -next] powerpc: kernel/time.c - cleanup warnings He Ying
2021-03-24 9:29 ` Alexandre Belloni
2021-03-24 9:43 ` Christophe Leroy
2021-03-24 9:46 ` heying (H) [this message]
2021-03-25 8:45 ` Alexandre Belloni
2021-03-24 9:29 ` Christophe Leroy
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=18a8d444-f1a5-61e0-b9f2-f85c03d71686@huawei.com \
--to=heying24@huawei.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@csgroup.eu \
--cc=frederic@kernel.org \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).