All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: hso: remove redundant unused variable dev
@ 2017-10-31 12:01 Colin King
  2017-10-31 13:22   ` Johan Hovold
  2017-11-01 12:24   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Colin King @ 2017-10-31 12:01 UTC (permalink / raw)
  To: David S . Miller, Johan Hovold, linux-usb, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The pointer dev is being assigned but is never used, hence it is
redundant and can be removed. Cleans up clang warning:

drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is
never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/usb/hso.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index d7a3379ea668..42d7edcc3106 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2263,7 +2263,6 @@ static void hso_serial_common_free(struct hso_serial *serial)
 static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,
 				    int rx_size, int tx_size)
 {
-	struct device *dev;
 	int minor;
 	int i;
 
@@ -2277,7 +2276,6 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,
 	serial->parent->dev = tty_port_register_device_attr(&serial->port,
 			tty_drv, minor, &serial->parent->interface->dev,
 			serial->parent, hso_serial_dev_groups);
-	dev = serial->parent->dev;
 
 	/* fill in specific data for later use */
 	serial->minor = minor;
-- 
2.14.1

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

* Re: [PATCH] net: hso: remove redundant unused variable dev
  2017-10-31 12:01 [PATCH] net: hso: remove redundant unused variable dev Colin King
@ 2017-10-31 13:22   ` Johan Hovold
  2017-11-01 12:24   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2017-10-31 13:22 UTC (permalink / raw)
  To: Colin King
  Cc: David S . Miller, Johan Hovold, linux-usb, netdev,
	kernel-janitors, linux-kernel

On Tue, Oct 31, 2017 at 12:01:47PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer dev is being assigned but is never used, hence it is
> redundant and can be removed. Cleans up clang warning:
> 
> drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is
> never read

You could also have mentioned that it was a leftover since commit
4134069f3ea6 ("hso: Use static attribute groups for sysfs entry").

> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Johan Hovold <johan@kernel.org>

Thanks,
Johan

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

* Re: [PATCH] net: hso: remove redundant unused variable dev
@ 2017-10-31 13:22   ` Johan Hovold
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2017-10-31 13:22 UTC (permalink / raw)
  To: Colin King
  Cc: David S . Miller, Johan Hovold, linux-usb, netdev,
	kernel-janitors, linux-kernel

On Tue, Oct 31, 2017 at 12:01:47PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer dev is being assigned but is never used, hence it is
> redundant and can be removed. Cleans up clang warning:
> 
> drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is
> never read

You could also have mentioned that it was a leftover since commit
4134069f3ea6 ("hso: Use static attribute groups for sysfs entry").

> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Johan Hovold <johan@kernel.org>

Thanks,
Johan

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

* Re: [PATCH] net: hso: remove redundant unused variable dev
  2017-10-31 12:01 [PATCH] net: hso: remove redundant unused variable dev Colin King
@ 2017-11-01 12:24   ` David Miller
  2017-11-01 12:24   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2017-11-01 12:24 UTC (permalink / raw)
  To: colin.king; +Cc: johan, linux-usb, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Tue, 31 Oct 2017 12:01:47 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer dev is being assigned but is never used, hence it is
> redundant and can be removed. Cleans up clang warning:
> 
> drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is
> never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

* Re: [PATCH] net: hso: remove redundant unused variable dev
@ 2017-11-01 12:24   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-11-01 12:24 UTC (permalink / raw)
  To: colin.king; +Cc: johan, linux-usb, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Tue, 31 Oct 2017 12:01:47 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer dev is being assigned but is never used, hence it is
> redundant and can be removed. Cleans up clang warning:
> 
> drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is
> never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2017-11-01 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 12:01 [PATCH] net: hso: remove redundant unused variable dev Colin King
2017-10-31 13:22 ` Johan Hovold
2017-10-31 13:22   ` Johan Hovold
2017-11-01 12:24 ` David Miller
2017-11-01 12:24   ` David Miller

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.