summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2022-06-20 11:49:24 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-07-04 12:51:43 +0200
commit1c0e78a287e3493e22bde8553d02f3b89177eaf7 (patch)
treeb57b1b69b40407b1f2affea58da2ab41a4571268 /COPYING
parent0ff32bfa0e794ccc3601de7158b522bf736fa63c (diff)
downloadlinux-1c0e78a287e3493e22bde8553d02f3b89177eaf7.tar.bz2
can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix endianness conversion
In mcp251xfd_register_get_dev_id() the device ID register is read with handcrafted SPI transfers. As all registers, this register is in little endian. Further it is not naturally aligned in struct mcp251xfd_map_buf_nocrc::data. However after the transfer the register content is converted from big endian to CPU endianness not taking care of being unaligned. Fix the conversion by converting from little endian to CPU endianness taking the unaligned source into account. Side note: So far the register content is 0x0 on all mcp251xfd compatible chips, and is only used for an informative printk. Link: https://lore.kernel.org/all/20220627092859.809042-1-mkl@pengutronix.de Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Reviewed-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions