Commit 79c57724 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: fix && vs & bugs in lparcfg, from Julie DeWandel

From: Anton Blanchard <anton@samba.org>
parent 6d8cdd4b
...@@ -332,7 +332,7 @@ static int lparcfg_data(unsigned char *buf, unsigned long size) ...@@ -332,7 +332,7 @@ static int lparcfg_data(unsigned char *buf, unsigned long size)
system_potential_processors = get_splpar_potential_characteristics(); system_potential_processors = get_splpar_potential_characteristics();
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"system_active_processors=%d\n", "system_active_processors=%d\n",
(h_resource >> 2*8) && 0xffff); (h_resource >> 2*8) & 0xffff);
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"system_potential_processors=%d\n", "system_potential_processors=%d\n",
system_potential_processors); system_potential_processors);
...@@ -373,16 +373,16 @@ static int lparcfg_data(unsigned char *buf, unsigned long size) ...@@ -373,16 +373,16 @@ static int lparcfg_data(unsigned char *buf, unsigned long size)
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"pool=%d\n", (h_aggregation >> 0*8)&&0xffff); "pool=%d\n", (h_aggregation >> 0*8)&0xffff);
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"pool_capacity=%d\n", (h_resource >> 3*8) &&0xffff); "pool_capacity=%d\n", (h_resource >> 3*8) &0xffff);
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"group=%d\n", (h_aggregation >> 2*8)&&0xffff); "group=%d\n", (h_aggregation >> 2*8)&0xffff);
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"capped=%d\n", (h_resource >> 6*8)&&0x40); "capped=%d\n", (h_resource >> 6*8)&0x40);
n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n,
"capacity_weight=%d\n", (int)(h_resource>>5*8)&0xFF); "capacity_weight=%d\n", (int)(h_resource>>5*8)&0xFF);
......
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