diff mbox series

[U-Boot,PATCHv2,1/5] smart-gateway-mt7688: Rework build time check for overwriting factory data

Message ID 20191119010210.24477-1-trini@konsulko.com
State Accepted
Commit 3eee45d93681a9c6bb67b73068da4dc179ae4e7f
Delegated to: Tom Rini
Headers show
Series [U-Boot,PATCHv2,1/5] smart-gateway-mt7688: Rework build time check for overwriting factory data | expand

Commit Message

Tom Rini Nov. 19, 2019, 1:02 a.m. UTC
The board file has a build time check to ensure that we do not have the
redundant environment overwriting the factory data.  However, using the
symbol CONFIG_ENV_SIZE_REDUND isn't strictly needed as that is always
the same as CONFIG_ENV_SIZE.  Use CONFIG_ENV_SIZE instead so that we can
later drop CONFIG_ENV_SIZE_REDUND.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v2:
- As pointed out by Stefan's review, I should address the usage of
  ENV_SIZE_REDUND here first and remove it second.
---
 board/gardena/smart-gateway-mt7688/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese Nov. 19, 2019, 6:07 a.m. UTC | #1
On 19.11.19 02:02, Tom Rini wrote:
> The board file has a build time check to ensure that we do not have the
> redundant environment overwriting the factory data.  However, using the
> symbol CONFIG_ENV_SIZE_REDUND isn't strictly needed as that is always
> the same as CONFIG_ENV_SIZE.  Use CONFIG_ENV_SIZE instead so that we can
> later drop CONFIG_ENV_SIZE_REDUND.
> 
> Cc: Stefan Roese <sr@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Changes in v2:
> - As pointed out by Stefan's review, I should address the usage of
>    ENV_SIZE_REDUND here first and remove it second.
> ---
>   board/gardena/smart-gateway-mt7688/board.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
> index bd494c84fc80..e9ffd42a8a68 100644
> --- a/board/gardena/smart-gateway-mt7688/board.c
> +++ b/board/gardena/smart-gateway-mt7688/board.c
> @@ -18,7 +18,7 @@
>   
>   #define FACTORY_DATA_OFFS	0xc0000
>   #define FACTORY_DATA_SECT_SIZE	0x10000
> -#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE_REDUND) > FACTORY_DATA_OFFS)
> +#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE) > FACTORY_DATA_OFFS)
>   #error "U-Boot image with environment too big (overlapping with factory-data)!"
>   #endif
>   #define FACTORY_DATA_USER_OFFS	0x140
> 

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Tom Rini Nov. 21, 2019, 5:16 p.m. UTC | #2
On Mon, Nov 18, 2019 at 08:02:06PM -0500, Tom Rini wrote:

> The board file has a build time check to ensure that we do not have the
> redundant environment overwriting the factory data.  However, using the
> symbol CONFIG_ENV_SIZE_REDUND isn't strictly needed as that is always
> the same as CONFIG_ENV_SIZE.  Use CONFIG_ENV_SIZE instead so that we can
> later drop CONFIG_ENV_SIZE_REDUND.
> 
> Cc: Stefan Roese <sr@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index bd494c84fc80..e9ffd42a8a68 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -18,7 +18,7 @@ 
 
 #define FACTORY_DATA_OFFS	0xc0000
 #define FACTORY_DATA_SECT_SIZE	0x10000
-#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE_REDUND) > FACTORY_DATA_OFFS)
+#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE) > FACTORY_DATA_OFFS)
 #error "U-Boot image with environment too big (overlapping with factory-data)!"
 #endif
 #define FACTORY_DATA_USER_OFFS	0x140