Skip to content

Commit 16a7053

Browse files
KAGA-KOKOaxboe
authored andcommitted
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>
1 parent d891fe6 commit 16a7053

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/block/skd_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4959,6 +4959,11 @@ static void skd_log_skreq(struct skd_device *skdev,
49594959

49604960
static int __init skd_init(void)
49614961
{
4962+
BUILD_BUG_ON(sizeof(struct fit_completion_entry_v1) != 8);
4963+
BUILD_BUG_ON(sizeof(struct fit_comp_error_info) != 32);
4964+
BUILD_BUG_ON(sizeof(struct skd_command_header) != 16);
4965+
BUILD_BUG_ON(sizeof(struct skd_scsi_request) != 32);
4966+
BUILD_BUG_ON(sizeof(struct driver_inquiry_data) != 44);
49624967
BUILD_BUG_ON(offsetof(struct skd_msg_buf, fmh) != 0);
49634968
BUILD_BUG_ON(offsetof(struct skd_msg_buf, scsi) != 64);
49644969
BUILD_BUG_ON(sizeof(struct skd_msg_buf) != SKD_N_FITMSG_BYTES);

0 commit comments

Comments
 (0)