[openib-general] [PATCH] AT: cleanup some sparse warnings

Tom Duffy tduffy at sun.com
Thu Jul 28 14:10:30 PDT 2005


On Thu, 2005-07-28 at 13:59 -0700, Sean Hefty wrote:
> Tom Duffy wrote:
> > This patch cleans up a few sparse warnings in AT.
> >  
> > Index: linux-2.6.13-rc3-openib/drivers/infiniband/core/at_priv.h
> >  
> >  #define IB_ATS_SERVICE_NAME             "DAPL Address Translation Service"
> > -#define IB_ATS_SERVICE_ID               cpu_to_be64(0x10000ce100415453)
> > -#define IB_ATS_LAST_SERVICE_ID          cpu_to_be64(0x10000ce1ff415453)
> > +#define IB_ATS_SERVICE_ID               cpu_to_be64(0x10000ce100415453ULL)
> > +#define IB_ATS_LAST_SERVICE_ID          cpu_to_be64(0x10000ce1ff415453ULL)
> >  #define IB_ATS_OPENIB_MAGIC_KEY         cpu_to_be16(IB_OPENIB_OUI & 0xffff)
> 
> I usually use __constant_cpu_to_be* to byte swap constants.  (I think I did 
> it to allow the use of the #define in case statements.)

I am not sure what you are getting at.  This patch corrects the error:

drivers/infiniband/core/at.c:102:12: warning: constant 0x10000ce100415453 is so big it is long

-tduffy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050728/042c149b/attachment.sig>


More information about the general mailing list