Skip to content

Commit

Permalink
scsi: myrs: Fix the processor absent message in processor_show()
Browse files Browse the repository at this point in the history
If both processors are absent then it's supposed to print that, but
instead we print that just the second processor is absent.

Fixes: 7726618 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Dan Carpenter authored and Martin K. Petersen committed Oct 19, 2018
1 parent 9a231ca commit a0db8a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/myrs.c
Original file line number Diff line number Diff line change
@@ -1366,11 +1366,11 @@ static ssize_t processor_show(struct device *dev,
first_processor, info->cpu[0].cpu_count,
info->cpu[1].cpu_name,
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",
info->cpu[0].cpu_name,
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",
info->cpu[1].cpu_name,
second_processor, info->cpu[1].cpu_count);

0 comments on commit a0db8a7

Please sign in to comment.