* [PATCH] env: mmc: Fix offset issue for env save
@ 2023-01-31 6:41 Ye Li
[not found] ` <CGME20230131234143epcas1p183f586f19ac584be7a68d636e662b858@epcas1p1.samsung.com>
2023-02-07 16:54 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Ye Li @ 2023-01-31 6:41 UTC (permalink / raw)
To: patrick.delaunay, u-boot; +Cc: patrice.chotard, peng.fan, uboot-imx
Fix the issue in commit 46c9016 (env: mcc: Drop unnecessary #ifdefs)
If CONFIG_SYS_REDUNDAND_ENVIRONMENT is not defined, the offset value
becomes undetermined, so write env to unexpected offset.
Signed-off-by: Ye Li <ye.li@nxp.com>
---
env/mmc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/env/mmc.c b/env/mmc.c
index 8576141..5b01f65 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -273,11 +273,11 @@ static int env_mmc_save(void)
if (ret)
goto fini;
}
+ }
- if (mmc_get_env_addr(mmc, copy, &offset)) {
- ret = 1;
- goto fini;
- }
+ if (mmc_get_env_addr(mmc, copy, &offset)) {
+ ret = 1;
+ goto fini;
}
printf("Writing to %sMMC(%d)... ", copy ? "redundant " : "", dev);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] env: mmc: Fix offset issue for env save
[not found] ` <CGME20230131234143epcas1p183f586f19ac584be7a68d636e662b858@epcas1p1.samsung.com>
@ 2023-01-31 23:41 ` Jaehoon Chung
0 siblings, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2023-01-31 23:41 UTC (permalink / raw)
To: Ye Li, patrick.delaunay, u-boot; +Cc: patrice.chotard, peng.fan, uboot-imx
On 1/31/23 15:41, Ye Li wrote:
> Fix the issue in commit 46c9016 (env: mcc: Drop unnecessary #ifdefs)
> If CONFIG_SYS_REDUNDAND_ENVIRONMENT is not defined, the offset value
> becomes undetermined, so write env to unexpected offset.
>
> Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
> env/mmc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/env/mmc.c b/env/mmc.c
> index 8576141..5b01f65 100644
> --- a/env/mmc.c
> +++ b/env/mmc.c
> @@ -273,11 +273,11 @@ static int env_mmc_save(void)
> if (ret)
> goto fini;
> }
> + }
>
> - if (mmc_get_env_addr(mmc, copy, &offset)) {
> - ret = 1;
> - goto fini;
> - }
> + if (mmc_get_env_addr(mmc, copy, &offset)) {
> + ret = 1;
> + goto fini;
> }
>
> printf("Writing to %sMMC(%d)... ", copy ? "redundant " : "", dev);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] env: mmc: Fix offset issue for env save
2023-01-31 6:41 [PATCH] env: mmc: Fix offset issue for env save Ye Li
[not found] ` <CGME20230131234143epcas1p183f586f19ac584be7a68d636e662b858@epcas1p1.samsung.com>
@ 2023-02-07 16:54 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-02-07 16:54 UTC (permalink / raw)
To: Ye Li; +Cc: patrick.delaunay, u-boot, patrice.chotard, peng.fan, uboot-imx
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
On Tue, Jan 31, 2023 at 02:41:58PM +0800, Ye Li wrote:
> Fix the issue in commit 46c9016 (env: mcc: Drop unnecessary #ifdefs)
> If CONFIG_SYS_REDUNDAND_ENVIRONMENT is not defined, the offset value
> becomes undetermined, so write env to unexpected offset.
>
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-07 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 6:41 [PATCH] env: mmc: Fix offset issue for env save Ye Li
[not found] ` <CGME20230131234143epcas1p183f586f19ac584be7a68d636e662b858@epcas1p1.samsung.com>
2023-01-31 23:41 ` Jaehoon Chung
2023-02-07 16:54 ` 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.