Re: [PATCH 07/18] qla2xxx: Fix to include FCE data as part of dump.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Fri, 2011-11-18 at 09:03 -0800, Chad Dupuis wrote:
>> From: Giridhar Malavali <giridhar.malavali@xxxxxxxxxx>
>>
>> Signed-off-by: Giridhar Malavali <giridhar.malavali@xxxxxxxxxx>
>> Signed-off-by: Chad Dupuis <chad.dupuis@xxxxxxxxxx>
>> ---
>>  drivers/scsi/qla2xxx/qla_dbg.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/scsi/qla2xxx/qla_dbg.c
>> b/drivers/scsi/qla2xxx/qla_dbg.c
>> index 58e0bfb..8607ab7 100644
>> --- a/drivers/scsi/qla2xxx/qla_dbg.c
>> +++ b/drivers/scsi/qla2xxx/qla_dbg.c
>> @@ -369,7 +369,7 @@ qla25xx_copy_fce(struct qla_hw_data *ha, void *ptr,
>> uint32_t **last_chain)
>>
>>  	memcpy(iter_reg, ha->fce, ntohl(fcec->size));
>>
>> -	return iter_reg;
>> +	return (void *)iter_reg + ntohl(fcec->size);
>
> That should be (char *).  (void *) is a pointer to an incomplete type
> and as such pointer arithmetic on it is technically illegal.  gcc treats
> it as char * for this purpose, so the expression works, but other
> compilers (or some future version of gcc) might not be so lenient.

Docbook/kernel-hacking.tmpl:

GNU Extensions are explicitly allowed in the Linux kernel.
...
-Arithmetic on void pointers

Eike
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux