diff mbox series

[01/10] board: stm32mp1: update command stboard on misc_write result

Message ID 20200212183744.5309-2-patrick.delaunay@st.com
State Accepted
Commit 16aa3e3fdcd36b9a26be54656c9747fb59f8bb3b
Delegated to: Patrick Delaunay
Headers show
Series stm32mp1: board and SOC identifications | expand

Commit Message

Patrick DELAUNAY Feb. 12, 2020, 6:37 p.m. UTC
Update management of misc_write, which now return length of data
after the commit 8729b1ae2cbd ("misc: Update read() and write()
methods to return bytes xfered")

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

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

Comments

Patrice CHOTARD March 18, 2020, 10:04 a.m. UTC | #1
On 2/12/20 7:37 PM, Patrick Delaunay wrote:
> Update management of misc_write, which now return length of data
> after the commit 8729b1ae2cbd ("misc: Update read() and write()
> methods to return bytes xfered")
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
>  board/st/common/cmd_stboard.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
> index e994a88e71..b740f4510e 100644
> --- a/board/st/common/cmd_stboard.c
> +++ b/board/st/common/cmd_stboard.c
> @@ -125,7 +125,7 @@ static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
>  	ret = misc_write(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
>  			 &otp, sizeof(otp));
>  
> -	if (ret) {
> +	if (ret < 0) {
>  		puts("BOARD programming error\n");
>  		return CMD_RET_FAILURE;
>  	}

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

Thanks

Patrice
Patrick DELAUNAY March 24, 2020, 8:32 a.m. UTC | #2
Hi,

> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: mercredi 12 février 2020 19:38
> 
> Update management of misc_write, which now return length of data after the
> commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes
> xfered")
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---

Applied to u-boot-stm/next, thanks!

Regards

Patrick
diff mbox series

Patch

diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
index e994a88e71..b740f4510e 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -125,7 +125,7 @@  static int do_stboard(cmd_tbl_t *cmdtp, int flag, int argc,
 	ret = misc_write(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
 			 &otp, sizeof(otp));
 
-	if (ret) {
+	if (ret < 0) {
 		puts("BOARD programming error\n");
 		return CMD_RET_FAILURE;
 	}