summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-08-17 13:13:08 -0700
committerJens Axboe <axboe@kernel.dk>2017-08-18 08:45:29 -0600
commit16a705341aa6ed419a2ae6293b5c49d5b7289941 (patch)
treed6c8bfe237437e54c4091c7b27b0158ee30faa6a /drivers
parentd891fe6093e8c5741800d3f82b6297bd940a9e40 (diff)
downloadlinux-16a705341aa6ed419a2ae6293b5c49d5b7289941.tar.bz2
skd: Check structure sizes at build time
This patch will help to verify the changes made by the next patch. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/skd_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 6ba6103f53dd..e2d205b58fe2 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -4959,6 +4959,11 @@ static void skd_log_skreq(struct skd_device *skdev,
static int __init skd_init(void)
{
+ BUILD_BUG_ON(sizeof(struct fit_completion_entry_v1) != 8);
+ BUILD_BUG_ON(sizeof(struct fit_comp_error_info) != 32);
+ BUILD_BUG_ON(sizeof(struct skd_command_header) != 16);
+ BUILD_BUG_ON(sizeof(struct skd_scsi_request) != 32);
+ BUILD_BUG_ON(sizeof(struct driver_inquiry_data) != 44);
BUILD_BUG_ON(offsetof(struct skd_msg_buf, fmh) != 0);
BUILD_BUG_ON(offsetof(struct skd_msg_buf, scsi) != 64);
BUILD_BUG_ON(sizeof(struct skd_msg_buf) != SKD_N_FITMSG_BYTES);