On 01/31/14 10:29, Hannes Reinecke wrote:
> - len = (h->buff[2] << 8) + h->buff[3] + 4;
> - if (len > h->bufflen) {
> + len = (buff[2] << 8) + buff[3] + 4;
> + if (len > bufflen) {
I think this code will become easier to read when using
get_unaligned_be16() for extracting the lengt
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_FAI
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] +
VPD inquiry need to be done only once, so we can be using
a local buffer here.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/device_handler/scsi_dh_alua.c | 45 ++
1 file changed, 27 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_al
On 01/17/2014 10:04 AM, Mike Christie wrote:
> On 12/20/2013 06:13 AM, Hannes Reinecke wrote:
>> VPD inquiry need to be done only once, so we can be using
>> a local buffer here.
>>
>> Signed-off-by: Hannes Reinecke
>> ---
>> drivers/scsi/device_handler/scsi_dh_alua.c | 45
>> ++-
On 12/20/2013 06:13 AM, Hannes Reinecke wrote:
> VPD inquiry need to be done only once, so we can be using
> a local buffer here.
>
> Signed-off-by: Hannes Reinecke
> ---
> drivers/scsi/device_handler/scsi_dh_alua.c | 45
> ++
> 1 file changed, 27 insertions(+), 18 d
VPD inquiry need to be done only once, so we can be using
a local buffer here.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/device_handler/scsi_dh_alua.c | 45 ++
1 file changed, 27 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_al
7 matches
Mail list logo