Skip to content

Commit

Permalink
powerpc/chrp/time: Make some functions static, add missing header inc…
Browse files Browse the repository at this point in the history
…lude

Add a missing include <platforms/chrp/chrp.h>.

These functions can all be static, make it so. Fix warnings treated as
errors with W=1:

  arch/powerpc/platforms/chrp/time.c:41:13: error: no previous prototype for ‘chrp_time_init’ [-Werror=missing-prototypes]
  arch/powerpc/platforms/chrp/time.c:66:5: error: no previous prototype for ‘chrp_cmos_clock_read’ [-Werror=missing-prototypes]
  arch/powerpc/platforms/chrp/time.c:74:6: error: no previous prototype for ‘chrp_cmos_clock_write’ [-Werror=missing-prototypes]
  arch/powerpc/platforms/chrp/time.c:86:5: error: no previous prototype for ‘chrp_set_rtc_time’ [-Werror=missing-prototypes]
  arch/powerpc/platforms/chrp/time.c:130:6: error: no previous prototype for ‘chrp_get_rtc_time’ [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
malaterre authored and mpe committed May 25, 2018
1 parent 9e0d86c commit b87a358
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/powerpc/platforms/chrp/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <asm/sections.h>
#include <asm/time.h>

#include <platforms/chrp/chrp.h>

extern spinlock_t rtc_lock;

#define NVRAM_AS0 0x74
Expand Down Expand Up @@ -63,15 +65,15 @@ long __init chrp_time_init(void)
return 0;
}

int chrp_cmos_clock_read(int addr)
static int chrp_cmos_clock_read(int addr)
{
if (nvram_as1 != 0)
outb(addr>>8, nvram_as1);
outb(addr, nvram_as0);
return (inb(nvram_data));
}

void chrp_cmos_clock_write(unsigned long val, int addr)
static void chrp_cmos_clock_write(unsigned long val, int addr)
{
if (nvram_as1 != 0)
outb(addr>>8, nvram_as1);
Expand Down

0 comments on commit b87a358

Please sign in to comment.