Skip to content

Commit

Permalink
[SCSI] hpsa: avoid unwanted promotion from unsigned to signed for rai…
Browse files Browse the repository at this point in the history
…d level index

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Stephen M. Cameron authored and James Bottomley committed Feb 17, 2010
1 parent 01a02ff commit 82a72c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ static ssize_t raid_level_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
ssize_t l = 0;
int rlevel;
unsigned char rlevel;
struct ctlr_info *h;
struct scsi_device *sdev;
struct hpsa_scsi_dev_t *hdev;
Expand All @@ -455,7 +455,7 @@ static ssize_t raid_level_show(struct device *dev,

rlevel = hdev->raid_level;
spin_unlock_irqrestore(&h->lock, flags);
if (rlevel < 0 || rlevel > RAID_UNKNOWN)
if (rlevel > RAID_UNKNOWN)
rlevel = RAID_UNKNOWN;
l = snprintf(buf, PAGE_SIZE, "RAID %s\n", raid_label[rlevel]);
return l;
Expand Down

0 comments on commit 82a72c0

Please sign in to comment.