[ofw] RE: [PATCH] osm_subnet.c

Smith, Stan stan.smith at intel.com
Mon Oct 5 09:09:51 PDT 2009


Sasha Khapyorsky wrote:
> Hi Stan,
>
> On 14:35 Thu 01 Oct     , Smith, Stan wrote:
>>
>> Set function return type to match that of cl_pfn_fmap_cmp_t to align
>> with how the function is invoked.
>>
>> Signed-off-by: stan smith <stan.smith at intel.com>
>>
>> --- a/opensm/opensm/osm_subnet.c        2009-10-01
>> 12:45:52.000000000 -0700 +++ b/opensm/opensm/osm_subnet.c
>> 2009-10-01 14:24:18.000000000 -0700 @@ -397,7 +397,7 @@
>>
>>  /**********************************************************************
>>
>> **********************************************************************/
>> -static long compar_mgids(const void *m1, const void *m2) +static
>> intn_t compar_mgids(const void *m1, const void *m2)
>
> Any disagreement about changing a prototype of this method
> (cl_pfn_fmap_cmp_t) in complib to use standard type (long) instead of
> "homemade" and less clear one ('intn_t')?
>
> Sasha
>
>>  {
>>         return memcmp(m1, m2, sizeof(ib_gid_t));
>>  }

How is the processor architecture 'natural' size intn_t less clear than 'long'?
In some worlds sizeof(long) != sizeof(void*).

I would prefer leaving the definition as intn_t as that's the way it has been defined for 'years' (think application code not necessarily OFED) which is coded to the intn_t definition.
In the Windows world, cl_fleximap.h is not just an OpenSM utilized file, more like something that would live in /usr/include.




More information about the ofw mailing list