Re: [PATCH] IB/srpt: Convert use of __constant_cpu_to_beXX to cpu_to_beXX

2015-06-23 Thread Bart Van Assche
On 06/22/15 21:41, Vaishali Thakkar wrote: if (!slot || slot > 16) { mad->mad_hdr.status - = __constant_cpu_to_be16(DM_MAD_STATUS_INVALID_FIELD); + = cpu_to_be16(DM_MAD_STATUS_INVALID_FIELD); return; } W

[PATCH] IB/srpt: Convert use of __constant_cpu_to_beXX to cpu_to_beXX

2015-06-22 Thread Vaishali Thakkar
In little endian cases, the macro cpu_to_be{16,32,64} unfolds to __swab{16,32,64} which provides special case for constants. In big endian cases, __constant_cpu_to_be{16,32,64} and cpu_to_be{16,32,64} expand directly to the same expression. So, replace __constant_cpu_to_be{16,32,64} with cpu_to_be{