public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] image: android: Fix possible build errors
@ 2019-08-09 12:31 Sam Protsenko
  2019-10-17 11:24 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Protsenko @ 2019-08-09 12:31 UTC (permalink / raw)
  To: u-boot

As android_image.h uses types like u32, we need to include corresponding
headers in place. Otherwise the user will be forced to include those in
C file, or next build error can occur:

    include/android_image.h:32:5: error: unknown type name 'u32'
         u32 kernel_size; /* size in bytes */

Include required headers for data types used. While at it, remove
typedef struct, which is prohibited by kernel coding style, and fix the
comment.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 include/android_image.h | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/android_image.h b/include/android_image.h
index 0519ece368..54d25af068 100644
--- a/include/android_image.h
+++ b/include/android_image.h
@@ -11,18 +11,15 @@
 #ifndef _ANDROID_IMAGE_H_
 #define _ANDROID_IMAGE_H_
 
+#include <linux/compiler.h>
+#include <linux/types.h>
+
 #define ANDR_BOOT_MAGIC "ANDROID!"
 #define ANDR_BOOT_MAGIC_SIZE 8
 #define ANDR_BOOT_NAME_SIZE 16
 #define ANDR_BOOT_ARGS_SIZE 512
 #define ANDR_BOOT_EXTRA_ARGS_SIZE 1024
 
-/*
- * It is expected that callers would explicitly specify which version of the
- * boot image header they need to use.
- */
-typedef struct andr_img_hdr andr_img_hdr;
-
 /* The bootloader expects the structure of andr_img_hdr with header
  * version 0 to be as follows: */
 struct andr_img_hdr {
@@ -115,7 +112,7 @@ struct andr_img_hdr {
  * +---------------------+
  * | dtb                 | q pages
  * +---------------------+
-
+ *
  * n = (kernel_size + page_size - 1) / page_size
  * m = (ramdisk_size + page_size - 1) / page_size
  * o = (second_size + page_size - 1) / page_size
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] image: android: Fix possible build errors
  2019-08-09 12:31 [U-Boot] [PATCH] image: android: Fix possible build errors Sam Protsenko
@ 2019-10-17 11:24 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2019-10-17 11:24 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 09, 2019 at 03:31:29PM +0300, Sam Protsenko wrote:

> As android_image.h uses types like u32, we need to include corresponding
> headers in place. Otherwise the user will be forced to include those in
> C file, or next build error can occur:
> 
>     include/android_image.h:32:5: error: unknown type name 'u32'
>          u32 kernel_size; /* size in bytes */
> 
> Include required headers for data types used. While at it, remove
> typedef struct, which is prohibited by kernel coding style, and fix the
> comment.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191017/37e93c6f/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17 11:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-09 12:31 [U-Boot] [PATCH] image: android: Fix possible build errors Sam Protsenko
2019-10-17 11:24 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox