From: Paul Mackerras 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: Paul Mackerras Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/chrp_setup.c | 2 +- 25-akpm/arch/ppc64/kernel/eeh.c | 6 +++--- 25-akpm/arch/ppc64/kernel/lparcfg.c | 2 +- 25-akpm/arch/ppc64/kernel/ras.c | 16 ++++++++-------- 25-akpm/arch/ppc64/kernel/scanlog.c | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff -puN arch/ppc64/kernel/chrp_setup.c~ppc64-janitor-rtas_call-return-variables arch/ppc64/kernel/chrp_setup.c --- 25/arch/ppc64/kernel/chrp_setup.c~ppc64-janitor-rtas_call-return-variables 2004-06-30 10:56:28.746534240 -0700 +++ 25-akpm/arch/ppc64/kernel/chrp_setup.c 2004-06-30 10:56:28.755532872 -0700 @@ -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; diff -puN arch/ppc64/kernel/eeh.c~ppc64-janitor-rtas_call-return-variables arch/ppc64/kernel/eeh.c --- 25/arch/ppc64/kernel/eeh.c~ppc64-janitor-rtas_call-return-variables 2004-06-30 10:56:28.748533936 -0700 +++ 25-akpm/arch/ppc64/kernel/eeh.c 2004-06-30 10:56:28.756532720 -0700 @@ -366,7 +366,7 @@ unsigned long eeh_check_failure(void *to 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 *to 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); diff -puN arch/ppc64/kernel/lparcfg.c~ppc64-janitor-rtas_call-return-variables arch/ppc64/kernel/lparcfg.c --- 25/arch/ppc64/kernel/lparcfg.c~ppc64-janitor-rtas_call-return-variables 2004-06-30 10:56:28.749533784 -0700 +++ 25-akpm/arch/ppc64/kernel/lparcfg.c 2004-06-30 10:56:28.757532568 -0700 @@ -245,7 +245,7 @@ unsigned int get_splpar_potential_charac /* 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); diff -puN arch/ppc64/kernel/ras.c~ppc64-janitor-rtas_call-return-variables arch/ppc64/kernel/ras.c --- 25/arch/ppc64/kernel/ras.c~ppc64-janitor-rtas_call-return-variables 2004-06-30 10:56:28.751533480 -0700 +++ 25-akpm/arch/ppc64/kernel/ras.c 2004-06-30 10:56:28.757532568 -0700 @@ -124,7 +124,7 @@ ras_epow_interrupt(int irq, void *dev_id { 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 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_i { 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_i 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_i 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; diff -puN arch/ppc64/kernel/scanlog.c~ppc64-janitor-rtas_call-return-variables arch/ppc64/kernel/scanlog.c --- 25/arch/ppc64/kernel/scanlog.c~ppc64-janitor-rtas_call-return-variables 2004-06-30 10:56:28.752533328 -0700 +++ 25-akpm/arch/ppc64/kernel/scanlog.c 2004-06-30 10:56:28.758532416 -0700 @@ -118,7 +118,7 @@ static ssize_t scanlog_read(struct file 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; } } _