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

On Sun,  3 Apr 2022 00:36:34 +0200
Pali Rohár <pali@kernel.org> wrote:

> 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)

Reviewed-by: Marek Behún <marek.behun@nic.cz>

  parent reply	other threads:[~2022-04-04  7:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=20220404095736.0c7342d3@thinkpad \
    --to=marek.behun@nic.cz \
    --cc=adrian.fiergolski@fastree3d.com \
    --cc=pali@kernel.org \
    --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