Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1483830
| From | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD |
| Date | 2016-09-15 04:30 +0200 |
| Message-ID | <shuB4-Wi-17@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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;
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD Wei Yongjun <weiyj.lk@gmail.com> - 2016-09-15 04:30 +0200 RE: [PATCH -next] staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD Stuart Yoder <stuart.yoder@nxp.com> - 2016-09-15 17:40 +0200
csiph-web