From: Wei Yongjun <weiyj.lk@gmail.com>
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
Date: Thu, 15 Sep 2016 02:27:04 +0000 [thread overview]
Message-ID: <1473906424-3425-1-git-send-email-weiyj.lk@gmail.com> (raw)
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;
next reply other threads:[~2016-09-15 2:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 2:27 Wei Yongjun [this message]
2016-09-15 14:03 ` Stuart Yoder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473906424-3425-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=German.Rivera@freescale.com \
--cc=devel@driverdev.osuosl.org \
--cc=german.rivera@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=itai.katz@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stuart.yoder@nxp.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®