Skip to content

Commit f350574

Browse files
Nicholas Mc Guiredavem330
authored andcommitted
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 <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f68d7c4 commit f350574

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/rds/ib_recv.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
772772
unsigned long frag_off;
773773
unsigned long to_copy;
774774
unsigned long copied;
775-
uint64_t uncongested = 0;
775+
__le64 uncongested = 0;
776776
void *addr;
777777

778778
/* catch completely corrupt packets */
@@ -789,7 +789,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
789789
copied = 0;
790790

791791
while (copied < RDS_CONG_MAP_BYTES) {
792-
uint64_t *src, *dst;
792+
__le64 *src, *dst;
793793
unsigned int k;
794794

795795
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,
824824
}
825825

826826
/* the congestion map is in little endian order */
827-
uncongested = le64_to_cpu(uncongested);
828-
829-
rds_cong_map_updated(map, uncongested);
827+
rds_cong_map_updated(map, le64_to_cpu(uncongested));
830828
}
831829

832830
static void rds_ib_process_recv(struct rds_connection *conn,

0 commit comments

Comments
 (0)