staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD
PATCH 1/1 staging: fsl-mc: use list_del_init instead of list_del/INIT_LIST_HEAD
From: Wei Yongjun <[email protected]>
Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
--- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +2 -4
@@ -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 ;
Quoted 36 lines
-----Original Message-----
From: Wei Yongjun [mailto:[email protected]]
Sent: Wednesday, September 14, 2016 9:27 PM
To: J . German Rivera <[email protected]>; Stuart Yoder <[email protected]>; Greg Kroah- Hartman <[email protected]>; German Rivera <[email protected]>; Itai Katz <[email protected]>
Cc: Wei Yongjun <[email protected]>; [email protected]; [email protected]
Subject: [PATCH -next] staging: fsl-mc: uselist_del_initinstead of list_del/INIT_LIST_HEADFrom: Wei Yongjun <[email protected]>
Using
list_del_init()instead oflist_del()+INIT_LIST_HEAD().Signed-off-by Wei Yongjun <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc- renamed from drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +0
-0
allocator.c
index 2004fa7..1e06d28 100644drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +1
-2@@ -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--;
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus, · line 225
Quoted 9 lines
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c +1
-2@@ -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 ;