Re: [PATCH 07/21] usb/gadget: Remove set-but-not-used variables

2015-11-16 Thread Felipe Balbi
Christoph Hellwig  writes:
> On Thu, Oct 22, 2015 at 03:55:45PM -0700, Bart Van Assche wrote:
>> Avoid that building with W=1 triggers compiler warnings about
>> set-but-not-used variables.
>
> Looks good,
>
> Reviewed-by: Christoph Hellwig 

should I take this patch or will it go through Target ?

-- 
balbi


signature.asc
Description: PGP signature


[PATCH 07/21] usb/gadget: Remove set-but-not-used variables

2015-10-22 Thread Bart Van Assche
Avoid that building with W=1 triggers compiler warnings about
set-but-not-used variables.

Signed-off-by: Bart Van Assche 
Acked-by: Felipe Balbi 
Reviewed-by: Andy Grover 
Cc: Christoph Hellwig 
Cc: Hannes Reinecke 
---
 drivers/usb/gadget/legacy/tcm_usb_gadget.c | 13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c 
b/drivers/usb/gadget/legacy/tcm_usb_gadget.c
index 33833fe..ddef0c5 100644
--- a/drivers/usb/gadget/legacy/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/legacy/tcm_usb_gadget.c
@@ -71,18 +71,9 @@ static void bot_enqueue_sense_code(struct f_uas *fu, struct 
usbg_cmd *cmd)
 {
struct bulk_cs_wrap *csw = >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;
@@ -1078,7 +1069,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;
int ret;
@@ -1142,7 +1132,6 @@ static int usbg_submit_command(struct f_uas *fu,
break;
}
 
-   se_cmd = >se_cmd;
cmd->unpacked_lun = scsilun_to_int(_iu->lun);
 
INIT_WORK(>work, usbg_cmd_work);
@@ -1195,7 +1184,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;
int ret;
@@ -1236,7 +1224,6 @@ static int bot_submit_command(struct f_uas *fu,
}
 
cmd->prio_attr = TCM_SIMPLE_TAG;
-   se_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);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/21] usb/gadget: Remove set-but-not-used variables

2015-10-22 Thread Christoph Hellwig
On Thu, Oct 22, 2015 at 03:55:45PM -0700, Bart Van Assche wrote:
> Avoid that building with W=1 triggers compiler warnings about
> set-but-not-used variables.

Looks good,

Reviewed-by: Christoph Hellwig 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html