powerpc/time: Fix sparse warnings
authorHe Ying <heying24@huawei.com>
Wed, 24 Mar 2021 09:09:39 +0000 (05:09 -0400)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 May 2022 09:37:42 +0000 (19:37 +1000)
commitce0091a0e06045e70c526c8735f8b866a85e0a45
treecdce4152f8e366565a0bdfeed890bf55562282fd
parent9923a6dace1682518efe4aa872cc317fa43c2a55
powerpc/time: Fix sparse warnings

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 after "include <asm/dtl.h>" because it is
declared there.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: He Ying <heying24@huawei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210324090939.143477-1-heying24@huawei.com
arch/powerpc/include/asm/time.h
arch/powerpc/kernel/time.c
arch/powerpc/platforms/chrp/time.c