mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
scsi: ufs: core: Add a compile-time structure size check
Before modifying struct ufshcd_sg_entry, add a compile-time structure size check. Link: https://lore.kernel.org/r/20211020214024.2007615-10-bvanassche@acm.org Acked-by: Avri Altman <Avri.Altman@wdc.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
3ad317a1f9
commit
9a868c8ad3
@ -9791,6 +9791,11 @@ static int __init ufshcd_core_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Verify that there are no gaps in struct utp_transfer_cmd_desc. */
|
||||
static_assert(sizeof(struct utp_transfer_cmd_desc) ==
|
||||
2 * ALIGNED_UPIU_SIZE +
|
||||
SG_ALL * sizeof(struct ufshcd_sg_entry));
|
||||
|
||||
ufs_debugfs_init();
|
||||
|
||||
ret = scsi_register_driver(&ufs_dev_wlun_template.gendrv);
|
||||
|
Loading…
Reference in New Issue
Block a user