Commit a0db8a75 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen

scsi: myrs: Fix the processor absent message in processor_show()

If both processors are absent then it's supposed to print that, but
instead we print that just the second processor is absent.

Fixes: 77266186 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9a231caa
...@@ -1366,11 +1366,11 @@ static ssize_t processor_show(struct device *dev, ...@@ -1366,11 +1366,11 @@ static ssize_t processor_show(struct device *dev,
first_processor, info->cpu[0].cpu_count, first_processor, info->cpu[0].cpu_count,
info->cpu[1].cpu_name, info->cpu[1].cpu_name,
second_processor, info->cpu[1].cpu_count); second_processor, info->cpu[1].cpu_count);
else if (!second_processor) else if (first_processor && !second_processor)
ret = snprintf(buf, 64, "1: %s (%s, %d cpus)\n2: absent\n", ret = snprintf(buf, 64, "1: %s (%s, %d cpus)\n2: absent\n",
info->cpu[0].cpu_name, info->cpu[0].cpu_name,
first_processor, info->cpu[0].cpu_count); first_processor, info->cpu[0].cpu_count);
else if (!first_processor) else if (!first_processor && second_processor)
ret = snprintf(buf, 64, "1: absent\n2: %s (%s, %d cpus)\n", ret = snprintf(buf, 64, "1: absent\n2: %s (%s, %d cpus)\n",
info->cpu[1].cpu_name, info->cpu[1].cpu_name,
second_processor, info->cpu[1].cpu_count); second_processor, info->cpu[1].cpu_count);
......
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