Skip to content
Commit e249e42d authored by Martin K. Petersen's avatar Martin K. Petersen
Browse files

scsi: sd: Clean up sd_setup_read_write_cmnd()



Rework sd_setup_read_write_cmnd() so it becomes more readable. Put all the
sanity checking at the head of the function and sanitize the logged error
messages. Move the legacy SCSI logging calls to the end of the functions
and reduce conditional nesting.

Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
[ bvanassche: ported this patch from kernel v4.11 to kernel v5.0 ]
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 78a02f49
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment