mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Ard Biesheuvel <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: matt@codeblueprint.co.uk, tglx@linutronix.de,
	ard.biesheuvel@linaro.org, peterz@infradead.org,
	torvalds@linux-foundation.org, hpa@zytor.com,
	linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: [tip:efi/core] efi: Use typed function pointers for the runtime services table
Date: Wed, 1 Feb 2017 01:47:43 -0800	[thread overview]
Message-ID: <tip-c4c39c70c5fef43655019236bec8ba5e7273b868@git.kernel.org> (raw)
In-Reply-To: <1485868902-20401-8-git-send-email-ard.biesheuvel@linaro.org>

Commit-ID:  c4c39c70c5fef43655019236bec8ba5e7273b868
Gitweb:     http://git.kernel.org/tip/c4c39c70c5fef43655019236bec8ba5e7273b868
Author:     Ard Biesheuvel <ard.biesheuvel@linaro.org>
AuthorDate: Tue, 31 Jan 2017 13:21:39 +0000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 1 Feb 2017 08:45:45 +0100

efi: Use typed function pointers for the runtime services table

Instead of using void pointers, and casting them to correctly typed
function pointers upon use, declare the runtime services pointers
as function pointers using their respective prototypes, for which
typedefs are already available.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1485868902-20401-8-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/efi.h | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/include/linux/efi.h b/include/linux/efi.h
index 5f632bf..85e9fda 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -509,24 +509,6 @@ typedef struct {
 	u64 query_variable_info;
 } efi_runtime_services_64_t;
 
-typedef struct {
-	efi_table_hdr_t hdr;
-	void *get_time;
-	void *set_time;
-	void *get_wakeup_time;
-	void *set_wakeup_time;
-	void *set_virtual_address_map;
-	void *convert_pointer;
-	void *get_variable;
-	void *get_next_variable;
-	void *set_variable;
-	void *get_next_high_mono_count;
-	void *reset_system;
-	void *update_capsule;
-	void *query_capsule_caps;
-	void *query_variable_info;
-} efi_runtime_services_t;
-
 typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc);
 typedef efi_status_t efi_set_time_t (efi_time_t *tm);
 typedef efi_status_t efi_get_wakeup_time_t (efi_bool_t *enabled, efi_bool_t *pending,
@@ -561,6 +543,24 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes,
 						unsigned long size,
 						bool nonblocking);
 
+typedef struct {
+	efi_table_hdr_t			hdr;
+	efi_get_time_t			*get_time;
+	efi_set_time_t			*set_time;
+	efi_get_wakeup_time_t		*get_wakeup_time;
+	efi_set_wakeup_time_t		*set_wakeup_time;
+	efi_set_virtual_address_map_t	*set_virtual_address_map;
+	void				*convert_pointer;
+	efi_get_variable_t		*get_variable;
+	efi_get_next_variable_t		*get_next_variable;
+	efi_set_variable_t		*set_variable;
+	efi_get_next_high_mono_count_t	*get_next_high_mono_count;
+	efi_reset_system_t		*reset_system;
+	efi_update_capsule_t		*update_capsule;
+	efi_query_capsule_caps_t	*query_capsule_caps;
+	efi_query_variable_info_t	*query_variable_info;
+} efi_runtime_services_t;
+
 void efi_native_runtime_setup(void);
 
 /*

  reply	other threads:[~2017-02-01  9:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 13:21 [GIT PULL 00/10] EFI updates for v4.11 Ard Biesheuvel
2017-01-31 13:21 ` [PATCH 01/10] efi: Deduplicate efi_file_size() / _read() / _close() Ard Biesheuvel
2017-02-01  9:44   ` [tip:efi/core] " tip-bot for Lukas Wunner
2017-01-31 13:21 ` [PATCH 02/10] x86/efi: Deduplicate efi_char16_printk() Ard Biesheuvel
2017-02-01  9:45   ` [tip:efi/core] " tip-bot for Lukas Wunner
2017-01-31 13:21 ` [PATCH 03/10] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures Ard Biesheuvel
2017-02-01  9:45   ` [tip:efi/core] " tip-bot for Sai Praneeth
2017-01-31 13:21 ` [PATCH 04/10] efi: Introduce EFI_MEM_ATTR bit and set it from memory attributes table Ard Biesheuvel
2017-02-01  9:46   ` [tip:efi/core] efi: Introduce the EFI_MEM_ATTR bit and set it from the " tip-bot for Sai Praneeth
2017-01-31 13:21 ` [PATCH 05/10] x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE Ard Biesheuvel
2017-02-01  9:46   ` [tip:efi/core] " tip-bot for Sai Praneeth
2017-01-31 13:21 ` [PATCH 06/10] efi/esrt: Fix spelling mistake "doen't" Ard Biesheuvel
2017-02-01  9:47   ` [tip:efi/core] efi/esrt: Fix typo in pr_err() message tip-bot for Colin Ian King
2017-01-31 13:21 ` [PATCH 07/10] efi: Use typed function pointers for runtime services table Ard Biesheuvel
2017-02-01  9:47   ` tip-bot for Ard Biesheuvel [this message]
2017-01-31 13:21 ` [PATCH 08/10] efi/x86: Move EFI BGRT init code to early init code Ard Biesheuvel
2017-02-01  9:48   ` [tip:efi/core] efi/x86: Move the " tip-bot for Dave Young
2017-05-13 23:18   ` [PATCH 08/10] efi/x86: Move " Sabrina Dubroca
2017-05-15  8:37     ` Dave Young
2017-05-15 11:10       ` Sabrina Dubroca
2017-05-15 13:18         ` Dave Young
2017-05-15 13:44           ` Sabrina Dubroca
2017-01-31 13:21 ` [PATCH 09/10] efi/x86: Add debug code to print cooked memmap Ard Biesheuvel
2017-02-01  9:48   ` [tip:efi/core] " tip-bot for Dave Young
2017-01-31 13:21 ` [PATCH 10/10] efi: libstub: Preserve .debug sections after absolute relocation check Ard Biesheuvel
2017-02-01  9:49   ` [tip:efi/core] efi/libstub: " tip-bot for Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c4c39c70c5fef43655019236bec8ba5e7273b868@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome