misc: atsha204a: Fix big endian support
PATCH 1/1 misc: atsha204a: Fix big endian support
Callers of function atsha204a_crc16() expect to return value in host cpu endianity. So remove cpu_to_le16() conversion.
--- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/atsha204a-i2c.c +1 -1
@@ -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)
Signature · 1 line
2.20.1
Quoted 4 lines · Pali Rohár
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.Signed-off-by Pali Rohár <[email protected]>
Thanks,
Stefan
Quoted 9 lines
--- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/atsha204a-i2c.c +0
-0
drivers/misc/atsha204a-i2c.c static u16 atsha204a_crc16(const u8 *buffer, size_t len) · line 152
Quoted 8 lines
drivers/misc/atsha204a-i2c.c +1
-1@@ -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)
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 7 lines · On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
Quoted 4 lines · Pali Rohár
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.Signed-off-by Pali Rohár <[email protected]>Reviewed-by Stefan Roese <[email protected]>
Hello Stefan! Would you or somebody else take this patch?
Because I have some other u-boot generic patches which touches this driver and I'm waiting until this simple change would be merged first.
Quoted 26 lines
Thanks,
StefanQuoted 9 lines
--- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/atsha204a-i2c.c +0
-0drivers/misc/atsha204a-i2c.c static u16 atsha204a_crc16(const u8 *buffer, size_t len) · line 150
Quoted 6 lines
drivers/misc/atsha204a-i2c.c +1
-1@@ -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)Viele Grüße,
Stefan RoeseSignature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Added Tom to To...
Quoted 5 lines · Pali Rohár
Quoted 4 lines · On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
Quoted 3 lines · Pali Rohár
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Pali Rohár <[email protected]>Reviewed-by Stefan Roese <[email protected]>Hello Stefan! Would you or somebody else take this patch?
Because I have some other u-boot generic patches which touches this driver and I'm waiting until this simple change would be merged first.
In general I could do this. But I'm leaving for a vacation in a few days and I'm not sure, if I can squeeze enough "free time" to handle my "U-Boot work".
Tom, could you please pull this patch directly?
Thanks,
Stefan
Quoted 23 lines
Quoted 23 lines
Thanks,
StefanQuoted 9 lines
--- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/atsha204a-i2c.c +0
-0drivers/misc/atsha204a-i2c.c static u16 atsha204a_crc16(const u8 *buffer, size_t len) · line 150
Quoted 6 lines
drivers/misc/atsha204a-i2c.c +1
-1@@ -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)Viele Grüße,
Stefan Roese
Quoted 4 lines
Quoted 4 lines
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 14 lines · Stefan Roese
Added Tom to To...
Quoted 11 lines · Pali Rohár
Quoted 7 lines · On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
Quoted 4 lines · Pali Rohár
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.Signed-off-by Pali Rohár <[email protected]>Reviewed-by Stefan Roese <[email protected]>Hello Stefan! Would you or somebody else take this patch?
Quoted 8 lines
Quoted 2 lines
Because I have some other u-boot generic patches which touches this driver and I'm waiting until this simple change would be merged first.
In general I could do this. But I'm leaving for a vacation in a few days and I'm not sure, if I can squeeze enough "free time" to handle my "U-Boot work".
Tom, could you please pull this patch directly?
OK, I'll assign it to myself in patchwork.
Signature · 1 line
Tom
Quoted 19 lines · On Thursday 07 April 2022 09:47:09 Tom Rini wrote:
Quoted 17 lines · Stefan Roese
Added Tom to To...
Quoted 13 lines · Pali Rohár
Quoted 7 lines · On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
Quoted 4 lines · Pali Rohár
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.Signed-off-by Pali Rohár <[email protected]>Reviewed-by Stefan Roese <[email protected]>Hello Stefan! Would you or somebody else take this patch?
Because I have some other u-boot generic patches which touches this driver and I'm waiting until this simple change would be merged first.
Quoted 10 lines
Quoted 5 lines
In general I could do this. But I'm leaving for a vacation in a few days and I'm not sure, if I can squeeze enough "free time" to handle my "U-Boot work".
Tom, could you please pull this patch directly?
OK, I'll assign it to myself in patchwork.
Signature · 1 line
Tom
I sent crc16 patch series which depends on this particular patch:
https://patchwork.ozlabs.org/project/uboot/list/?series=294691&state=*
Quoted 13 lines · On Sun, 3 Apr 2022 00:36:34 +0200 Pali Rohár <[email protected]> wrote:
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.Signed-off-by Pali Rohár <[email protected]>--- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/misc/atsha204a-i2c.c +0
-0
drivers/misc/atsha204a-i2c.c static u16 atsha204a_crc16(const u8 *buffer, size_t len) · line 152
Quoted 8 lines
drivers/misc/atsha204a-i2c.c +1
-1@@ -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)
Quoted 6 lines · Pali Rohár
Callers of function
atsha204a_crc16()expect to return value in host cpu endianity. So removecpu_to_le16()conversion.Signed-off-by Pali Rohár <[email protected]>Reviewed-by Stefan Roese <[email protected]>Reviewed-by Marek Behún <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom