From 79c5772415858a62d1bcd2e368abd1e66560f2da Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 30 Jan 2004 17:59:52 -0800 Subject: [PATCH] [PATCH] ppc64: fix && vs & bugs in lparcfg, from Julie DeWandel From: Anton Blanchard --- arch/ppc64/kernel/lparcfg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c index df6aa551b0280..7ff67beec3665 100644 --- a/arch/ppc64/kernel/lparcfg.c +++ b/arch/ppc64/kernel/lparcfg.c @@ -332,7 +332,7 @@ static int lparcfg_data(unsigned char *buf, unsigned long size) 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); + (h_resource >> 2*8) & 0xffff); n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, "system_potential_processors=%d\n", system_potential_processors); @@ -373,16 +373,16 @@ static int lparcfg_data(unsigned char *buf, unsigned long size) 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=%d\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=%d\n", (h_resource >> 3*8) &0xffff); 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, - "capped=%d\n", (h_resource >> 6*8)&&0x40); + "capped=%d\n", (h_resource >> 6*8)&0x40); n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, "capacity_weight=%d\n", (int)(h_resource>>5*8)&0xFF); -- 2.53.0