RDMA/cxgb4: Fix endianness of addition to mpa->private_data_size
authorRoland Dreier <roland@purestorage.com>
Thu, 5 Jul 2012 21:16:54 +0000 (14:16 -0700)
committerRoland Dreier <roland@purestorage.com>
Mon, 9 Jul 2012 01:02:33 +0000 (18:02 -0700)
commitf747c34af4f56cc239e04505bd583dd3bdcfe49d
treee72c1c67ecc48103f02b2fb542dc2033ada0566a
parent6887a4131da3adaab011613776d865f4bcfb5678
RDMA/cxgb4: Fix endianness of addition to mpa->private_data_size

sparse correctly warns that if mpa->private_data_size is __be16, then
doing += on it is wrong, even if we do += htons(<something>) -- on a
little endian system, carries will go the wrong way.  Fix this up by
doing the addition in native byte order.

Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c