All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: update test on misc_read result in board_late_init
@ 2020-07-03 15:45 Patrick Delaunay
  2020-07-28 13:27 ` [Uboot-stm32] " Patrice CHOTARD
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Delaunay @ 2020-07-03 15:45 UTC (permalink / raw)
  To: u-boot

Update management of misc_read, which now return length of data
after the commit 8729b1ae2cbd ("misc: Update read() and write()
methods to return bytes xfered")

Fixes: 8b8b3d6b55b9 ("stm32mp1: board: add environment variable for board id and board rev")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 board/st/stm32mp1/stm32mp1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 4553329b25..b51165a636 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -732,7 +732,7 @@ int board_late_init(void)
 	if (!ret)
 		ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
 				&otp, sizeof(otp));
-	if (!ret && otp) {
+	if (ret > 0 && otp) {
 		snprintf(buf, sizeof(buf), "0x%04x", otp >> 16);
 		env_set("board_id", buf);
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Uboot-stm32] [PATCH] board: update test on misc_read result in board_late_init
  2020-07-03 15:45 [PATCH] board: update test on misc_read result in board_late_init Patrick Delaunay
@ 2020-07-28 13:27 ` Patrice CHOTARD
  2020-07-28 15:42   ` Patrice CHOTARD
  0 siblings, 1 reply; 3+ messages in thread
From: Patrice CHOTARD @ 2020-07-28 13:27 UTC (permalink / raw)
  To: u-boot


On 7/3/20 5:45 PM, Patrick Delaunay wrote:
> Update management of misc_read, which now return length of data
> after the commit 8729b1ae2cbd ("misc: Update read() and write()
> methods to return bytes xfered")
>
> Fixes: 8b8b3d6b55b9 ("stm32mp1: board: add environment variable for board id and board rev")
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
>  board/st/stm32mp1/stm32mp1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
> index 4553329b25..b51165a636 100644
> --- a/board/st/stm32mp1/stm32mp1.c
> +++ b/board/st/stm32mp1/stm32mp1.c
> @@ -732,7 +732,7 @@ int board_late_init(void)
>  	if (!ret)
>  		ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
>  				&otp, sizeof(otp));
> -	if (!ret && otp) {
> +	if (ret > 0 && otp) {
>  		snprintf(buf, sizeof(buf), "0x%04x", otp >> 16);
>  		env_set("board_id", buf);
>  

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

Patrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Uboot-stm32] [PATCH] board: update test on misc_read result in board_late_init
  2020-07-28 13:27 ` [Uboot-stm32] " Patrice CHOTARD
@ 2020-07-28 15:42   ` Patrice CHOTARD
  0 siblings, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2020-07-28 15:42 UTC (permalink / raw)
  To: u-boot


On 7/28/20 3:27 PM, Patrice CHOTARD wrote:
> On 7/3/20 5:45 PM, Patrick Delaunay wrote:
>> Update management of misc_read, which now return length of data
>> after the commit 8729b1ae2cbd ("misc: Update read() and write()
>> methods to return bytes xfered")
>>
>> Fixes: 8b8b3d6b55b9 ("stm32mp1: board: add environment variable for board id and board rev")
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
>> ---
>>
>>  board/st/stm32mp1/stm32mp1.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
>> index 4553329b25..b51165a636 100644
>> --- a/board/st/stm32mp1/stm32mp1.c
>> +++ b/board/st/stm32mp1/stm32mp1.c
>> @@ -732,7 +732,7 @@ int board_late_init(void)
>>  	if (!ret)
>>  		ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
>>  				&otp, sizeof(otp));
>> -	if (!ret && otp) {
>> +	if (ret > 0 && otp) {
>>  		snprintf(buf, sizeof(buf), "0x%04x", otp >> 16);
>>  		env_set("board_id", buf);
>>  
> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
>
> Thanks
>
> Patrice
> _______________________________________________
> Uboot-stm32 mailing list
> Uboot-stm32 at st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/uboot-stm32
Applied to u-boot-stm/master

Thanks

Patrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-28 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 15:45 [PATCH] board: update test on misc_read result in board_late_init Patrick Delaunay
2020-07-28 13:27 ` [Uboot-stm32] " Patrice CHOTARD
2020-07-28 15:42   ` Patrice CHOTARD

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.