]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
fit: use 'const' for the input of fdt_offset() and locate_dtb_in_fit()
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 15 Sep 2017 10:57:25 +0000 (12:57 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 01:31:04 +0000 (21:31 -0400)
Those 2 functions don't modify their input, we can mark it const.
This prevents compilation warnings when they are provided const input.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/boot_fit.c
include/boot_fit.h

index 0a723150b5883f32301cf87ab2ccfede2949db35..ce4293184ae69b44a14f9d9116f0fd8694daf2b5 100644 (file)
@@ -13,7 +13,7 @@
 #include <image.h>
 #include <libfdt.h>
 
-int fdt_offset(void *fit)
+static int fdt_offset(const void *fit)
 {
        int images, node, fdt_len, fdt_node, fdt_offset;
        const char *fdt_name;
@@ -55,7 +55,7 @@ int fdt_offset(void *fit)
        return fdt_offset;
 }
 
-void *locate_dtb_in_fit(void *fit)
+void *locate_dtb_in_fit(const void *fit)
 {
        struct image_header *header;
        int size;
index b7d2462dd9b49de75db9c928d665bf5ad50e81bc..e16ae5bafae6482890f689fe141764a4da0ba1f8 100644 (file)
@@ -5,5 +5,10 @@
  * SPDX-License-Identifier:     GPL-2.0+
  */
 
-int fdt_offset(void *fit);
-void *locate_dtb_in_fit(void *fit);
+/**
+ * locate_dtb_in_fit - Find a DTB matching the board in a FIT image
+ * @fit:       pointer to the FIT image
+ *
+ * @return a pointer to a matching DTB blob if found, NULL otherwise
+ */
+void *locate_dtb_in_fit(const void *fit);