public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: "Adrian Fiergolski" <adrian.fiergolski@fastree3d.com>,
	"Marek Behún" <marek.behun@nic.cz>
Cc: Wolfgang Denk <wd@denx.de>, Simon Glass <sjg@chromium.org>,
	Stefan Roese <sr@denx.de>,
	u-boot@lists.denx.de
Subject: [PATCH] misc: atsha204a: Fix big endian support
Date: Sun,  3 Apr 2022 00:36:34 +0200	[thread overview]
Message-ID: <20220402223634.20256-1-pali@kernel.org> (raw)

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


             reply	other threads:[~2022-04-02 22:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02 22:36 Pali Rohár [this message]
2022-04-04  7:43 ` [PATCH] misc: atsha204a: Fix big endian support 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220402223634.20256-1-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=adrian.fiergolski@fastree3d.com \
    --cc=marek.behun@nic.cz \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox