Commit d0b112ac authored by Nikola Jelic's avatar Nikola Jelic Committed by Greg Kroah-Hartman

staging: lustre: in-place endianness functions

lib-move.c file has a lot of expressions in the form of:
v = le[32|64]_to_cpu(v);
This caused a lot of sparse warnings.
Replaced with:
le[32|64]_to_cpus(&v);
Signed-off-by: default avatarNikola Jelic <nikola.jelic83@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4e5f9c6
...@@ -1274,9 +1274,9 @@ lnet_parse_put(struct lnet_ni *ni, struct lnet_msg *msg) ...@@ -1274,9 +1274,9 @@ lnet_parse_put(struct lnet_ni *ni, struct lnet_msg *msg)
int rc; int rc;
/* Convert put fields to host byte order */ /* Convert put fields to host byte order */
hdr->msg.put.match_bits = le64_to_cpu(hdr->msg.put.match_bits); le64_to_cpus(&hdr->msg.put.match_bits);
hdr->msg.put.ptl_index = le32_to_cpu(hdr->msg.put.ptl_index); le32_to_cpus(&hdr->msg.put.ptl_index);
hdr->msg.put.offset = le32_to_cpu(hdr->msg.put.offset); le32_to_cpus(&hdr->msg.put.offset);
info.mi_id.nid = hdr->src_nid; info.mi_id.nid = hdr->src_nid;
info.mi_id.pid = hdr->src_pid; info.mi_id.pid = hdr->src_pid;
...@@ -1332,10 +1332,10 @@ lnet_parse_get(struct lnet_ni *ni, struct lnet_msg *msg, int rdma_get) ...@@ -1332,10 +1332,10 @@ lnet_parse_get(struct lnet_ni *ni, struct lnet_msg *msg, int rdma_get)
int rc; int rc;
/* Convert get fields to host byte order */ /* Convert get fields to host byte order */
hdr->msg.get.match_bits = le64_to_cpu(hdr->msg.get.match_bits); le64_to_cpus(&hdr->msg.get.match_bits);
hdr->msg.get.ptl_index = le32_to_cpu(hdr->msg.get.ptl_index); le32_to_cpus(&hdr->msg.get.ptl_index);
hdr->msg.get.sink_length = le32_to_cpu(hdr->msg.get.sink_length); le32_to_cpus(&hdr->msg.get.sink_length);
hdr->msg.get.src_offset = le32_to_cpu(hdr->msg.get.src_offset); le32_to_cpus(&hdr->msg.get.src_offset);
info.mi_id.nid = hdr->src_nid; info.mi_id.nid = hdr->src_nid;
info.mi_id.pid = hdr->src_pid; info.mi_id.pid = hdr->src_pid;
...@@ -1464,8 +1464,8 @@ lnet_parse_ack(struct lnet_ni *ni, struct lnet_msg *msg) ...@@ -1464,8 +1464,8 @@ lnet_parse_ack(struct lnet_ni *ni, struct lnet_msg *msg)
src.pid = hdr->src_pid; src.pid = hdr->src_pid;
/* Convert ack fields to host byte order */ /* Convert ack fields to host byte order */
hdr->msg.ack.match_bits = le64_to_cpu(hdr->msg.ack.match_bits); le64_to_cpus(&hdr->msg.ack.match_bits);
hdr->msg.ack.mlength = le32_to_cpu(hdr->msg.ack.mlength); le32_to_cpus(&hdr->msg.ack.mlength);
cpt = lnet_cpt_of_cookie(hdr->msg.ack.dst_wmd.wh_object_cookie); cpt = lnet_cpt_of_cookie(hdr->msg.ack.dst_wmd.wh_object_cookie);
lnet_res_lock(cpt); lnet_res_lock(cpt);
...@@ -1798,7 +1798,7 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, lnet_nid_t from_nid, ...@@ -1798,7 +1798,7 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, lnet_nid_t from_nid,
/* convert common msg->hdr fields to host byteorder */ /* convert common msg->hdr fields to host byteorder */
msg->msg_hdr.type = type; msg->msg_hdr.type = type;
msg->msg_hdr.src_nid = src_nid; msg->msg_hdr.src_nid = src_nid;
msg->msg_hdr.src_pid = le32_to_cpu(msg->msg_hdr.src_pid); le32_to_cpus(&msg->msg_hdr.src_pid);
msg->msg_hdr.dest_nid = dest_nid; msg->msg_hdr.dest_nid = dest_nid;
msg->msg_hdr.dest_pid = dest_pid; msg->msg_hdr.dest_pid = dest_pid;
msg->msg_hdr.payload_length = payload_length; msg->msg_hdr.payload_length = payload_length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment