Message ID | DDB9C85B850785449757F9914A034FCB4442E192@G9W0766.americas.hpqcorp.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> -----Original Message----- > From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi- > owner@vger.kernel.org] On Behalf Of Seymour, Shane M > Sent: Tuesday, June 30, 2015 10:46 PM > To: linux-scsi@vger.kernel.org; James Bottomley (JBottomley@Odin.com); ISS > StorageDev > Cc: Greg KH <greg@kroah.com> (greg@kroah.com) > Subject: [PATCH 2/3] hpsa: Remove unneccessary variable from raid_level_show > > > Remove unneccessary variable from raid_level_show > > Signed-off-by: Shane Seymour <shane.seymour@hp.com> Signed-off-by: Don brace <don.brace@pmcs.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/drivers/scsi/hpsa.c 2015-06-30 16:15:42.631979483 -0500 +++ b/drivers/scsi/hpsa.c 2015-06-30 16:16:45.737975186 -0500 @@ -612,7 +612,6 @@ static const char * const raid_label[] = static ssize_t raid_level_show(struct device *dev, struct device_attribute *attr, char *buf) { - ssize_t l = 0; unsigned char rlevel; struct ctlr_info *h; struct scsi_device *sdev; @@ -631,16 +630,14 @@ static ssize_t raid_level_show(struct de /* Is this even a logical drive? */ if (!is_logical_dev_addr_mode(hdev->scsi3addr)) { spin_unlock_irqrestore(&h->lock, flags); - l = scnprintf(buf, PAGE_SIZE, "N/A\n"); - return l; + return scnprintf(buf, PAGE_SIZE, "N/A\n"); } rlevel = hdev->raid_level; spin_unlock_irqrestore(&h->lock, flags); if (rlevel > RAID_UNKNOWN) rlevel = RAID_UNKNOWN; - l = scnprintf(buf, PAGE_SIZE, "RAID %s\n", raid_label[rlevel]); - return l; + return scnprintf(buf, PAGE_SIZE, "RAID %s\n", raid_label[rlevel]); } static ssize_t lunid_show(struct device *dev,
Remove unneccessary variable from raid_level_show Signed-off-by: Shane Seymour <shane.seymour@hp.com> --- Was not in previous patch. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html