[PATCH 015/112] efi: payload: iomem: adjust types to avoid casting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We make ample use of GNU C's support for void pointer arithmetic, so use
it here as well to get rid of the helper variable.

No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 efi/payload/iomem.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/efi/payload/iomem.c b/efi/payload/iomem.c
index 6b92ca993aa7..316dacd6b3c2 100644
--- a/efi/payload/iomem.c
+++ b/efi/payload/iomem.c
@@ -142,8 +142,7 @@ static int efi_parse_mmap(struct efi_memory_desc *desc, bool verbose)
 
 static int efi_barebox_populate_mmap(void)
 {
-	void *desc;
-	u8 *mmap_buf = NULL;
+	void *mmap_buf = NULL, *desc;
 	efi_status_t efiret;
 	size_t mmap_size;
 	size_t mapkey;
@@ -169,7 +168,7 @@ static int efi_barebox_populate_mmap(void)
 		goto out;
 	}
 
-	for (desc = mmap_buf; (u8 *)desc < mmap_buf + mmap_size; desc += descsz)
+	for (desc = mmap_buf; desc < mmap_buf + mmap_size; desc += descsz)
 		efi_parse_mmap(desc, __is_defined(DEBUG));
 
 out:
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux