summaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2019-04-30 05:12:57 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-01 23:15:36 +0200
commitf3505745c07ff50c22aeca9dde98762d1c8b5898 (patch)
treeb680bafcf468f7dbf3b601fad7d27ef82d53858e /net/rds
parentselftests: fib_rule_tests: print the result and return 1 if any tests failed (diff)
downloadlinux-f3505745c07ff50c22aeca9dde98762d1c8b5898.tar.xz
linux-f3505745c07ff50c22aeca9dde98762d1c8b5898.zip
rds: ib: force endiannes annotation
While the endiannes is being handled correctly as indicated by the comment above the offending line - sparse was unhappy with the missing annotation as be64_to_cpu() expects a __be64 argument. To mitigate this annotation all involved variables are changed to a consistent __le64 and the conversion to uint64_t delayed to the call to rds_cong_map_updated(). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib_recv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 70559854837e..8946c89d7392 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -772,7 +772,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
unsigned long frag_off;
unsigned long to_copy;
unsigned long copied;
- uint64_t uncongested = 0;
+ __le64 uncongested = 0;
void *addr;
/* catch completely corrupt packets */
@@ -789,7 +789,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
copied = 0;
while (copied < RDS_CONG_MAP_BYTES) {
- uint64_t *src, *dst;
+ __le64 *src, *dst;
unsigned int k;
to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
@@ -824,9 +824,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
}
/* the congestion map is in little endian order */
- uncongested = le64_to_cpu(uncongested);
-
- rds_cong_map_updated(map, uncongested);
+ rds_cong_map_updated(map, le64_to_cpu(uncongested));
}
static void rds_ib_process_recv(struct rds_connection *conn,