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

2014-06-06 Thread Joe Lawrence
On Thu, 5 Jun 2014 02:34:29 -0700 Christoph Hellwig h...@infradead.org wrote: diff --git a/drivers/message/fusion/mptsas.h b/drivers/message/fusion/mptsas.h index 57e86ab..c396483 100644 --- a/drivers/message/fusion/mptsas.h +++ b/drivers/message/fusion/mptsas.h @@ -110,7 +110,7 @@

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

2014-06-05 Thread Christoph Hellwig
- 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

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

2014-06-04 Thread Joe Lawrence
Tack the firmware reply event_data payload to the end of its corresponding struct fw_event_work allocation. Rework fw_event_work allocation calculations to include the event_data size where appropriate. This clarifies the code a bit and avoids the following smatch warnings: