summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-01-05 14:46:03 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2016-01-07 13:57:53 -0800
commit10c17c682691271777809373d9daaedd5810409e (patch)
tree3dc228a1c80f25cd949c1cf91b31c869f4ea2c14 /drivers
parentdba5ccc7a67713fccb7726057d8df826672a7257 (diff)
usb/gadget: Remove set-but-not-used variables
Avoid that building with W=1 triggers compiler warnings about set-but-not-used variables. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Andy Grover <agrover@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/function/f_tcm.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
index ec8287a3a9da..bad007b5a190 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -82,18 +82,9 @@ static void bot_enqueue_sense_code(struct f_uas *fu, struct usbg_cmd *cmd)
{
struct bulk_cs_wrap *csw = &fu->bot_status.csw;
int ret;
- u8 *sense;
unsigned int csw_stat;
csw_stat = cmd->csw_code;
-
- /*
- * We can't send SENSE as a response. So we take ASC & ASCQ from our
- * sense buffer and queue it and hope the host sends a REQUEST_SENSE
- * command where it learns why we failed.
- */
- sense = cmd->sense_iu.sense;
-
csw->Tag = cmd->bot_tag;
csw->Status = csw_stat;
fu->bot_status.req->context = cmd;
@@ -1088,7 +1079,6 @@ static int usbg_submit_command(struct f_uas *fu,
struct command_iu *cmd_iu = cmdbuf;
struct usbg_cmd *cmd;
struct usbg_tpg *tpg;
- struct se_cmd *se_cmd;
struct tcm_usbg_nexus *tv_nexus;
u32 cmd_len;
@@ -1151,7 +1141,6 @@ static int usbg_submit_command(struct f_uas *fu,
break;
}
- se_cmd = &cmd->se_cmd;
cmd->unpacked_lun = scsilun_to_int(&cmd_iu->lun);
INIT_WORK(&cmd->work, usbg_cmd_work);
@@ -1202,7 +1191,6 @@ static int bot_submit_command(struct f_uas *fu,
struct bulk_cb_wrap *cbw = cmdbuf;
struct usbg_cmd *cmd;
struct usbg_tpg *tpg;
- struct se_cmd *se_cmd;
struct tcm_usbg_nexus *tv_nexus;
u32 cmd_len;
@@ -1242,7 +1230,6 @@ static int bot_submit_command(struct f_uas *fu,
}
cmd->prio_attr = TCM_SIMPLE_TAG;
- se_cmd = &cmd->se_cmd;
cmd->unpacked_lun = cbw->Lun;
cmd->is_read = cbw->Flags & US_BULK_FLAG_IN ? 1 : 0;
cmd->data_len = le32_to_cpu(cbw->DataTransferLength);
@@ -2335,7 +2322,6 @@ static void tcm_unbind(struct usb_configuration *c, struct usb_function *f)
static struct usb_function *tcm_alloc(struct usb_function_instance *fi)
{
struct f_uas *fu;
- struct f_tcm_opts *opts;
unsigned i;
mutex_lock(&tpg_instances_lock);
@@ -2347,8 +2333,6 @@ static struct usb_function *tcm_alloc(struct usb_function_instance *fi)
return ERR_PTR(-ENODEV);
}
- opts = container_of(fi, struct f_tcm_opts, func_inst);
-
fu = kzalloc(sizeof(*fu), GFP_KERNEL);
if (!fu) {
mutex_unlock(&tpg_instances_lock);