video: Factor out vidconsole_put_string()
[oweals/u-boot.git] / lib / gzip.c
index ff37d4f31be4ba479a0c6e0d1b2bdacd0f32db26..674d732fe6ddcbb7db3764e3e047786f973a68d1 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2012
  * Lei Wen <leiwen@marvell.com>, Marvell Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -10,6 +9,7 @@
 #include <command.h>
 #include <image.h>
 #include <malloc.h>
+#include <memalign.h>
 #include <u-boot/zlib.h>
 #include "zlib/zutil.h"
 
@@ -25,7 +25,7 @@ static void *zalloc(void *x, unsigned items, unsigned size)
        size *= items;
        size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1);
 
-       p = malloc (size);
+       p = malloc_cache_aligned(size);
 
        return (p);
 }