Blame SOURCES/0230-linuxefi-minor-cleanups.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Peter Jones <pjones@redhat.com>
f725e3
Date: Tue, 14 Feb 2017 16:31:52 -0500
f725e3
Subject: [PATCH] linuxefi: minor cleanups
f725e3
f725e3
Signed-off-by: Peter Jones <pjones@redhat.com>
f725e3
---
f725e3
 grub-core/loader/i386/efi/linux.c | 30 ++++++++++++++++++++----------
f725e3
 1 file changed, 20 insertions(+), 10 deletions(-)
f725e3
f725e3
diff --git a/grub-core/loader/i386/efi/linux.c b/grub-core/loader/i386/efi/linux.c
f725e3
index a95e29700c5..806031838ae 100644
f725e3
--- a/grub-core/loader/i386/efi/linux.c
f725e3
+++ b/grub-core/loader/i386/efi/linux.c
f725e3
@@ -61,13 +61,18 @@ grub_linuxefi_unload (void)
f725e3
   grub_dl_unref (my_mod);
f725e3
   loaded = 0;
f725e3
   if (initrd_mem)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)initrd_mem, BYTES_TO_PAGES(params->ramdisk_size));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)initrd_mem,
f725e3
+			 BYTES_TO_PAGES(params->ramdisk_size));
f725e3
   if (linux_cmdline)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)linux_cmdline, BYTES_TO_PAGES(params->cmdline_size + 1));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)
f725e3
+			 linux_cmdline,
f725e3
+			 BYTES_TO_PAGES(params->cmdline_size + 1));
f725e3
   if (kernel_mem)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)kernel_mem,
f725e3
+			 BYTES_TO_PAGES(kernel_size));
f725e3
   if (params)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)params, BYTES_TO_PAGES(16384));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)params,
f725e3
+			 BYTES_TO_PAGES(16384));
f725e3
   return GRUB_ERR_NONE;
f725e3
 }
f725e3
 
f725e3
@@ -117,7 +122,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
f725e3
   grub_dprintf ("linuxefi", "initrd_mem = %lx\n", (unsigned long) initrd_mem);
f725e3
 
f725e3
   params->ramdisk_size = size;
f725e3
-  params->ramdisk_image = (grub_uint32_t)(grub_uint64_t) initrd_mem;
f725e3
+  params->ramdisk_image = (grub_uint32_t)(grub_addr_t) initrd_mem;
f725e3
 
f725e3
   ptr = initrd_mem;
f725e3
 
f725e3
@@ -144,7 +149,8 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
f725e3
   grub_free (files);
f725e3
 
f725e3
   if (initrd_mem && grub_errno)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)initrd_mem, BYTES_TO_PAGES(size));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)initrd_mem,
f725e3
+			 BYTES_TO_PAGES(size));
f725e3
 
f725e3
   return grub_errno;
f725e3
 }
f725e3
@@ -251,7 +257,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
f725e3
                               linux_cmdline + sizeof (LINUX_IMAGE) - 1,
f725e3
 			      lh.cmdline_size - (sizeof (LINUX_IMAGE) - 1));
f725e3
 
f725e3
-  lh.cmd_line_ptr = (grub_uint32_t)(grub_uint64_t)linux_cmdline;
f725e3
+  lh.cmd_line_ptr = (grub_uint32_t)(grub_addr_t)linux_cmdline;
f725e3
 
f725e3
   handover_offset = lh.handover_offset;
f725e3
 
f725e3
@@ -296,13 +302,17 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
f725e3
     }
f725e3
 
f725e3
   if (linux_cmdline && !loaded)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)linux_cmdline, BYTES_TO_PAGES(lh.cmdline_size + 1));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)
f725e3
+			 linux_cmdline,
f725e3
+			 BYTES_TO_PAGES(lh.cmdline_size + 1));
f725e3
 
f725e3
   if (kernel_mem && !loaded)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)kernel_mem, BYTES_TO_PAGES(kernel_size));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)kernel_mem,
f725e3
+			 BYTES_TO_PAGES(kernel_size));
f725e3
 
f725e3
   if (params && !loaded)
f725e3
-    grub_efi_free_pages((grub_efi_physical_address_t)params, BYTES_TO_PAGES(16384));
f725e3
+    grub_efi_free_pages ((grub_efi_physical_address_t)(grub_addr_t)params,
f725e3
+			 BYTES_TO_PAGES(16384));
f725e3
 
f725e3
   return grub_errno;
f725e3
 }