On Mon, Sep 06, 2021 at 05:40:35PM -0700, Bart Van Assche wrote: > On 9/3/21 23:45, Laibin Qiu wrote: >> cmd->cmd_len = scsi_req(req)->cmd_len; >> + cmd->cmnd = scsi_req(req)->cmd; >> if (cmd->cmd_len == 0) >> cmd->cmd_len = scsi_command_size(cmd->cmnd); >> - cmd->cmnd = scsi_req(req)->cmd; >> cmd->transfersize = blk_rq_bytes(req); > > 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.