From: Marc Zyngier <maz@kernel.org>
To: Zou Wei <zou_wei@huawei.com>
Cc: <mark.rutland@arm.com>, <daniel.lezcano@linaro.org>,
<tglx@linutronix.de>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Subject: Re: [PATCH -next] clocksource/drivers/arm_arch_timer: Make symbol 'arch_timer_rate1' static
Date: Tue, 11 May 2021 08:14:42 +0100 [thread overview]
Message-ID: <87pmxxoi71.wl-maz@kernel.org> (raw)
In-Reply-To: <1620715583-107670-1-git-send-email-zou_wei@huawei.com>
[+ Jisheng Zhang]
On Tue, 11 May 2021 07:46:23 +0100,
Zou Wei <zou_wei@huawei.com> wrote:
>
> The sparse tool complains as follows:
>
> drivers/clocksource/arm_arch_timer.c:67:5: warning:
> symbol 'arch_timer_rate1' was not declared. Should it be static?
>
> This symbol is not used outside of arm_arch_timer.c, so marks it
> static.
It is worse than that. This variable is not used *at all*, and has
been added by e2bf384d4329 ("clocksource/drivers/arm_arch_timer: Add
__ro_after_init and __init"). Not sure how we missed that.
Please post a patch removing this variable altogether.
Thanks,
M.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---
> drivers/clocksource/arm_arch_timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index fe1a826..800aaa9 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -64,7 +64,7 @@ struct arch_timer {
> #define to_arch_timer(e) container_of(e, struct arch_timer, evt)
>
> static u32 arch_timer_rate __ro_after_init;
> -u32 arch_timer_rate1 __ro_after_init;
> +static u32 arch_timer_rate1 __ro_after_init;
> static int arch_timer_ppi[ARCH_TIMER_MAX_TIMER_PPI] __ro_after_init;
>
> static const char *arch_timer_ppi_names[ARCH_TIMER_MAX_TIMER_PPI] = {
> --
> 2.6.2
>
>
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Zou Wei <zou_wei@huawei.com>
Cc: <mark.rutland@arm.com>, <daniel.lezcano@linaro.org>,
<tglx@linutronix.de>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Subject: Re: [PATCH -next] clocksource/drivers/arm_arch_timer: Make symbol 'arch_timer_rate1' static
Date: Tue, 11 May 2021 08:14:42 +0100 [thread overview]
Message-ID: <87pmxxoi71.wl-maz@kernel.org> (raw)
In-Reply-To: <1620715583-107670-1-git-send-email-zou_wei@huawei.com>
[+ Jisheng Zhang]
On Tue, 11 May 2021 07:46:23 +0100,
Zou Wei <zou_wei@huawei.com> wrote:
>
> The sparse tool complains as follows:
>
> drivers/clocksource/arm_arch_timer.c:67:5: warning:
> symbol 'arch_timer_rate1' was not declared. Should it be static?
>
> This symbol is not used outside of arm_arch_timer.c, so marks it
> static.
It is worse than that. This variable is not used *at all*, and has
been added by e2bf384d4329 ("clocksource/drivers/arm_arch_timer: Add
__ro_after_init and __init"). Not sure how we missed that.
Please post a patch removing this variable altogether.
Thanks,
M.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---
> drivers/clocksource/arm_arch_timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index fe1a826..800aaa9 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -64,7 +64,7 @@ struct arch_timer {
> #define to_arch_timer(e) container_of(e, struct arch_timer, evt)
>
> static u32 arch_timer_rate __ro_after_init;
> -u32 arch_timer_rate1 __ro_after_init;
> +static u32 arch_timer_rate1 __ro_after_init;
> static int arch_timer_ppi[ARCH_TIMER_MAX_TIMER_PPI] __ro_after_init;
>
> static const char *arch_timer_ppi_names[ARCH_TIMER_MAX_TIMER_PPI] = {
> --
> 2.6.2
>
>
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2021-05-11 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 6:46 [PATCH -next] clocksource/drivers/arm_arch_timer: Make symbol 'arch_timer_rate1' static Zou Wei
2021-05-11 6:46 ` Zou Wei
2021-05-11 7:14 ` Marc Zyngier [this message]
2021-05-11 7:14 ` Marc Zyngier
2021-05-11 7:53 ` Jisheng Zhang
2021-05-11 7:53 ` Jisheng Zhang
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=87pmxxoi71.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Jisheng.Zhang@synaptics.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=tglx@linutronix.de \
--cc=zou_wei@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.