Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

IB/ipath: Convert use of __constant_<foo> to <foo>

In little endian cases, the macros be16_to_cpu and cpu_to_be64
unfolds to __swab{16,64} which provides special case for constants.
In big endian cases, __constant_be16_to_cpu and be16_to_cpu
expand directly to the same expression. The same applies for
__constant_cpu_to_be64 and cpu_to_be64.

So, replace __constant_be16_to_cpu with be16_to_cpu and
__constant_cpu_to_be64 with cpu_to_be64, with the goal of getting
rid of the definition of __constant_be16_to_cpu and
__constant_cpu_to_be64 completely.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>

authored by

Vaishali Thakkar and committed by
Doug Ledford
cb1ff431 edcd2a74

+2 -2
+2 -2
drivers/infiniband/hw/ipath/ipath_verbs.c
··· 2044 2044 2045 2045 spin_lock_init(&idev->qp_table.lock); 2046 2046 spin_lock_init(&idev->lk_table.lock); 2047 - idev->sm_lid = __constant_be16_to_cpu(IB_LID_PERMISSIVE); 2047 + idev->sm_lid = be16_to_cpu(IB_LID_PERMISSIVE); 2048 2048 /* Set the prefix to the default value (see ch. 4.1.1) */ 2049 - idev->gid_prefix = __constant_cpu_to_be64(0xfe80000000000000ULL); 2049 + idev->gid_prefix = cpu_to_be64(0xfe80000000000000ULL); 2050 2050 2051 2051 ret = ipath_init_qp_table(idev, ib_ipath_qp_table_size); 2052 2052 if (ret)