Commit 5af2e382 authored by Bart Van Assche's avatar Bart Van Assche Committed by James Bottomley

sg: remove an unused variable

The 'data_dir' variable is not used in sg_common_write(), hence
remove this variable.
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Acked-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 6636e7f4
...@@ -763,7 +763,7 @@ static int ...@@ -763,7 +763,7 @@ static int
sg_common_write(Sg_fd * sfp, Sg_request * srp, sg_common_write(Sg_fd * sfp, Sg_request * srp,
unsigned char *cmnd, int timeout, int blocking) unsigned char *cmnd, int timeout, int blocking)
{ {
int k, data_dir, at_head; int k, at_head;
Sg_device *sdp = sfp->parentdp; Sg_device *sdp = sfp->parentdp;
sg_io_hdr_t *hp = &srp->header; sg_io_hdr_t *hp = &srp->header;
...@@ -793,21 +793,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, ...@@ -793,21 +793,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
return -ENODEV; return -ENODEV;
} }
switch (hp->dxfer_direction) {
case SG_DXFER_TO_FROM_DEV:
case SG_DXFER_FROM_DEV:
data_dir = DMA_FROM_DEVICE;
break;
case SG_DXFER_TO_DEV:
data_dir = DMA_TO_DEVICE;
break;
case SG_DXFER_UNKNOWN:
data_dir = DMA_BIDIRECTIONAL;
break;
default:
data_dir = DMA_NONE;
break;
}
hp->duration = jiffies_to_msecs(jiffies); hp->duration = jiffies_to_msecs(jiffies);
if (hp->interface_id != '\0' && /* v3 (or later) interface */ if (hp->interface_id != '\0' && /* v3 (or later) interface */
(SG_FLAG_Q_AT_TAIL & hp->flags)) (SG_FLAG_Q_AT_TAIL & hp->flags))
......
Markdown is supported
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