public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] typeof() not supported in Windows WDK compiler
@ 2009-10-01 22:41 Stan C. Smith
  2009-10-01 22:59 ` Sean Hefty
  0 siblings, 1 reply; 8+ messages in thread
From: Stan C. Smith @ 2009-10-01 22:41 UTC (permalink / raw)
  To: 'Sasha Khapyorsky'; +Cc: ofw, 'linux-rdma'


Added Obj TypeOf argument to the Windows version of cl_item_obj() macro to compensate for missing typeof() operator.

Signed-off-by: stan smith <stan.smith@intel.com>

diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index 4f98cc9..8fe5129 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -209,8 +209,13 @@ static void drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 	drop_mgr_clean_physp(sm, p_port->p_physp);
 
 	while (!cl_is_qlist_empty(&p_port->mcm_list)) {
+#ifndef __WIN__
 		mcm_port = cl_item_obj(cl_qlist_head(&p_port->mcm_list),
 				       mcm_port, list_item);
+#else
+		mcm_port = cl_item_obj(cl_qlist_head(&p_port->mcm_list),
+				       mcm_port, list_item, (osm_mcm_port_t*) );
+#endif
 		osm_mgrp_delete_port(sm->p_subn, sm->p_log, mcm_port->mgrp,
 				     p_port->guid);
 	}
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index 185c700..a260b8a 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -503,7 +503,11 @@ Exit:
 static void query_sm_info(cl_map_item_t * item, void *cxt)
 {
 	osm_madw_context_t context;
+#ifndef __WIN__
 	osm_remote_sm_t *r_sm = cl_item_obj(item, r_sm, map_item);
+#else
+	osm_remote_sm_t *r_sm = cl_item_obj(item, r_sm, map_item,(osm_remote_sm_t *));
+#endif
 	osm_sm_t *sm = cxt;
 	ib_api_status_t ret;
 
diff --git a/opensm/opensm/osm_ucast_mgr.c b/opensm/opensm/osm_ucast_mgr.c
index 39d825c..a1f5c72 100644
--- a/opensm/opensm/osm_ucast_mgr.c
+++ b/opensm/opensm/osm_ucast_mgr.c
@@ -388,7 +388,11 @@ static void ucast_mgr_process_tbl(IN cl_map_item_t * p_map_item,
 		cl_list_item_t *item;
 		for (item = cl_qlist_head(list); item != cl_qlist_end(list);
 		     item = cl_qlist_next(item)) {
+#ifndef __WIN__
 			osm_port_t *port = cl_item_obj(item, port, list_item);
+#else
+			osm_port_t *port = cl_item_obj(item, port, list_item,(osm_port_t*));
+#endif
 			ucast_mgr_process_port(p_mgr, p_sw, port, i);
 		}
 	}

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-10-02 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 22:41 [PATCH] typeof() not supported in Windows WDK compiler Stan C. Smith
2009-10-01 22:59 ` Sean Hefty
2009-10-01 23:14   ` Smith, Stan
2009-10-01 23:38     ` Sean Hefty
     [not found]   ` <2A3759D0AB7F46D59DF8820EFCFAF1F8-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-10-01 23:47     ` [ofw] " Jason Gunthorpe
     [not found]       ` <20091001234701.GD5191-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-10-02  0:29         ` Smith, Stan
     [not found]           ` <3F6F638B8D880340AB536D29CD4C1E1912C86E8C4A-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2009-10-02  2:04             ` Jason Gunthorpe
2009-10-02 16:02         ` Smith, Stan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox