All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: remove redundant put_device
@ 2018-09-06  6:33 Ding Xiang
  0 siblings, 0 replies; 3+ messages in thread
From: Ding Xiang @ 2018-09-06  6:33 UTC (permalink / raw)
  To: boris.ostrovsky, jgross, xen-devel, linux-kernel

device_unregister will put device, do not need to do it one more time

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
 drivers/xen/xenbus/xenbus_probe.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 5b47188..cfaa878 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -369,7 +369,6 @@ static void xenbus_cleanup_devices(const char *path, struct bus_type *bus)
 		bus_for_each_dev(bus, NULL, &info, cleanup_dev);
 		if (info.dev) {
 			device_unregister(&info.dev->dev);
-			put_device(&info.dev->dev);
 		}
 	} while (info.dev);
 }
-- 
1.9.1




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] xen: remove redundant put_device
  2018-09-06  6:33 Ding Xiang
@ 2018-09-06  9:47 ` Wei Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2018-09-06  9:47 UTC (permalink / raw)
  To: Ding Xiang; +Cc: jgross, xen-devel, boris.ostrovsky, Wei Liu, linux-kernel

On Thu, Sep 06, 2018 at 02:33:10PM +0800, Ding Xiang wrote:
> device_unregister will put device, do not need to do it one more time
> 
> Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
> ---
>  drivers/xen/xenbus/xenbus_probe.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
> index 5b47188..cfaa878 100644
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -369,7 +369,6 @@ static void xenbus_cleanup_devices(const char *path, struct bus_type *bus)
>  		bus_for_each_dev(bus, NULL, &info, cleanup_dev);
>  		if (info.dev) {
>  			device_unregister(&info.dev->dev);
> -			put_device(&info.dev->dev);

This is to match the get_device call in cleanup_dev. It is not redundant
IMHO.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [PATCH] xen: remove redundant put_device
@ 2018-09-06  6:33 Ding Xiang
  2018-09-06  9:47 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Ding Xiang @ 2018-09-06  6:33 UTC (permalink / raw)
  To: boris.ostrovsky, jgross, xen-devel, linux-kernel

device_unregister will put device, do not need to do it one more time

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
 drivers/xen/xenbus/xenbus_probe.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 5b47188..cfaa878 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -369,7 +369,6 @@ static void xenbus_cleanup_devices(const char *path, struct bus_type *bus)
 		bus_for_each_dev(bus, NULL, &info, cleanup_dev);
 		if (info.dev) {
 			device_unregister(&info.dev->dev);
-			put_device(&info.dev->dev);
 		}
 	} while (info.dev);
 }
-- 
1.9.1




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

end of thread, other threads:[~2018-09-06  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-06  6:33 [PATCH] xen: remove redundant put_device Ding Xiang
2018-09-06  6:33 Ding Xiang
2018-09-06  9:47 ` Wei Liu

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.