From 32696198745a74b37bc27498a5ade169d2c04c5e Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Wed, 25 Jun 2014 17:06:42 -0400 Subject: 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 Acked-by: Sreekanth Reddy Signed-off-by: Christoph Hellwig --- drivers/message/fusion/mptsas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/message/fusion/mptsas.h') 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 { -- cgit v1.2.3