Commit 0fd58fb3 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc64: Janitor rtas_call() return variables

Recently I changed the return value of rtas_call() from an unsigned long to
an int.  That patch missed a few places where we declare a variable to
store the result from rtas_call().  This new patch changes those places to
use an int variable instead of a long or unsigned long variable.  Linas
Vepstas pointed this out.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e1148e37
......@@ -189,7 +189,7 @@ chrp_init2(void)
*/
void __init fwnmi_init(void)
{
long ret;
int ret;
int ibm_nmi_register = rtas_token("ibm,nmi-register");
if (ibm_nmi_register == RTAS_UNKNOWN_SERVICE)
return;
......
......@@ -366,7 +366,7 @@ unsigned long eeh_check_failure(void *token, unsigned long val)
unsigned long addr;
struct pci_dev *dev;
struct device_node *dn;
unsigned long ret;
int ret;
int rets[2];
static spinlock_t lock = SPIN_LOCK_UNLOCKED;
/* dont want this on the stack */
......@@ -420,7 +420,7 @@ unsigned long eeh_check_failure(void *token, unsigned long val)
BUID_LO(dn->phb->buid));
if (ret == 0 && rets[1] == 1 && rets[0] >= 2) {
unsigned long slot_err_ret;
int slot_err_ret;
spin_lock_irqsave(&lock, flags);
memset(slot_err_buf, 0, RTAS_ERROR_LOG_MAX);
......@@ -471,7 +471,7 @@ struct eeh_early_enable_info {
static void *early_enable_eeh(struct device_node *dn, void *data)
{
struct eeh_early_enable_info *info = data;
long ret;
int ret;
char *status = get_property(dn, "status", 0);
u32 *class_code = (u32 *)get_property(dn, "class-code", 0);
u32 *vendor_id = (u32 *)get_property(dn, "vendor-id", 0);
......
......@@ -245,7 +245,7 @@ unsigned int get_splpar_potential_characteristics(void)
/* return 0 for now. Underlying rtas functionality is not yet complete. 12/01/2003*/
return 0;
#if 0
long call_status;
int call_status;
unsigned long ret[2];
char * buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
......
......@@ -124,7 +124,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
struct rtas_error_log log_entry;
unsigned int size = sizeof(log_entry);
long status = 0xdeadbeef;
int status = 0xdeadbeef;
spin_lock(&log_lock);
......@@ -138,10 +138,10 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
spin_unlock(&log_lock);
udbg_printf("EPOW <0x%lx 0x%lx>\n",
udbg_printf("EPOW <0x%lx 0x%x>\n",
*((unsigned long *)&log_entry), status);
printk(KERN_WARNING
"EPOW <0x%lx 0x%lx>\n",*((unsigned long *)&log_entry), status);
"EPOW <0x%lx 0x%x>\n",*((unsigned long *)&log_entry), status);
/* format and print the extended information */
log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, 0);
......@@ -162,7 +162,7 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
struct rtas_error_log log_entry;
unsigned int size = sizeof(log_entry);
long status = 0xdeadbeef;
int status = 0xdeadbeef;
int fatal;
spin_lock(&log_lock);
......@@ -186,10 +186,10 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, fatal);
if (fatal) {
udbg_printf("HW Error <0x%lx 0x%lx>\n",
udbg_printf("HW Error <0x%lx 0x%x>\n",
*((unsigned long *)&log_entry), status);
printk(KERN_EMERG
"Error: Fatal hardware error <0x%lx 0x%lx>\n",
"Error: Fatal hardware error <0x%lx 0x%x>\n",
*((unsigned long *)&log_entry), status);
#ifndef DEBUG
......@@ -200,10 +200,10 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
ppc_md.power_off();
#endif
} else {
udbg_printf("Recoverable HW Error <0x%lx 0x%lx>\n",
udbg_printf("Recoverable HW Error <0x%lx 0x%x>\n",
*((unsigned long *)&log_entry), status);
printk(KERN_WARNING
"Warning: Recoverable hardware error <0x%lx 0x%lx>\n",
"Warning: Recoverable hardware error <0x%lx 0x%x>\n",
*((unsigned long *)&log_entry), status);
}
return IRQ_HANDLED;
......
......@@ -118,7 +118,7 @@ static ssize_t scanlog_read(struct file *file, char *buf,
wait_time = ms / (1000000/HZ); /* round down is fine */
/* Fall through to sleep */
} else {
printk(KERN_ERR "scanlog: unknown error from rtas: %ld\n", status);
printk(KERN_ERR "scanlog: unknown error from rtas: %d\n", status);
return -EIO;
}
}
......
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