[tip:tools/kvm] kvm tools: init: fix usage of hlist iterators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  20488f96af289bd3d735d5ce49091cf50b66a964
Gitweb:     http://git.kernel.org/tip/20488f96af289bd3d735d5ce49091cf50b66a964
Author:     Marc Zyngier <marc.zyngier@xxxxxxx>
AuthorDate: Mon, 4 Mar 2013 06:27:30 +0000
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Wed, 3 Apr 2013 15:54:20 +0300

kvm tools: init: fix usage of hlist iterators

Commit b67bfe0d42ca ("hlist: drop the node parameter from iterators")
incorrectly changed the way that hlist iterators are used.

This patch fixes util/init.c so it passes parameters to the new
iterators in the right manner.

Cc: Sasha Levin <levinsasha928@xxxxxxxxx>
Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
Signed-off-by: Will Deacon <will.deacon@xxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/util/init.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/kvm/util/init.c b/tools/kvm/util/init.c
index 33a5952..d4ce144 100644
--- a/tools/kvm/util/init.c
+++ b/tools/kvm/util/init.c
@@ -33,11 +33,10 @@ int init_list__init(struct kvm *kvm)
 {
 	unsigned int i;
 	int r = 0;
-	struct hlist_node *n;
 	struct init_item *t;
 
 	for (i = 0; i < ARRAY_SIZE(init_lists); i++)
-		hlist_for_each_entry(t, n, &init_lists[i], n) {
+		hlist_for_each_entry(t, &init_lists[i], n) {
 			r = t->init(kvm);
 			if (r < 0) {
 				pr_warning("Failed init: %s\n", t->fn_name);
@@ -53,11 +52,10 @@ int init_list__exit(struct kvm *kvm)
 {
 	int i;
 	int r = 0;
-	struct hlist_node *n;
 	struct init_item *t;
 
 	for (i = ARRAY_SIZE(exit_lists) - 1; i >= 0; i--)
-		hlist_for_each_entry(t, n, &exit_lists[i], n) {
+		hlist_for_each_entry(t, &exit_lists[i], n) {
 			r = t->init(kvm);
 			if (r < 0) {
 				pr_warning("%s failed.\n", t->fn_name);
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux