[openib-general] [PATCH] AT: cleanup some sparse warnings
Sean Hefty
mshefty at ichips.intel.com
Thu Jul 28 14:27:52 PDT 2005
Tom Duffy wrote:
>>> #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 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
The change is fine. My comments were relative to the code itself, and not
this specific change. Sorry about the confusion. I would write the first
change as:
#define IB_ATS_SERVICE_ID __constant_cpu_to_be64(0x10000ce100415453ULL)
(And so on for the others.) I'm not sure which call is preferred, but if I
remember correctly, I had compile issues trying to use #define labels in
case statements that went to cpu_to_be*, rather than __constant_cpu_to_be*.
- Sean
More information about the general
mailing list