diff mbox

[3/8] ARM: hikey: Use linux/sizes.h for malloc size

Message ID 1441833235-2359-4-git-send-email-peter.griffin@linaro.org
State New
Headers show

Commit Message

Peter Griffin Sept. 9, 2015, 9:13 p.m. UTC
Use the #defines in linux/sizes for malloc size as it is
more readable.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 include/configs/hikey.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Fabio Estevam Sept. 9, 2015, 9:22 p.m. UTC | #1
On Wed, Sep 9, 2015 at 6:13 PM, Peter Griffin <peter.griffin@linaro.org> wrote:

>  /* Size of malloc() pool */
> -#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (8 << 20))
> +#define CONFIG_SYS_MALLOC_LEN          SZ_8M

You are no longer adding CONFIG_ENV_SIZE.

Is this intended? If so, you should mention it in the commit log.

Regards,

Fabio Estevam
Peter Griffin Sept. 10, 2015, 7:34 a.m. UTC | #2
Hi Fabio,

On 9 September 2015 at 22:22, Fabio Estevam <festevam@gmail.com> wrote:

> On Wed, Sep 9, 2015 at 6:13 PM, Peter Griffin <peter.griffin@linaro.org>
> wrote:
>
> >  /* Size of malloc() pool */
> > -#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (8 << 20))
> > +#define CONFIG_SYS_MALLOC_LEN          SZ_8M
>
> You are no longer adding CONFIG_ENV_SIZE.
>

Eeek, good spot!

>
> Is this intended? If so, you should mention it in the commit log.
>

No it wasn't, will fix in v2.

regards,

Peter.
diff mbox

Patch

diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index 8ff9077..d909518 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -12,6 +12,8 @@ 
 #ifndef __HIKEY_H
 #define __HIKEY_H
 
+#include <linux/sizes.h>
+
 /* We use generic board for hikey */
 #define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_POWER
@@ -55,7 +57,7 @@ 
 #define GICC_BASE			0xf6802000
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (8 << 20))
+#define CONFIG_SYS_MALLOC_LEN		SZ_8M
 
 /* PL011 Serial Configuration */
 #define CONFIG_PL011_SERIAL