Re: [PATCH 6/7] mptfusion: combine fw_event_work and its event_data

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

 



>  
> -	sz = offsetof(struct fw_event_work, event_data) +
> -	    sizeof(MpiEventDataSasDeviceStatusChange_t);
> +	sz = sizeof(*fw_event) +
> +		sizeof(MpiEventDataSasDeviceStatusChange_t);
>  	fw_event = kzalloc(sz, GFP_ATOMIC);

Seems like there is no point in keeping the sz variable here and at
the other occurances.  Not that it really matters, but if we make a pass
over this code we might as well fix that up, too.

> -	sz = offsetof(struct fw_event_work, event_data);
> +	sz = sizeof(*fw_event);

Eww, using offsetoff for an allocation size.  Good riddance that this
gets sorted out.

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
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