From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 30E9AC433F5 for ; Sat, 2 Apr 2022 22:37:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A16A83970; Sun, 3 Apr 2022 00:36:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="YFs/OU8W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35F8683934; Sun, 3 Apr 2022 00:36:58 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B648883970 for ; Sun, 3 Apr 2022 00:36:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9689E60F30; Sat, 2 Apr 2022 22:36:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6915C340F0; Sat, 2 Apr 2022 22:36:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648939012; bh=KgjNMp+xJLiP/8gsSLjmxKSZ0rgGX19/Y6xu7orgqCQ=; h=From:To:Cc:Subject:Date:From; b=YFs/OU8WflxSftGB4jc2zv/7xWuoaS+hGpfVDykYlGU4iqzkbCp7GQUMyHuutmSKl GQ+o7tBH8BMe5ubYQAEbqORwRLZRF21Bagstt8RzC3c52MleH3DrLS0WFudFuYbILL Nv9XcnKXhfiswrAKKcwHR6UgORMOIEINrfhuFj9CS/8mpLswScMDTTKYe/+3MBohBD MgEILTpH7A7SP5oPrhgPxmzC0w0Hv+vCGDcraYJJrAHgvl3DJhMHErxitaBtjQAzl2 BO3to5mRAXDf/0sthcoUa0ejzzqAhRiA/KXt7atThBP3Tzq7E1UHKtkVCWm4sygriL DsJURmtbeiUZQ== Received: by pali.im (Postfix) id 3AC22819; Sun, 3 Apr 2022 00:36:50 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Adrian Fiergolski , =?UTF-8?q?Marek=20Beh=C3=BAn?= Cc: Wolfgang Denk , Simon Glass , Stefan Roese , u-boot@lists.denx.de Subject: [PATCH] misc: atsha204a: Fix big endian support Date: Sun, 3 Apr 2022 00:36:34 +0200 Message-Id: <20220402223634.20256-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 --- 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