Commit 4af61e4f authored by Don Brace's avatar Don Brace Committed by Martin K. Petersen

hpsa: remove function definition for sanitize_inquiry_string

This patch depends on patch
 - commit ac10a3e4ed64
   ("Export function scsi_scan.c:sanitize_inquiry_string")
Suggested-by: default avatarHannes Reinecke <hare@suse.de>
Suggested-by: Matthew R. Ochs mrochs@linux.vnet.ibm.com
Reviewed-by: default avatarMahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: default avatarJustin Lindley <justin.lindley@microsemi.com>
Reviewed-by: default avatarScott Teel <scott.teel@microsemi.com>
Reviewed-by: default avatarKevin Barnett <kevin.barnett@microsemi.com>
Reviewed-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c3390df4
...@@ -3665,18 +3665,6 @@ static int hpsa_device_supports_aborts(struct ctlr_info *h, ...@@ -3665,18 +3665,6 @@ static int hpsa_device_supports_aborts(struct ctlr_info *h,
return rc; return rc;
} }
static void sanitize_inquiry_string(unsigned char *s, int len)
{
bool terminated = false;
for (; len > 0; (--len, ++s)) {
if (*s == 0)
terminated = true;
if (terminated || *s < 0x20 || *s > 0x7e)
*s = ' ';
}
}
static int hpsa_update_device_info(struct ctlr_info *h, static int hpsa_update_device_info(struct ctlr_info *h,
unsigned char scsi3addr[], struct hpsa_scsi_dev_t *this_device, unsigned char scsi3addr[], struct hpsa_scsi_dev_t *this_device,
unsigned char *is_OBDR_device) unsigned char *is_OBDR_device)
...@@ -3707,8 +3695,8 @@ static int hpsa_update_device_info(struct ctlr_info *h, ...@@ -3707,8 +3695,8 @@ static int hpsa_update_device_info(struct ctlr_info *h,
goto bail_out; goto bail_out;
} }
sanitize_inquiry_string(&inq_buff[8], 8); scsi_sanitize_inquiry_string(&inq_buff[8], 8);
sanitize_inquiry_string(&inq_buff[16], 16); scsi_sanitize_inquiry_string(&inq_buff[16], 16);
this_device->devtype = (inq_buff[0] & 0x1f); this_device->devtype = (inq_buff[0] & 0x1f);
memcpy(this_device->scsi3addr, scsi3addr, 8); memcpy(this_device->scsi3addr, scsi3addr, 8);
......
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