public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Sean Hefty" <sean.hefty@intel.com>
To: "Smith, Stan" <stan.smith@intel.com>,
	'Sasha Khapyorsky' <sashak@voltaire.com>
Cc: ofw@lists.openfabrics.org, 'linux-rdma' <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH] typeof() not supported in Windows WDK compiler
Date: Thu, 1 Oct 2009 16:38:02 -0700	[thread overview]
Message-ID: <9CD09AF98FCB471DB0AF4DAFF97A2434@amr.corp.intel.com> (raw)
In-Reply-To: <3F6F638B8D880340AB536D29CD4C1E1912C86E8BB5@orsmsx501.amr.corp.intel.com>

>>> 	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
>>
>> I'd find this more readable if it were #ifdef rather than #ifndef.
>
>So would I, although the convention is to only define something extra for
>Windows.
>Perhaps a gcc/cpp defined item could be recommended and agreed upon?
>
>>
>> That said, I've got to believe that there's a better way to handle
>> these changes.  I just don't know what it is.
>
>Agreed, I'm listening.

How about replacing cl_item_obj with something more common, like container_of()?

  reply	other threads:[~2009-10-01 23:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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

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=9CD09AF98FCB471DB0AF4DAFF97A2434@amr.corp.intel.com \
    --to=sean.hefty@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ofw@lists.openfabrics.org \
    --cc=sashak@voltaire.com \
    --cc=stan.smith@intel.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