===== arch/ppc64/kernel/lparcfg.c 1.2 vs edited ===== --- 1.2/arch/ppc64/kernel/lparcfg.c Thu Dec 11 15:53:44 2003 +++ edited/arch/ppc64/kernel/lparcfg.c Thu Dec 11 16:55:27 2003 @@ -233,7 +233,7 @@ */ #define SPLPAR_CHARACTERISTICS_TOKEN 20 #define SPLPAR_MAXLENGTH 1026*(sizeof(char)) -unsigned int get_splpar_potential_characteristics() +static unsigned int get_splpar_potential_characteristics(void) { /* return 0 for now. Underlying rtas functionality is not yet complete. 12/01/2003*/ return 0; @@ -324,11 +324,11 @@ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { system_potential_processors = get_splpar_potential_characteristics(); - n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, - "system_active_processors=%d\n", - (h_resource >> 2*8) && 0xffff); - n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, - "system_potential_processors=%d\n", + n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, + "system_active_processors=%lu\n", + (h_resource >> 2*8) & 0xffff); + n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, + "system_potential_processors=%d\n", system_potential_processors); } else { system_potential_processors = system_active_processors; @@ -367,16 +367,16 @@ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, - "pool=%d\n", (h_aggregation >> 0*8)&&0xffff); + "pool=%lu\n", (h_aggregation >> 0*8)&0xffff); n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, - "pool_capacity=%d\n", (h_resource >> 3*8) &&0xffff); + "pool_capacity=%lu\n", (h_resource >> 3*8) &0xffff); n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, - "group=%d\n", (h_aggregation >> 2*8)&&0xffff); + "group=%lu\n", (h_aggregation >> 2*8)&0xffff); n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, - "capped=%d\n", (h_resource >> 6*8)&&0x40); + "capped=%lu\n", (h_resource >> 6*8)&0x40); n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, "capacity_weight=%d\n", (int)(h_resource>>5*8)&0xFF); @@ -434,9 +434,9 @@ } struct file_operations lparcfg_fops = { - owner: THIS_MODULE, - read: lparcfg_read, - open: lparcfg_open, + .owner = THIS_MODULE, + .read = lparcfg_read, + .open = lparcfg_open }; int __init lparcfg_init(void)