From: Hank Janssen <hjanssen@microsoft.com>
To: hjanssen@microsoft.com, haiyangz@microsoft.com, gregkh@suse.de,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
virtualization@lists.osdl.org
Cc: Abhishek Kane <v-abkane@microsoft.com>,
"K.Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH] Staging: hv: Use list_entry for msg_info and remove associated comment
Date: Mon, 14 Feb 2011 10:35:37 -0800 [thread overview]
Message-ID: <1297708537-15981-1-git-send-email-hjanssen@microsoft.com> (raw)
Change code to use list_entry api. And removed comment
suggesting that change.
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: K.Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/channel_mgmt.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index a9c9d49..6c497e9 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -580,8 +580,9 @@ static void vmbus_onopen_result(struct vmbus_channel_message_header *hdr)
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &vmbus_connection.chn_msg_list) {
-/* FIXME: this should probably use list_entry() instead */
- msginfo = (struct vmbus_channel_msginfo *)curr;
+ msginfo = list_entry(curr, struct vmbus_channel_msginfo,
+ msglistentry);
+
requestheader =
(struct vmbus_channel_message_header *)msginfo->msg;
@@ -628,8 +629,8 @@ static void vmbus_ongpadl_created(struct vmbus_channel_message_header *hdr)
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &vmbus_connection.chn_msg_list) {
-/* FIXME: this should probably use list_entry() instead */
- msginfo = (struct vmbus_channel_msginfo *)curr;
+ msginfo = list_entry(curr, struct vmbus_channel_msginfo,
+ msglistentry);
requestheader =
(struct vmbus_channel_message_header *)msginfo->msg;
@@ -676,8 +677,8 @@ static void vmbus_ongpadl_torndown(
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &vmbus_connection.chn_msg_list) {
-/* FIXME: this should probably use list_entry() instead */
- msginfo = (struct vmbus_channel_msginfo *)curr;
+ msginfo = list_entry(curr, struct vmbus_channel_msginfo,
+ msglistentry);
requestheader =
(struct vmbus_channel_message_header *)msginfo->msg;
@@ -718,8 +719,8 @@ static void vmbus_onversion_response(
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_for_each(curr, &vmbus_connection.chn_msg_list) {
-/* FIXME: this should probably use list_entry() instead */
- msginfo = (struct vmbus_channel_msginfo *)curr;
+ msginfo = list_entry(curr, struct vmbus_channel_msginfo,
+ msglistentry);
requestheader =
(struct vmbus_channel_message_header *)msginfo->msg;
--
1.6.0.2
next reply other threads:[~2011-02-14 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 18:35 Hank Janssen [this message]
2011-02-14 18:33 ` Greg KH
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=1297708537-15981-1-git-send-email-hjanssen@microsoft.com \
--to=hjanssen@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=v-abkane@microsoft.com \
--cc=virtualization@lists.osdl.org \
/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®