* [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD
@ 2016-09-15 2:27 Wei Yongjun
2016-09-15 14:03 ` Stuart Yoder
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-09-15 2:27 UTC (permalink / raw)
To: J . German Rivera, Stuart Yoder, Greg Kroah-Hartman,
German Rivera, Itai Katz
Cc: Wei Yongjun, linux-kernel, devel
From: Wei Yongjun <weiyongjun1@huawei.com>
Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
index 2004fa7..1e06d28 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
@@ -142,8 +142,7 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device
goto out_unlock;
}
- list_del(&resource->node);
- INIT_LIST_HEAD(&resource->node);
+ list_del_init(&resource->node);
res_pool->free_count--;
res_pool->max_count--;
@@ -220,8 +219,7 @@ int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
res_pool->free_count > res_pool->max_count))
goto out_unlock;
- list_del(&resource->node);
- INIT_LIST_HEAD(&resource->node);
+ list_del_init(&resource->node);
res_pool->free_count--;
error = 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD
2016-09-15 2:27 [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD Wei Yongjun
@ 2016-09-15 14:03 ` Stuart Yoder
0 siblings, 0 replies; 2+ messages in thread
From: Stuart Yoder @ 2016-09-15 14:03 UTC (permalink / raw)
To: Wei Yongjun, J . German Rivera, Greg Kroah-Hartman,
German Rivera, Itai Katz
Cc: Wei Yongjun, linux-kernel, devel
> -----Original Message-----
> From: Wei Yongjun [mailto:weiyj.lk@gmail.com]
> Sent: Wednesday, September 14, 2016 9:27 PM
> To: J . German Rivera <German.Rivera@freescale.com>; Stuart Yoder <stuart.yoder@nxp.com>; Greg Kroah-
> Hartman <gregkh@linuxfoundation.org>; German Rivera <german.rivera@nxp.com>; Itai Katz
> <itai.katz@nxp.com>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; linux-kernel@vger.kernel.org; devel@driverdev.osuosl.org
> Subject: [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD
>
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-
> allocator.c
> index 2004fa7..1e06d28 100644
> --- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
> +++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
> @@ -142,8 +142,7 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device
> goto out_unlock;
> }
>
> - list_del(&resource->node);
> - INIT_LIST_HEAD(&resource->node);
> + list_del_init(&resource->node);
> res_pool->free_count--;
> res_pool->max_count--;
>
> @@ -220,8 +219,7 @@ int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
> res_pool->free_count > res_pool->max_count))
> goto out_unlock;
>
> - list_del(&resource->node);
> - INIT_LIST_HEAD(&resource->node);
> + list_del_init(&resource->node);
>
> res_pool->free_count--;
> error = 0;
Acked-by: Stuart Yoder <stuart.yoder@nxp.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-15 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 2:27 [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD Wei Yongjun
2016-09-15 14:03 ` Stuart Yoder
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.