Skip to content

Commit

Permalink
skd: Check structure sizes at build time
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bart Van Assche authored and Jens Axboe committed Aug 18, 2017
1 parent d891fe6 commit 16a7053
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/block/skd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 16a7053

Please sign in to comment.