Skip to content

Commit

Permalink
openrisc/time: Fix symbol scope warnings
Browse files Browse the repository at this point in the history
Spare reported the following warnings:
    arch/openrisc/kernel/time.c:64:1: warning: symbol 'clockevent_openrisc_timer' was not declared. Should it be static?
    arch/openrisc/kernel/time.c:66:6: warning: symbol 'openrisc_clockevent_init' was not declared. Should it be static?

This patch fixes by:

 - Add static declaration to clockevent_openrisc_timer as it's used only in
   this file.
 - Add include for asm/time.h for openrisc_clockevent_init declaration.

Signed-off-by: Stafford Horne <shorne@gmail.com>
  • Loading branch information
Stafford Horne committed May 23, 2022
1 parent 024b58f commit 5a344bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/openrisc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/of_clk.h>

#include <asm/cpuinfo.h>
#include <asm/time.h>

/* Test the timer ticks to count, used in sync routine */
inline void openrisc_timer_set(unsigned long count)
Expand Down Expand Up @@ -61,7 +62,7 @@ static int openrisc_timer_set_next_event(unsigned long delta,
* timers) we cannot enable the PERIODIC feature. The tick timer can run using
* one-shot events, so no problem.
*/
DEFINE_PER_CPU(struct clock_event_device, clockevent_openrisc_timer);
static DEFINE_PER_CPU(struct clock_event_device, clockevent_openrisc_timer);

void openrisc_clockevent_init(void)
{
Expand Down

0 comments on commit 5a344bb

Please sign in to comment.