efi/gop: Use helper macros for populating lfb_base
authorArvind Sankar <nivedita@alum.mit.edu>
Fri, 20 Mar 2020 02:00:21 +0000 (22:00 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 23 Apr 2020 18:15:06 +0000 (20:15 +0200)
Use the lower/upper_32_bits macros from kernel.h to initialize
si->lfb_base and si->ext_lfb_base.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200320020028.1936003-8-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/gop.c

index 0d195060a370033efec173155be67e1045e1f019..7b0baf9a912fcac0283e3458da5eb44ed37662b6 100644 (file)
@@ -158,8 +158,8 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
        si->lfb_height = info->vertical_resolution;
 
        fb_base          = efi_table_attr(mode, frame_buffer_base);
-       si->lfb_base     = fb_base;
-       si->ext_lfb_base = (u64)(unsigned long)fb_base >> 32;
+       si->lfb_base     = lower_32_bits(fb_base);
+       si->ext_lfb_base = upper_32_bits(fb_base);
        if (si->ext_lfb_base)
                si->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;