From f73bf1b0573d67d3cd44180ae5fe0540e902688a Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Fri, 1 May 2026 09:08:15 +0100 Subject: [PATCH] plugins/amdgpu: Reduce scope of some globals A bunch of globals defined at the top of amdgpu_plugin.c only needs local scope so make it so. Signed-off-by: Tvrtko Ursulin --- plugins/amdgpu/amdgpu_plugin.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/amdgpu/amdgpu_plugin.c b/plugins/amdgpu/amdgpu_plugin.c index 94770e9e7..cce38a059 100644 --- a/plugins/amdgpu/amdgpu_plugin.c +++ b/plugins/amdgpu/amdgpu_plugin.c @@ -61,11 +61,11 @@ struct vma_metadata { static LIST_HEAD(update_vma_info_list); -size_t kfd_max_buffer_size; +static size_t kfd_max_buffer_size; -bool plugin_added_to_inventory = false; +static bool plugin_added_to_inventory = false; -bool plugin_disabled = false; +static bool plugin_disabled = false; struct handle_id { int handle; @@ -75,7 +75,7 @@ struct shared_handle_ids { int num_handles; struct handle_id *handles; }; -struct shared_handle_ids *shared_memory = NULL; +static struct shared_handle_ids *shared_memory = NULL; static mutex_t *shared_memory_mutex; @@ -87,10 +87,10 @@ static mutex_t *shared_memory_mutex; * in this case. The flag, parallel_disabled, is used to control whether the * optimization is enabled or disabled. */ -bool parallel_disabled = false; +static bool parallel_disabled = false; -pthread_t parallel_thread = 0; -int parallel_thread_result = 0; +static pthread_t parallel_thread = 0; +static int parallel_thread_result = 0; /**************************************************************************************************/ /* Call ioctl, restarting if it is interrupted */