aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-06-24 10:12:13 +0530
committerDoug Ledford <dledford@redhat.com>2015-07-14 13:20:09 -0400
commitb356c1c1f90a347b6f67d9272dda7ecf47e0b46c (patch)
tree3de425b80bc6a68d7924ca01ac385462733e34a5 /include
parent3b8ab700af0a5c5e59c833f8a88f94b97499f5e5 (diff)
IB/srpt: Convert use of __constant_cpu_to_beXX to cpu_to_beXX
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{16,32,64} with the goal of getting rid of the definitions of __constant_cpu_to_be{16,32,64} completely. The Coccinelle semantic patch that performs this transformation is as follows: @@expression x;@@ ( - __constant_cpu_to_be16(x) + cpu_to_be16(x) | - __constant_cpu_to_be32(x) + cpu_to_be32(x) | - __constant_cpu_to_be64(x) + cpu_to_be64(x) ) Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions