Commit 5c16e118 authored by Simon Horman's avatar Simon Horman Committed by David S. Miller
Browse files

net: ethernet: ti: am65-cpsw: Use __be64 type for id_temp



The id_temp local variable in am65_cpsw_nuss_probe() is
used to hold a 64-bit big-endian value as it is assigned using
cpu_to_be64().

It is read using memcpy(), where it is written as an identifier into a
byte-array.  So this can also be treated as big endian.

As it's type is currently host byte order (u64), sparse flags
an endian mismatch when compiling for little-endian systems:

.../am65-cpsw-nuss.c:3454:17: warning: incorrect type in assignment (different base types)
.../am65-cpsw-nuss.c:3454:17:    expected unsigned long long [usertype] id_temp
.../am65-cpsw-nuss.c:3454:17:    got restricted __be64 [usertype]

Address this by using __be64 as the type of id_temp.

No functional change intended.
Compile tested only.

Reviewed-by: default avatarKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: default avatarRoger Quadros <rogerq@kernel.org>
Signed-off-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b8bf3844
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment