can: ti_hecc: fix endianness related sparse warning
This patch fixes the following sparse warning, which occurs in casts when
accessing the data in the CAN frames (struct can_frame) in the RX and TX
routines:
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:572:28: warning: incorrect type in assignment (different base types)
drivers/net/can/ti_hecc.c:572:28: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/can/ti_hecc.c:572:28: got restricted __be32 [usertype] <noident>
drivers/net/can/ti_hecc.c:575:40: warning: incorrect type in assignment (different base types)
drivers/net/can/ti_hecc.c:575:40: expected unsigned int [unsigned] [usertype] <noident>
drivers/net/can/ti_hecc.c:575:40: got restricted __be32 [usertype] <noident>
As the data is indeed big endian, use "__be32" instead of "u32", when casting
it.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Showing
Please register or sign in to comment