Commit 541b2755 authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[POWERPC] Fix sparse warnings in arch/powerpc/platforms/pseries

Don't return void in pseries/iommu.c
Make mce_data_buf static in pseries/ras.c
Make things static in pseries/rtasd.c
Make things static in pseries/setup.c
vtermno may as well be static in platforms/pseries/lpar.c
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 3ff1999b
...@@ -135,9 +135,10 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, ...@@ -135,9 +135,10 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
u64 rpn; u64 rpn;
long l, limit; long l, limit;
if (npages == 1) if (npages == 1) {
return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, direction);
direction); return;
}
tcep = __get_cpu_var(tce_page); tcep = __get_cpu_var(tce_page);
...@@ -147,9 +148,11 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, ...@@ -147,9 +148,11 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
if (!tcep) { if (!tcep) {
tcep = (u64 *)__get_free_page(GFP_ATOMIC); tcep = (u64 *)__get_free_page(GFP_ATOMIC);
/* If allocation fails, fall back to the loop implementation */ /* If allocation fails, fall back to the loop implementation */
if (!tcep) if (!tcep) {
return tce_build_pSeriesLP(tbl, tcenum, npages, tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
uaddr, direction); direction);
return;
}
__get_cpu_var(tce_page) = tcep; __get_cpu_var(tce_page) = tcep;
} }
......
...@@ -52,7 +52,7 @@ EXPORT_SYMBOL(plpar_hcall_norets); ...@@ -52,7 +52,7 @@ EXPORT_SYMBOL(plpar_hcall_norets);
extern void pSeries_find_serial_port(void); extern void pSeries_find_serial_port(void);
int vtermno; /* virtual terminal# for udbg */ static int vtermno; /* virtual terminal# for udbg */
#define __ALIGNED__ __attribute__((__aligned__(sizeof(long)))) #define __ALIGNED__ __attribute__((__aligned__(sizeof(long))))
static void udbg_hvsi_putc(char c) static void udbg_hvsi_putc(char c)
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
static DEFINE_SPINLOCK(ras_log_buf_lock); static DEFINE_SPINLOCK(ras_log_buf_lock);
char mce_data_buf[RTAS_ERROR_LOG_MAX]; static char mce_data_buf[RTAS_ERROR_LOG_MAX];
static int ras_get_sensor_state_token; static int ras_get_sensor_state_token;
static int ras_check_exception_token; static int ras_check_exception_token;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static DEFINE_SPINLOCK(rtasd_log_lock); static DEFINE_SPINLOCK(rtasd_log_lock);
DECLARE_WAIT_QUEUE_HEAD(rtas_log_wait); static DECLARE_WAIT_QUEUE_HEAD(rtas_log_wait);
static char *rtas_log_buf; static char *rtas_log_buf;
static unsigned long rtas_log_start; static unsigned long rtas_log_start;
...@@ -329,7 +329,7 @@ static unsigned int rtas_log_poll(struct file *file, poll_table * wait) ...@@ -329,7 +329,7 @@ static unsigned int rtas_log_poll(struct file *file, poll_table * wait)
return 0; return 0;
} }
const struct file_operations proc_rtas_log_operations = { static const struct file_operations proc_rtas_log_operations = {
.read = rtas_log_read, .read = rtas_log_read,
.poll = rtas_log_poll, .poll = rtas_log_poll,
.open = rtas_log_open, .open = rtas_log_open,
......
...@@ -109,7 +109,7 @@ static void __init fwnmi_init(void) ...@@ -109,7 +109,7 @@ static void __init fwnmi_init(void)
fwnmi_active = 1; fwnmi_active = 1;
} }
void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc) static void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
{ {
unsigned int cascade_irq = i8259_irq(); unsigned int cascade_irq = i8259_irq();
if (cascade_irq != NO_IRQ) if (cascade_irq != NO_IRQ)
...@@ -482,7 +482,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus) ...@@ -482,7 +482,7 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
* possible with power button press. If ibm,power-off-ups token is used * possible with power button press. If ibm,power-off-ups token is used
* it will allow auto poweron after power is restored. * it will allow auto poweron after power is restored.
*/ */
void pSeries_power_off(void) static void pSeries_power_off(void)
{ {
int rc; int rc;
int rtas_poweroff_ups_token = rtas_token("ibm,power-off-ups"); int rtas_poweroff_ups_token = rtas_token("ibm,power-off-ups");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment