This patch is a duplicate and has been posted before.
Please take a look at https://lore.kernel.org/linux-scsi/20210904064534.1919476-1-qiulaibin@xxxxxxxxxx/.
From the replies to that email:
"> Thinking further about this: is there any code left that depends on
> scsi_setup_scsi_cmnd() setting cmd->cmd_len? Can the cmd->cmd_len
> assignment be removed from scsi_setup_scsi_cmnd()?
cmd_len should never be 0 now, so I think we can remove it."