public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] misc: atsha204a: Fix big endian support
@ 2022-04-02 22:36 Pali Rohár
  2022-04-04  7:43 ` Stefan Roese
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Pali Rohár @ 2022-04-02 22:36 UTC (permalink / raw)
  To: Adrian Fiergolski, Marek Behún
  Cc: Wolfgang Denk, Simon Glass, Stefan Roese, u-boot

Callers of function atsha204a_crc16() expect to return value in host cpu
endianity. So remove cpu_to_le16() conversion.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 drivers/misc/atsha204a-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index b89463babb56..63fe541dade3 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -146,7 +146,7 @@ static u16 atsha204a_crc16(const u8 *buffer, size_t len)
 	while (len--)
 		crc = crc16_byte(crc, *buffer++);
 
-	return cpu_to_le16(crc);
+	return crc;
 }
 
 static int atsha204a_send(struct udevice *dev, const u8 *buf, u8 len)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-15 12:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-02 22:36 [PATCH] misc: atsha204a: Fix big endian support Pali Rohár
2022-04-04  7:43 ` Stefan Roese
2022-04-07  8:29   ` Pali Rohár
2022-04-07 13:31     ` Stefan Roese
2022-04-07 13:47       ` Tom Rini
2022-04-12  9:37         ` Pali Rohár
2022-04-04  7:57 ` Marek Behún
2022-04-15 12:07 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox