summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-12-24 16:10:22 +0100
committerIngo Molnar <mingo@kernel.org>2019-12-25 10:49:24 +0100
commit99ea8b1db2d23ac856bf3ee0673628df088a21ea (patch)
tree37a457b8207ede189bd9f9512a393a8719dd397e /drivers/firmware
parent47c0fd39b7b81f51cc8f767c34a57d12289bdc60 (diff)
efi/libstub: Drop 'table' argument from efi_table_attr() macro
None of the definitions of the efi_table_attr() still refer to their 'table' argument so let's get rid of it entirely. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Cc: Arvind Sankar <nivedita@alum.mit.edu> Cc: Borislav Petkov <bp@alien8.de> Cc: James Morse <james.morse@arm.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-23-ardb@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efi/libstub/efi-stub-helper.c11
-rw-r--r--drivers/firmware/efi/libstub/gop.c9
2 files changed, 7 insertions, 13 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index 48eab7b9d066..8754ec04788b 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -933,17 +933,15 @@ fail:
void *get_efi_config_table(efi_guid_t guid)
{
- unsigned long tables = efi_table_attr(efi_system_table, tables,
- efi_system_table());
- int nr_tables = efi_table_attr(efi_system_table, nr_tables,
- efi_system_table());
+ unsigned long tables = efi_table_attr(efi_system_table(), tables);
+ int nr_tables = efi_table_attr(efi_system_table(), nr_tables);
int i;
for (i = 0; i < nr_tables; i++) {
efi_config_table_t *t = (void *)tables;
if (efi_guidcmp(t->guid, guid) == 0)
- return efi_table_attr(efi_config_table, table, t);
+ return efi_table_attr(t, table);
tables += efi_is_native() ? sizeof(efi_config_table_t)
: sizeof(efi_config_table_32_t);
@@ -953,7 +951,6 @@ void *get_efi_config_table(efi_guid_t guid)
void efi_char16_printk(efi_char16_t *str)
{
- efi_call_proto(efi_table_attr(efi_system_table, con_out,
- efi_system_table()),
+ efi_call_proto(efi_table_attr(efi_system_table(), con_out),
output_string, str);
}
diff --git a/drivers/firmware/efi/libstub/gop.c b/drivers/firmware/efi/libstub/gop.c
index c3afe8d4a688..8f746282c219 100644
--- a/drivers/firmware/efi/libstub/gop.c
+++ b/drivers/firmware/efi/libstub/gop.c
@@ -85,9 +85,6 @@ setup_pixel_info(struct screen_info *si, u32 pixels_per_scan_line,
}
}
-#define efi_gop_attr(table, attr, instance) \
- (efi_table_attr(efi_graphics_output_protocol##table, attr, instance))
-
static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
unsigned long size, void **handles)
{
@@ -123,9 +120,9 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
if (status == EFI_SUCCESS)
conout_found = true;
- mode = (void *)(unsigned long)efi_gop_attr(, mode, gop);
- info = (void *)(unsigned long)efi_gop_attr(_mode, info, mode);
- current_fb_base = efi_gop_attr(_mode, frame_buffer_base, mode);
+ mode = efi_table_attr(gop, mode);
+ info = efi_table_attr(mode, info);
+ current_fb_base = efi_table_attr(mode, frame_buffer_base);
if ((!first_gop || conout_found) &&
info->pixel_format != PIXEL_BLT_ONLY) {