All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-08-29  1:46 ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-08-29  1:46 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: YueHaibing, linux-can, netdev, kernel-janitors

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

drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
drivers/net/can/usb/ucan.c:1578:21: warning:
 variable 'udev' set but not used [-Wunused-but-set-variable]
  struct usb_device *udev;

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/can/usb/ucan.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
index 0678a38..c9fd83e 100644
--- a/drivers/net/can/usb/ucan.c
+++ b/drivers/net/can/usb/ucan.c
@@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
 /* disconnect the device */
 static void ucan_disconnect(struct usb_interface *intf)
 {
-	struct usb_device *udev;
 	struct ucan_priv *up = usb_get_intfdata(intf);
 
-	udev = interface_to_usbdev(intf);
-
 	usb_set_intfdata(intf, NULL);
 
 	if (up) {

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

* [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-08-29  1:46 ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-08-29  1:46 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: YueHaibing, linux-can, netdev, kernel-janitors

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

drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
drivers/net/can/usb/ucan.c:1578:21: warning:
 variable 'udev' set but not used [-Wunused-but-set-variable]
  struct usb_device *udev;

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/can/usb/ucan.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
index 0678a38..c9fd83e 100644
--- a/drivers/net/can/usb/ucan.c
+++ b/drivers/net/can/usb/ucan.c
@@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
 /* disconnect the device */
 static void ucan_disconnect(struct usb_interface *intf)
 {
-	struct usb_device *udev;
 	struct ucan_priv *up = usb_get_intfdata(intf);
 
-	udev = interface_to_usbdev(intf);
-
 	usb_set_intfdata(intf, NULL);
 
 	if (up) {

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
  2018-08-29  1:46 ` YueHaibing
  (?)
@ 2018-09-10 13:41   ` Martin Elshuber
  -1 siblings, 0 replies; 10+ messages in thread
From: Martin Elshuber @ 2018-09-10 13:41 UTC (permalink / raw)
  Cc: linux-can, netdev, kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 1043 bytes --]

Thank you for the fix

Reviewed-by: Martin Elshuber <martin.elshuber@theobroma-systems.com>

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/can/usb/ucan.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
> index 0678a38..c9fd83e 100644
> --- a/drivers/net/can/usb/ucan.c
> +++ b/drivers/net/can/usb/ucan.c
> @@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
>  /* disconnect the device */
>  static void ucan_disconnect(struct usb_interface *intf)
>  {
> -	struct usb_device *udev;
>  	struct ucan_priv *up = usb_get_intfdata(intf);
>  
> -	udev = interface_to_usbdev(intf);
> -
>  	usb_set_intfdata(intf, NULL);
>  
>  	if (up) {
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-09-10 13:41   ` Martin Elshuber
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Elshuber @ 2018-09-10 13:41 UTC (permalink / raw)
  Cc: linux-can, netdev, kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 1043 bytes --]

Thank you for the fix

Reviewed-by: Martin Elshuber <martin.elshuber@theobroma-systems.com>

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/can/usb/ucan.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
> index 0678a38..c9fd83e 100644
> --- a/drivers/net/can/usb/ucan.c
> +++ b/drivers/net/can/usb/ucan.c
> @@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
>  /* disconnect the device */
>  static void ucan_disconnect(struct usb_interface *intf)
>  {
> -	struct usb_device *udev;
>  	struct ucan_priv *up = usb_get_intfdata(intf);
>  
> -	udev = interface_to_usbdev(intf);
> -
>  	usb_set_intfdata(intf, NULL);
>  
>  	if (up) {
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-09-10 13:41   ` Martin Elshuber
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Elshuber @ 2018-09-10 13:41 UTC (permalink / raw)
  Cc: linux-can, netdev, kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 1043 bytes --]

Thank you for the fix

Reviewed-by: Martin Elshuber <martin.elshuber@theobroma-systems.com>

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/can/usb/ucan.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
> index 0678a38..c9fd83e 100644
> --- a/drivers/net/can/usb/ucan.c
> +++ b/drivers/net/can/usb/ucan.c
> @@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
>  /* disconnect the device */
>  static void ucan_disconnect(struct usb_interface *intf)
>  {
> -	struct usb_device *udev;
>  	struct ucan_priv *up = usb_get_intfdata(intf);
>  
> -	udev = interface_to_usbdev(intf);
> -
>  	usb_set_intfdata(intf, NULL);
>  
>  	if (up) {
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 842 bytes --]

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
  2018-08-29  1:46 ` YueHaibing
  (?)
@ 2018-09-27  9:38   ` YueHaibing
  -1 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-09-27  9:38 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: linux-can, netdev, kernel-janitors

ping.

On 2018/8/29 9:46, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/can/usb/ucan.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
> index 0678a38..c9fd83e 100644
> --- a/drivers/net/can/usb/ucan.c
> +++ b/drivers/net/can/usb/ucan.c
> @@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
>  /* disconnect the device */
>  static void ucan_disconnect(struct usb_interface *intf)
>  {
> -	struct usb_device *udev;
>  	struct ucan_priv *up = usb_get_intfdata(intf);
>  
> -	udev = interface_to_usbdev(intf);
> -
>  	usb_set_intfdata(intf, NULL);
>  
>  	if (up) {
> 
> 
> .
> 

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-09-27  9:38   ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-09-27  9:38 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: linux-can, netdev, kernel-janitors

ping.

On 2018/8/29 9:46, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/can/usb/ucan.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
> index 0678a38..c9fd83e 100644
> --- a/drivers/net/can/usb/ucan.c
> +++ b/drivers/net/can/usb/ucan.c
> @@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
>  /* disconnect the device */
>  static void ucan_disconnect(struct usb_interface *intf)
>  {
> -	struct usb_device *udev;
>  	struct ucan_priv *up = usb_get_intfdata(intf);
>  
> -	udev = interface_to_usbdev(intf);
> -
>  	usb_set_intfdata(intf, NULL);
>  
>  	if (up) {
> 
> 
> .
> 

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-09-27  9:38   ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-09-27  9:38 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: linux-can, netdev, kernel-janitors

ping.

On 2018/8/29 9:46, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/can/usb/ucan.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
> index 0678a38..c9fd83e 100644
> --- a/drivers/net/can/usb/ucan.c
> +++ b/drivers/net/can/usb/ucan.c
> @@ -1575,11 +1575,8 @@ static int ucan_probe(struct usb_interface *intf,
>  /* disconnect the device */
>  static void ucan_disconnect(struct usb_interface *intf)
>  {
> -	struct usb_device *udev;
>  	struct ucan_priv *up = usb_get_intfdata(intf);
>  
> -	udev = interface_to_usbdev(intf);
> -
>  	usb_set_intfdata(intf, NULL);
>  
>  	if (up) {
> 
> 
> .
> 

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
  2018-08-29  1:46 ` YueHaibing
@ 2018-09-27 10:37   ` Marc Kleine-Budde
  -1 siblings, 0 replies; 10+ messages in thread
From: Marc Kleine-Budde @ 2018-09-27 10:37 UTC (permalink / raw)
  To: YueHaibing, Wolfgang Grandegger, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: linux-can, netdev, kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 675 bytes --]

On 08/29/2018 03:46 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to linux-can.

tnx.
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH can-next] can: ucan: remove set but not used variable 'udev'
@ 2018-09-27 10:37   ` Marc Kleine-Budde
  0 siblings, 0 replies; 10+ messages in thread
From: Marc Kleine-Budde @ 2018-09-27 10:37 UTC (permalink / raw)
  To: YueHaibing, Wolfgang Grandegger, David S. Miller,
	Martin Elshuber, Jakob Unterwurzacher, Philipp Tomsich
  Cc: linux-can, netdev, kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 675 bytes --]

On 08/29/2018 03:46 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
> drivers/net/can/usb/ucan.c:1578:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
>   struct usb_device *udev;
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to linux-can.

tnx.
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2018-09-27 15:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29  1:46 [PATCH can-next] can: ucan: remove set but not used variable 'udev' YueHaibing
2018-08-29  1:46 ` YueHaibing
2018-09-10 13:41 ` Martin Elshuber
2018-09-10 13:41   ` Martin Elshuber
2018-09-10 13:41   ` Martin Elshuber
2018-09-27  9:38 ` YueHaibing
2018-09-27  9:38   ` YueHaibing
2018-09-27  9:38   ` YueHaibing
2018-09-27 10:37 ` Marc Kleine-Budde
2018-09-27 10:37   ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.