summaryrefslogtreecommitdiff
path: root/drivers/message/fusion/mptsas.h
diff options
context:
space:
mode:
authorJoe Lawrence <joe.lawrence@stratus.com>2014-06-26 01:06:42 +0400
committerChristoph Hellwig <hch@lst.de>2014-07-26 01:16:58 +0400
commit32696198745a74b37bc27498a5ade169d2c04c5e (patch)
tree6b86964c219585ccd11131dc3523b78eff309299 /drivers/message/fusion/mptsas.h
parentc9834c70efbaaa1461ec04289d97a842244fb294 (diff)
downloadlinux-32696198745a74b37bc27498a5ade169d2c04c5e.tar.xz
mptfusion: combine fw_event_work and its event_data
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: drivers/message/fusion/mptsas.c:1003 mptsas_queue_device_delete() error: memcpy() 'fw_event->event_data' too small (29 vs 36) drivers/message/fusion/mptsas.c:1017 mptsas_queue_rescan() error: not allocating enough data 168 vs 160 Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com> Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/message/fusion/mptsas.h')
-rw-r--r--drivers/message/fusion/mptsas.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptsas.h b/drivers/message/fusion/mptsas.h
index 57e86ab77661..c396483d3624 100644
--- a/drivers/message/fusion/mptsas.h
+++ b/drivers/message/fusion/mptsas.h
@@ -110,7 +110,7 @@ struct fw_event_work {
MPT_ADAPTER *ioc;
u32 event;
u8 retries;
- u8 __attribute__((aligned(4))) event_data[1];
+ char event_data[0] __aligned(4);
};
struct mptsas_discovery_event {