lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190903120445.22204-1-yuehaibing@huawei.com>
Date:   Tue, 3 Sep 2019 20:04:45 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <gregkh@...uxfoundation.org>, <pawell@...ence.com>,
        <felipe.balbi@...ux.intel.com>, <yuehaibing@...wei.com>
CC:     <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] usb: cdns3: remove set but not used variable 'priv_dev'

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

drivers/usb/cdns3/gadget.c: In function '__cdns3_gadget_init':
drivers/usb/cdns3/gadget.c:2665:23: warning:
 variable 'priv_dev' set but not used [-Wunused-but-set-variable]
drivers/usb/cdns3/gadget.c: In function cdns3_start_all_request:
drivers/usb/cdns3/gadget.c:357:24: warning:
 variable priv_req set but not used [-Wunused-but-set-variable]

They are never used, so can be removed.

Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 drivers/usb/cdns3/gadget.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 3094ad6..ddac638 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -354,13 +354,11 @@ enum usb_device_speed cdns3_get_speed(struct cdns3_device *priv_dev)
 static int cdns3_start_all_request(struct cdns3_device *priv_dev,
 				   struct cdns3_endpoint *priv_ep)
 {
-	struct cdns3_request *priv_req;
 	struct usb_request *request;
 	int ret = 0;
 
 	while (!list_empty(&priv_ep->deferred_req_list)) {
 		request = cdns3_next_request(&priv_ep->deferred_req_list);
-		priv_req = to_cdns3_request(request);
 
 		ret = cdns3_ep_run_transfer(priv_ep, request);
 		if (ret)
@@ -2664,7 +2662,6 @@ static int cdns3_gadget_start(struct cdns3 *cdns)
 
 static int __cdns3_gadget_init(struct cdns3 *cdns)
 {
-	struct cdns3_device *priv_dev;
 	int ret = 0;
 
 	cdns3_drd_switch_gadget(cdns, 1);
@@ -2674,8 +2671,6 @@ static int __cdns3_gadget_init(struct cdns3 *cdns)
 	if (ret)
 		return ret;
 
-	priv_dev = cdns->gadget_dev;
-
 	/*
 	 * Because interrupt line can be shared with other components in
 	 * driver it can't use IRQF_ONESHOT flag here.
-- 
2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ