* [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
* Re: [PATCH] misc: atsha204a: Fix big endian support
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-04 7:57 ` Marek Behún
2022-04-15 12:07 ` Tom Rini
2 siblings, 1 reply; 8+ messages in thread
From: Stefan Roese @ 2022-04-04 7:43 UTC (permalink / raw)
To: Pali Rohár, Adrian Fiergolski, Marek Behún
Cc: Wolfgang Denk, Simon Glass, u-boot
On 4/3/22 00:36, Pali Rohár 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>
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
> ---
> 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)
Viele Grüße,
Stefan Roese
--
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: sr@denx.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: atsha204a: Fix big endian support
2022-04-02 22:36 [PATCH] misc: atsha204a: Fix big endian support Pali Rohár
2022-04-04 7:43 ` Stefan Roese
@ 2022-04-04 7:57 ` Marek Behún
2022-04-15 12:07 ` Tom Rini
2 siblings, 0 replies; 8+ messages in thread
From: Marek Behún @ 2022-04-04 7:57 UTC (permalink / raw)
To: Pali Rohár
Cc: Adrian Fiergolski, Wolfgang Denk, Simon Glass, Stefan Roese, u-boot
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>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: atsha204a: Fix big endian support
2022-04-04 7:43 ` Stefan Roese
@ 2022-04-07 8:29 ` Pali Rohár
2022-04-07 13:31 ` Stefan Roese
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2022-04-07 8:29 UTC (permalink / raw)
To: Stefan Roese
Cc: Adrian Fiergolski, Marek Behún, Wolfgang Denk, Simon Glass, u-boot
On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
> On 4/3/22 00:36, Pali Rohár 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>
>
> Reviewed-by: Stefan Roese <sr@denx.de>
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.
> Thanks,
> Stefan
>
> > ---
> > 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)
>
> Viele Grüße,
> Stefan Roese
>
> --
> 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: sr@denx.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: atsha204a: Fix big endian support
2022-04-07 8:29 ` Pali Rohár
@ 2022-04-07 13:31 ` Stefan Roese
2022-04-07 13:47 ` Tom Rini
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Roese @ 2022-04-07 13:31 UTC (permalink / raw)
To: Pali Rohár, Tom Rini
Cc: Adrian Fiergolski, Marek Behún, Wolfgang Denk, Simon Glass, u-boot
Added Tom to To...
On 4/7/22 10:29, Pali Rohár wrote:
> On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
>> On 4/3/22 00:36, Pali Rohár 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>
>>
>> Reviewed-by: Stefan Roese <sr@denx.de>
>
> 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
>
>> Thanks,
>> Stefan
>>
>>> ---
>>> 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)
>>
>> Viele Grüße,
>> Stefan Roese
>>
>> --
>> 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: sr@denx.de
Viele Grüße,
Stefan Roese
--
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: sr@denx.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: atsha204a: Fix big endian support
2022-04-07 13:31 ` Stefan Roese
@ 2022-04-07 13:47 ` Tom Rini
2022-04-12 9:37 ` Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2022-04-07 13:47 UTC (permalink / raw)
To: Stefan Roese
Cc: Pali Rohár, Adrian Fiergolski, Marek Behún,
Wolfgang Denk, Simon Glass, u-boot
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
On Thu, Apr 07, 2022 at 03:31:25PM +0200, Stefan Roese wrote:
> Added Tom to To...
>
> On 4/7/22 10:29, Pali Rohár wrote:
> > On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
> > > On 4/3/22 00:36, Pali Rohár 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>
> > >
> > > Reviewed-by: Stefan Roese <sr@denx.de>
> >
> > 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?
OK, I'll assign it to myself in patchwork.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: atsha204a: Fix big endian support
2022-04-07 13:47 ` Tom Rini
@ 2022-04-12 9:37 ` Pali Rohár
0 siblings, 0 replies; 8+ messages in thread
From: Pali Rohár @ 2022-04-12 9:37 UTC (permalink / raw)
To: Tom Rini
Cc: Stefan Roese, Adrian Fiergolski, Marek Behún, Wolfgang Denk,
Simon Glass, u-boot
On Thursday 07 April 2022 09:47:09 Tom Rini wrote:
> On Thu, Apr 07, 2022 at 03:31:25PM +0200, Stefan Roese wrote:
>
> > Added Tom to To...
> >
> > On 4/7/22 10:29, Pali Rohár wrote:
> > > On Monday 04 April 2022 09:43:21 Stefan Roese wrote:
> > > > On 4/3/22 00:36, Pali Rohár 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>
> > > >
> > > > Reviewed-by: Stefan Roese <sr@denx.de>
> > >
> > > 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?
>
> OK, I'll assign it to myself in patchwork.
>
> --
> Tom
I sent crc16 patch series which depends on this particular patch:
https://patchwork.ozlabs.org/project/uboot/list/?series=294691&state=*
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: atsha204a: Fix big endian support
2022-04-02 22:36 [PATCH] misc: atsha204a: Fix big endian support Pali Rohár
2022-04-04 7:43 ` Stefan Roese
2022-04-04 7:57 ` Marek Behún
@ 2022-04-15 12:07 ` Tom Rini
2 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2022-04-15 12:07 UTC (permalink / raw)
To: Pali Rohár
Cc: Adrian Fiergolski, Marek Behún, Wolfgang Denk, Simon Glass,
Stefan Roese, u-boot
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
On Sun, Apr 03, 2022 at 12:36:34AM +0200, Pali Rohár 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>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.