linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] hpsa: fix bad comparison of signed with unsigned in hpsa_update_scsi_devices
@ 2014-05-21 16:16 Stephen M. Cameron
  2014-05-21 16:16 ` [PATCH 2/3] hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id Stephen M. Cameron
  2014-05-21 16:16 ` [PATCH 3/3] hpsa: fix handling of hpsa_volume_offline return value Stephen M. Cameron
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen M. Cameron @ 2014-05-21 16:16 UTC (permalink / raw)
  To: =james.bottomley
  Cc: martin.petersen, linux-scsi, stephenmcameron, joseph.t.handzik,
	thenzl, michael.miller, scott.teel, hch, dan.carpenter

From: Joe Handzik <joseph.t.handzik@hp.com>

rescan_hba_mode was defined as a u8 so could never be less than zero:

        rescan_hba_mode = hpsa_hba_mode_enabled(h);
        if (rescan_hba_mode < 0)
                goto out;

Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/scsi/hpsa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 654e341..c5b24e6 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3010,7 +3010,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno)
 	int reportlunsize = sizeof(*physdev_list) + HPSA_MAX_PHYS_LUN * 24;
 	int i, n_ext_target_devs, ndevs_to_allocate;
 	int raid_ctlr_position;
-	u8 rescan_hba_mode;
+	int rescan_hba_mode;
 	DECLARE_BITMAP(lunzerobits, MAX_EXT_TARGETS);
 
 	currentsd = kzalloc(sizeof(*currentsd) * HPSA_MAX_DEVICES, GFP_KERNEL);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-21 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 16:16 [PATCH 1/3] hpsa: fix bad comparison of signed with unsigned in hpsa_update_scsi_devices Stephen M. Cameron
2014-05-21 16:16 ` [PATCH 2/3] hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id Stephen M. Cameron
2014-05-21 16:16 ` [PATCH 3/3] hpsa: fix handling of hpsa_volume_offline return value Stephen M. Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).