ppc64: Janitor rtas_call() return variables
PATCH 1/1 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 Paul Mackerras <[email protected]>
arch/ppc64/kernel/chrp_setup.c +1 -1
@@ -189,7 +189,7 @@*/ 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 ;
arch/ppc64/kernel/eeh.c +3 -3
@@ -366,7 +366,7 @@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 @@ 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 @@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 );
arch/ppc64/kernel/lparcfg.c +1 -1
@@ -245,7 +245,7 @@/* 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 );
arch/ppc64/kernel/ras.c +8 -8
@@ -124,7 +124,7 @@ {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 @@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 @@ {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 @@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 @@ 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 ;
arch/ppc64/kernel/scanlog.c +1 -1
@@ -118,7 +118,7 @@ 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 ; } }