Skip to content

Commit

Permalink
sparc32: fix sparse warnings in tadpole.c
Browse files Browse the repository at this point in the history
Fix following warnings:
tadpole.c:21:6: warning: symbol 'cpu_pwr_save' was not declared. Should it be static?
tadpole.c:101:13: warning: symbol 'clock_stop_probe' was not declared. Should it be static?

This actually revealed that cpu_pwr_save is only assigned.
It was left static with a TODO comment for now - this should be cleaned up later.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Apr 29, 2014
1 parent 8885ec7 commit 6b5f02f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <asm/cpu_type.h>
#include <asm/setup.h>

extern void clock_stop_probe(void); /* tadpole.c */
#include "kernel.h"

static char *cpu_mid_prop(void)
{
Expand Down
3 changes: 3 additions & 0 deletions arch/sparc/kernel/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr,
/* windows.c */
void try_to_clear_window_buffer(struct pt_regs *regs, int who);

/* tadpole.c */
void __init clock_stop_probe(void);

#else /* CONFIG_SPARC32 */
#endif /* CONFIG_SPARC32 */
#endif /* !(__SPARC_KERNEL_H) */
6 changes: 5 additions & 1 deletion arch/sparc/kernel/tadpole.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
#include <asm/oplib.h>
#include <asm/io.h>

#include "kernel.h"

#define MACIO_SCSI_CSR_ADDR 0x78400000
#define MACIO_EN_DMA 0x00000200
#define CLOCK_INIT_DONE 1

static int clk_state;
static volatile unsigned char *clk_ctrl;
void (*cpu_pwr_save)(void);

/* TODO - cpu_pwr_save is only assigned - cleanup potential. */
static void (*cpu_pwr_save)(void);

static inline unsigned int ldphys(unsigned int addr)
{
Expand Down

0 comments on commit 6b5f02f

Please sign in to comment.