Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] usb: gadget: Remove set but not used variable 'opts'
@ 2019-10-09  8:40 zhengbin
  2019-10-09  8:40 ` [PATCH 1/2] usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config zhengbin
  2019-10-09  8:40 ` [PATCH 2/2] usb: gadget: Remove set but not used variable 'opts' in msg_do_config zhengbin
  0 siblings, 2 replies; 3+ messages in thread
From: zhengbin @ 2019-10-09  8:40 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb; +Cc: zhengbin13

zhengbin (2):
  usb: gadget: Remove set but not used variable 'opts' in
    acm_ms_do_config
  usb: gadget: Remove set but not used variable 'opts' in msg_do_config

 drivers/usb/gadget/legacy/acm_ms.c       | 3 ---
 drivers/usb/gadget/legacy/mass_storage.c | 3 ---
 2 files changed, 6 deletions(-)

--
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config
  2019-10-09  8:40 [PATCH 0/2] usb: gadget: Remove set but not used variable 'opts' zhengbin
@ 2019-10-09  8:40 ` zhengbin
  2019-10-09  8:40 ` [PATCH 2/2] usb: gadget: Remove set but not used variable 'opts' in msg_do_config zhengbin
  1 sibling, 0 replies; 3+ messages in thread
From: zhengbin @ 2019-10-09  8:40 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb; +Cc: zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/gadget/legacy/acm_ms.c: In function acm_ms_do_config:
drivers/usb/gadget/legacy/acm_ms.c:108:19: warning: variable opts set but not used [-Wunused-but-set-variable]

It is not used since commit f78bbcae86e6 ("usb: f_mass_storage:
test whether thread is running before starting another")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/usb/gadget/legacy/acm_ms.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/gadget/legacy/acm_ms.c b/drivers/usb/gadget/legacy/acm_ms.c
index af16672..59be2d8 100644
--- a/drivers/usb/gadget/legacy/acm_ms.c
+++ b/drivers/usb/gadget/legacy/acm_ms.c
@@ -105,7 +105,6 @@ static struct usb_function *f_msg;
  */
 static int acm_ms_do_config(struct usb_configuration *c)
 {
-	struct fsg_opts *opts;
 	int	status;

 	if (gadget_is_otg(c->cdev->gadget)) {
@@ -113,8 +112,6 @@ static int acm_ms_do_config(struct usb_configuration *c)
 		c->bmAttributes |= USB_CONFIG_ATT_WAKEUP;
 	}

-	opts = fsg_opts_from_func_inst(fi_msg);
-
 	f_acm = usb_get_function(f_acm_inst);
 	if (IS_ERR(f_acm))
 		return PTR_ERR(f_acm);
--
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] usb: gadget: Remove set but not used variable 'opts' in msg_do_config
  2019-10-09  8:40 [PATCH 0/2] usb: gadget: Remove set but not used variable 'opts' zhengbin
  2019-10-09  8:40 ` [PATCH 1/2] usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config zhengbin
@ 2019-10-09  8:40 ` zhengbin
  1 sibling, 0 replies; 3+ messages in thread
From: zhengbin @ 2019-10-09  8:40 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb; +Cc: zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/gadget/legacy/mass_storage.c: In function msg_do_config:
drivers/usb/gadget/legacy/mass_storage.c:108:19: warning: variable opts set but not used [-Wunused-but-set-variable]

It is not used since commit f78bbcae86e6 ("usb: f_mass_storage:
test whether thread is running before starting another")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/usb/gadget/legacy/mass_storage.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/gadget/legacy/mass_storage.c b/drivers/usb/gadget/legacy/mass_storage.c
index fd5595a..f18f775 100644
--- a/drivers/usb/gadget/legacy/mass_storage.c
+++ b/drivers/usb/gadget/legacy/mass_storage.c
@@ -105,7 +105,6 @@ FSG_MODULE_PARAMETERS(/* no prefix */, mod_data);

 static int msg_do_config(struct usb_configuration *c)
 {
-	struct fsg_opts *opts;
 	int ret;

 	if (gadget_is_otg(c->cdev->gadget)) {
@@ -113,8 +112,6 @@ static int msg_do_config(struct usb_configuration *c)
 		c->bmAttributes |= USB_CONFIG_ATT_WAKEUP;
 	}

-	opts = fsg_opts_from_func_inst(fi_msg);
-
 	f_msg = usb_get_function(fi_msg);
 	if (IS_ERR(f_msg))
 		return PTR_ERR(f_msg);
--
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09  8:40 [PATCH 0/2] usb: gadget: Remove set but not used variable 'opts' zhengbin
2019-10-09  8:40 ` [PATCH 1/2] usb: gadget: Remove set but not used variable 'opts' in acm_ms_do_config zhengbin
2019-10-09  8:40 ` [PATCH 2/2] usb: gadget: Remove set but not used variable 'opts' in msg_do_config zhengbin

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git