All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] efi: selftest: Make record static
@ 2023-04-05 12:15 Bin Meng
  2023-04-05 12:15 ` [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static Bin Meng
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Bin Meng @ 2023-04-05 12:15 UTC (permalink / raw)
  To: Heinrich Schuchardt, Ilias Apalodimas, u-boot

record is only referenced in efi_selftest_exitbootservices.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
---

 lib/efi_selftest/efi_selftest_exitbootservices.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_selftest/efi_selftest_exitbootservices.c b/lib/efi_selftest/efi_selftest_exitbootservices.c
index 11b43fdd90..b090ce74d2 100644
--- a/lib/efi_selftest/efi_selftest_exitbootservices.c
+++ b/lib/efi_selftest/efi_selftest_exitbootservices.c
@@ -27,7 +27,7 @@ struct notification_context {
 
 static struct efi_boot_services *boottime;
 static struct efi_event *efi_st_event_notify;
-struct notification_record record;
+static struct notification_record record;
 
 struct notification_context context_before = {
 	.record = &record,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static
  2023-04-05 12:15 [PATCH 1/5] efi: selftest: Make record static Bin Meng
@ 2023-04-05 12:15 ` Bin Meng
  2023-04-05 13:09   ` Ilias Apalodimas
  2023-04-05 12:15 ` [PATCH 3/5] efi: loader: Make efi_event_queue and efi_register_notify_events static Bin Meng
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bin Meng @ 2023-04-05 12:15 UTC (permalink / raw)
  To: Heinrich Schuchardt, Ilias Apalodimas, u-boot

load_file() and load_file2() are only referenced in
efi_selftest_load_file.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
---

 lib/efi_selftest/efi_selftest_load_file.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/efi_selftest/efi_selftest_load_file.c b/lib/efi_selftest/efi_selftest_load_file.c
index 8784a76172..14df761172 100644
--- a/lib/efi_selftest/efi_selftest_load_file.c
+++ b/lib/efi_selftest/efi_selftest_load_file.c
@@ -206,11 +206,11 @@ static efi_status_t decompress(u8 **image)
  * @buffer_size:	(required) buffer size
  * @buffer:		buffer to which the file is to be loaded
  */
-efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
-			      struct efi_device_path *file_path,
-			      bool boot_policy,
-			      efi_uintn_t *buffer_size,
-			      void *buffer)
+static efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
+				     struct efi_device_path *file_path,
+				     bool boot_policy,
+				     efi_uintn_t *buffer_size,
+				     void *buffer)
 {
 	++load_file_call_count;
 	if (memcmp(file_path, dp_lf_file_remainder,
@@ -243,11 +243,11 @@ efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
  * @buffer_size:	(required) buffer size
  * @buffer:		buffer to which the file is to be loaded
  */
-efi_status_t EFIAPI load_file2(struct efi_load_file_protocol *this,
-			       struct efi_device_path *file_path,
-			       bool boot_policy,
-			       efi_uintn_t *buffer_size,
-			       void *buffer)
+static efi_status_t EFIAPI load_file2(struct efi_load_file_protocol *this,
+				      struct efi_device_path *file_path,
+				      bool boot_policy,
+				      efi_uintn_t *buffer_size,
+				      void *buffer)
 {
 	++load_file2_call_count;
 	if (memcmp(file_path, dp_lf2_file_remainder,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] efi: loader: Make efi_event_queue and efi_register_notify_events static
  2023-04-05 12:15 [PATCH 1/5] efi: selftest: Make record static Bin Meng
  2023-04-05 12:15 ` [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static Bin Meng
@ 2023-04-05 12:15 ` Bin Meng
  2023-04-05 13:09   ` Ilias Apalodimas
  2023-04-05 12:15 ` [PATCH 4/5] efi: loader: Make efi_mem static Bin Meng
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bin Meng @ 2023-04-05 12:15 UTC (permalink / raw)
  To: Heinrich Schuchardt, Ilias Apalodimas, u-boot

efi_event_queue and efi_register_notify_events are only referenced
in efi_boottime.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
---

 include/efi_loader.h          | 3 ---
 lib/efi_loader/efi_boottime.c | 4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/efi_loader.h b/include/efi_loader.h
index 1542b4b625..0a2083c39a 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -509,9 +509,6 @@ struct efi_register_notify_event {
 	struct list_head handles;
 };
 
-/* List of all events registered by RegisterProtocolNotify() */
-extern struct list_head efi_register_notify_events;
-
 /* called at pre-initialization */
 int efi_init_early(void);
 /* Initialize efi execution environment */
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index caaab685ee..d5065f296a 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -35,7 +35,7 @@ LIST_HEAD(efi_obj_list);
 __efi_runtime_data LIST_HEAD(efi_events);
 
 /* List of queued events */
-LIST_HEAD(efi_event_queue);
+static LIST_HEAD(efi_event_queue);
 
 /* Flag to disable timer activity in ExitBootServices() */
 static bool timers_enabled = true;
@@ -44,7 +44,7 @@ static bool timers_enabled = true;
 bool efi_st_keep_devices;
 
 /* List of all events registered by RegisterProtocolNotify() */
-LIST_HEAD(efi_register_notify_events);
+static LIST_HEAD(efi_register_notify_events);
 
 /* Handle of the currently executing image */
 static efi_handle_t current_image;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] efi: loader: Make efi_mem static
  2023-04-05 12:15 [PATCH 1/5] efi: selftest: Make record static Bin Meng
  2023-04-05 12:15 ` [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static Bin Meng
  2023-04-05 12:15 ` [PATCH 3/5] efi: loader: Make efi_event_queue and efi_register_notify_events static Bin Meng
@ 2023-04-05 12:15 ` Bin Meng
  2023-04-05 13:09   ` Ilias Apalodimas
  2023-04-05 12:15 ` [PATCH 5/5] efi: loader: Make efi_runtime_mmio static Bin Meng
  2023-04-05 13:08 ` [PATCH 1/5] efi: selftest: Make record static Ilias Apalodimas
  4 siblings, 1 reply; 10+ messages in thread
From: Bin Meng @ 2023-04-05 12:15 UTC (permalink / raw)
  To: Heinrich Schuchardt, Ilias Apalodimas, u-boot

efi_mem is only referenced in efi_memory.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
---

 lib/efi_loader/efi_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index b7bee98f79..219b520a0d 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -33,7 +33,7 @@ struct efi_mem_list {
 #define EFI_CARVE_OVERLAPS_NONRAM	-3
 
 /* This list contains all memory map items */
-LIST_HEAD(efi_mem);
+static LIST_HEAD(efi_mem);
 
 #ifdef CONFIG_EFI_LOADER_BOUNCE_BUFFER
 void *efi_bounce_buffer;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] efi: loader: Make efi_runtime_mmio static
  2023-04-05 12:15 [PATCH 1/5] efi: selftest: Make record static Bin Meng
                   ` (2 preceding siblings ...)
  2023-04-05 12:15 ` [PATCH 4/5] efi: loader: Make efi_mem static Bin Meng
@ 2023-04-05 12:15 ` Bin Meng
  2023-04-05 13:09   ` Ilias Apalodimas
  2023-04-05 13:08 ` [PATCH 1/5] efi: selftest: Make record static Ilias Apalodimas
  4 siblings, 1 reply; 10+ messages in thread
From: Bin Meng @ 2023-04-05 12:15 UTC (permalink / raw)
  To: Heinrich Schuchardt, Ilias Apalodimas, u-boot

efi_runtime_mmio is only referenced in efi_boottime.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
---

 lib/efi_loader/efi_runtime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index cee96bfc7f..bf54d6ad87 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -32,7 +32,7 @@ struct efi_runtime_mmio_list {
 };
 
 /* This list contains all runtime available mmio regions */
-LIST_HEAD(efi_runtime_mmio);
+static LIST_HEAD(efi_runtime_mmio);
 
 static efi_status_t __efi_runtime EFIAPI efi_unimplemented(void);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] efi: selftest: Make record static
  2023-04-05 12:15 [PATCH 1/5] efi: selftest: Make record static Bin Meng
                   ` (3 preceding siblings ...)
  2023-04-05 12:15 ` [PATCH 5/5] efi: loader: Make efi_runtime_mmio static Bin Meng
@ 2023-04-05 13:08 ` Ilias Apalodimas
  4 siblings, 0 replies; 10+ messages in thread
From: Ilias Apalodimas @ 2023-04-05 13:08 UTC (permalink / raw)
  To: Bin Meng; +Cc: Heinrich Schuchardt, u-boot

On Wed, Apr 05, 2023 at 08:15:15PM +0800, Bin Meng wrote:
> record is only referenced in efi_selftest_exitbootservices.c
> 
> Signed-off-by: Bin Meng <bmeng@tinylab.org>
> ---
> 
>  lib/efi_selftest/efi_selftest_exitbootservices.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/efi_selftest/efi_selftest_exitbootservices.c b/lib/efi_selftest/efi_selftest_exitbootservices.c
> index 11b43fdd90..b090ce74d2 100644
> --- a/lib/efi_selftest/efi_selftest_exitbootservices.c
> +++ b/lib/efi_selftest/efi_selftest_exitbootservices.c
> @@ -27,7 +27,7 @@ struct notification_context {
>  
>  static struct efi_boot_services *boottime;
>  static struct efi_event *efi_st_event_notify;
> -struct notification_record record;
> +static struct notification_record record;
>  
>  struct notification_context context_before = {
>  	.record = &record,
> -- 
> 2.34.1
> 
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static
  2023-04-05 12:15 ` [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static Bin Meng
@ 2023-04-05 13:09   ` Ilias Apalodimas
  0 siblings, 0 replies; 10+ messages in thread
From: Ilias Apalodimas @ 2023-04-05 13:09 UTC (permalink / raw)
  To: Bin Meng; +Cc: Heinrich Schuchardt, u-boot

On Wed, Apr 05, 2023 at 08:15:16PM +0800, Bin Meng wrote:
> load_file() and load_file2() are only referenced in
> efi_selftest_load_file.c
> 
> Signed-off-by: Bin Meng <bmeng@tinylab.org>
> ---
> 
>  lib/efi_selftest/efi_selftest_load_file.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/lib/efi_selftest/efi_selftest_load_file.c b/lib/efi_selftest/efi_selftest_load_file.c
> index 8784a76172..14df761172 100644
> --- a/lib/efi_selftest/efi_selftest_load_file.c
> +++ b/lib/efi_selftest/efi_selftest_load_file.c
> @@ -206,11 +206,11 @@ static efi_status_t decompress(u8 **image)
>   * @buffer_size:	(required) buffer size
>   * @buffer:		buffer to which the file is to be loaded
>   */
> -efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
> -			      struct efi_device_path *file_path,
> -			      bool boot_policy,
> -			      efi_uintn_t *buffer_size,
> -			      void *buffer)
> +static efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
> +				     struct efi_device_path *file_path,
> +				     bool boot_policy,
> +				     efi_uintn_t *buffer_size,
> +				     void *buffer)
>  {
>  	++load_file_call_count;
>  	if (memcmp(file_path, dp_lf_file_remainder,
> @@ -243,11 +243,11 @@ efi_status_t EFIAPI load_file(struct efi_load_file_protocol *this,
>   * @buffer_size:	(required) buffer size
>   * @buffer:		buffer to which the file is to be loaded
>   */
> -efi_status_t EFIAPI load_file2(struct efi_load_file_protocol *this,
> -			       struct efi_device_path *file_path,
> -			       bool boot_policy,
> -			       efi_uintn_t *buffer_size,
> -			       void *buffer)
> +static efi_status_t EFIAPI load_file2(struct efi_load_file_protocol *this,
> +				      struct efi_device_path *file_path,
> +				      bool boot_policy,
> +				      efi_uintn_t *buffer_size,
> +				      void *buffer)
>  {
>  	++load_file2_call_count;
>  	if (memcmp(file_path, dp_lf2_file_remainder,
> -- 
> 2.34.1
> 
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/5] efi: loader: Make efi_event_queue and efi_register_notify_events static
  2023-04-05 12:15 ` [PATCH 3/5] efi: loader: Make efi_event_queue and efi_register_notify_events static Bin Meng
@ 2023-04-05 13:09   ` Ilias Apalodimas
  0 siblings, 0 replies; 10+ messages in thread
From: Ilias Apalodimas @ 2023-04-05 13:09 UTC (permalink / raw)
  To: Bin Meng; +Cc: Heinrich Schuchardt, u-boot

On Wed, Apr 05, 2023 at 08:15:17PM +0800, Bin Meng wrote:
> efi_event_queue and efi_register_notify_events are only referenced
> in efi_boottime.c
> 
> Signed-off-by: Bin Meng <bmeng@tinylab.org>
> ---
> 
>  include/efi_loader.h          | 3 ---
>  lib/efi_loader/efi_boottime.c | 4 ++--
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 1542b4b625..0a2083c39a 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -509,9 +509,6 @@ struct efi_register_notify_event {
>  	struct list_head handles;
>  };
>  
> -/* List of all events registered by RegisterProtocolNotify() */
> -extern struct list_head efi_register_notify_events;
> -
>  /* called at pre-initialization */
>  int efi_init_early(void);
>  /* Initialize efi execution environment */
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index caaab685ee..d5065f296a 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -35,7 +35,7 @@ LIST_HEAD(efi_obj_list);
>  __efi_runtime_data LIST_HEAD(efi_events);
>  
>  /* List of queued events */
> -LIST_HEAD(efi_event_queue);
> +static LIST_HEAD(efi_event_queue);
>  
>  /* Flag to disable timer activity in ExitBootServices() */
>  static bool timers_enabled = true;
> @@ -44,7 +44,7 @@ static bool timers_enabled = true;
>  bool efi_st_keep_devices;
>  
>  /* List of all events registered by RegisterProtocolNotify() */
> -LIST_HEAD(efi_register_notify_events);
> +static LIST_HEAD(efi_register_notify_events);
>  
>  /* Handle of the currently executing image */
>  static efi_handle_t current_image;
> -- 
> 2.34.1
> 
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/5] efi: loader: Make efi_mem static
  2023-04-05 12:15 ` [PATCH 4/5] efi: loader: Make efi_mem static Bin Meng
@ 2023-04-05 13:09   ` Ilias Apalodimas
  0 siblings, 0 replies; 10+ messages in thread
From: Ilias Apalodimas @ 2023-04-05 13:09 UTC (permalink / raw)
  To: Bin Meng; +Cc: Heinrich Schuchardt, u-boot

On Wed, Apr 05, 2023 at 08:15:18PM +0800, Bin Meng wrote:
> efi_mem is only referenced in efi_memory.c
> 
> Signed-off-by: Bin Meng <bmeng@tinylab.org>
> ---
> 
>  lib/efi_loader/efi_memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
> index b7bee98f79..219b520a0d 100644
> --- a/lib/efi_loader/efi_memory.c
> +++ b/lib/efi_loader/efi_memory.c
> @@ -33,7 +33,7 @@ struct efi_mem_list {
>  #define EFI_CARVE_OVERLAPS_NONRAM	-3
>  
>  /* This list contains all memory map items */
> -LIST_HEAD(efi_mem);
> +static LIST_HEAD(efi_mem);
>  
>  #ifdef CONFIG_EFI_LOADER_BOUNCE_BUFFER
>  void *efi_bounce_buffer;
> -- 
> 2.34.1
> 
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/5] efi: loader: Make efi_runtime_mmio static
  2023-04-05 12:15 ` [PATCH 5/5] efi: loader: Make efi_runtime_mmio static Bin Meng
@ 2023-04-05 13:09   ` Ilias Apalodimas
  0 siblings, 0 replies; 10+ messages in thread
From: Ilias Apalodimas @ 2023-04-05 13:09 UTC (permalink / raw)
  To: Bin Meng; +Cc: Heinrich Schuchardt, u-boot

On Wed, Apr 05, 2023 at 08:15:19PM +0800, Bin Meng wrote:
> efi_runtime_mmio is only referenced in efi_boottime.c
> 
> Signed-off-by: Bin Meng <bmeng@tinylab.org>
> ---
> 
>  lib/efi_loader/efi_runtime.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
> index cee96bfc7f..bf54d6ad87 100644
> --- a/lib/efi_loader/efi_runtime.c
> +++ b/lib/efi_loader/efi_runtime.c
> @@ -32,7 +32,7 @@ struct efi_runtime_mmio_list {
>  };
>  
>  /* This list contains all runtime available mmio regions */
> -LIST_HEAD(efi_runtime_mmio);
> +static LIST_HEAD(efi_runtime_mmio);
>  
>  static efi_status_t __efi_runtime EFIAPI efi_unimplemented(void);
>  
> -- 
> 2.34.1
> 
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-04-05 14:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 12:15 [PATCH 1/5] efi: selftest: Make record static Bin Meng
2023-04-05 12:15 ` [PATCH 2/5] efi: selftest: Make load_file() and load_file2() static Bin Meng
2023-04-05 13:09   ` Ilias Apalodimas
2023-04-05 12:15 ` [PATCH 3/5] efi: loader: Make efi_event_queue and efi_register_notify_events static Bin Meng
2023-04-05 13:09   ` Ilias Apalodimas
2023-04-05 12:15 ` [PATCH 4/5] efi: loader: Make efi_mem static Bin Meng
2023-04-05 13:09   ` Ilias Apalodimas
2023-04-05 12:15 ` [PATCH 5/5] efi: loader: Make efi_runtime_mmio static Bin Meng
2023-04-05 13:09   ` Ilias Apalodimas
2023-04-05 13:08 ` [PATCH 1/5] efi: selftest: Make record static Ilias Apalodimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.