aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-01-30 10:22:38 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:44 -0500
commit5af2e38242f87231244393e69beca7284e70056f (patch)
tree73921b1991670b49fa4a0e2cc92b9521df65cb49 /drivers/scsi
parent6636e7f455b33b957c5ee016daa6de46148026ab (diff)
sg: remove an unused variable
The 'data_dir' variable is not used in sg_common_write(), hence remove this variable. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sg.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index b14f64cb9724..a668c88ea150 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -763,7 +763,7 @@ static int
763sg_common_write(Sg_fd * sfp, Sg_request * srp, 763sg_common_write(Sg_fd * sfp, Sg_request * srp,
764 unsigned char *cmnd, int timeout, int blocking) 764 unsigned char *cmnd, int timeout, int blocking)
765{ 765{
766 int k, data_dir, at_head; 766 int k, at_head;
767 Sg_device *sdp = sfp->parentdp; 767 Sg_device *sdp = sfp->parentdp;
768 sg_io_hdr_t *hp = &srp->header; 768 sg_io_hdr_t *hp = &srp->header;
769 769
@@ -793,21 +793,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
793 return -ENODEV; 793 return -ENODEV;
794 } 794 }
795 795
796 switch (hp->dxfer_direction) {
797 case SG_DXFER_TO_FROM_DEV:
798 case SG_DXFER_FROM_DEV:
799 data_dir = DMA_FROM_DEVICE;
800 break;
801 case SG_DXFER_TO_DEV:
802 data_dir = DMA_TO_DEVICE;
803 break;
804 case SG_DXFER_UNKNOWN:
805 data_dir = DMA_BIDIRECTIONAL;
806 break;
807 default:
808 data_dir = DMA_NONE;
809 break;
810 }
811 hp->duration = jiffies_to_msecs(jiffies); 796 hp->duration = jiffies_to_msecs(jiffies);
812 if (hp->interface_id != '\0' && /* v3 (or later) interface */ 797 if (hp->interface_id != '\0' && /* v3 (or later) interface */
813 (SG_FLAG_Q_AT_TAIL & hp->flags)) 798 (SG_FLAG_Q_AT_TAIL & hp->flags))