提交 16a70534 编写于 作者: B Bart Van Assche 提交者: Jens Axboe

skd: Check structure sizes at build time

This patch will help to verify the changes made by the next patch.
Signed-off-by: NBart 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: NJens Axboe <axboe@kernel.dk>
上级 d891fe60
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册