On 02/13/2014 10:51 AM, Maurizio Lombardi wrote:
> Hi,
> 
> On 01/31/2014 10:29 AM, Hannes Reinecke wrote:
>>  static int alua_vpd_inquiry(struct scsi_device *sdev, struct alua_dh_data 
>> *h)
>>  {
>> +    unsigned char *buff;
>> +    unsigned char bufflen = 36;
>>      int len, timeout = ALUA_FAILOVER_TIMEOUT;
> [...]
>> +    len = (buff[2] << 8) + buff[3] + 4;
>> +    if (len > bufflen) {
> [...]
>> +            bufflen = len;
> 
> just a nit: is it safe to use char as the type of bufflen? Isn't better
> to declare it as int just in case len is > than 255 ?
> 
Yes, true.

However, this whole section needs to be reworked anyway, as there's
a fair chance we're getting the VPD page 0x83 for free.
(Cf my latest patchset 'Display EVPD pages in sysfs').

And jejb made some positive noises that, so I'll be reworking the
scsi_dh_alua patchset to take advantage of the new fields.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
h...@suse.de                          +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to