aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-06-15 14:29:33 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-06-16 18:39:05 +0200
commit7f0b6e114ae4e142e2b3dfc9fac138f4a30edc4f (patch)
treececb48b523c88aa17acc9c62007a5d7ac4d45c33 /include
parentd020aa504cec8f525b55ba2ef982c09dc847c72e (diff)
downloadqemu-7f0b6e114ae4e142e2b3dfc9fac138f4a30edc4f.zip
qemu-7f0b6e114ae4e142e2b3dfc9fac138f4a30edc4f.tar.gz
qemu-7f0b6e114ae4e142e2b3dfc9fac138f4a30edc4f.tar.bz2
scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd
Avoid duplicated code between esp_do_dma and handle_ti. esp_do_dma has the same code that handle_ti contains after the call to esp_do_dma; but the code in handle_ti is never reached because it is in an "else if". Remove the else and also the pointless return. esp_do_dma also has a partially dead assignment of the to_device variable. Sink it to the point where it's actually used. Finally, assert that the other caller of esp_do_dma (esp_transfer_data) only transfers data and not a command. This is true because get_cmd cancels the old request synchronously before its caller handle_satn_stop sets do_cmd to 1. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions