summaryrefslogtreecommitdiff
path: root/fs/efivarfs/vars.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-02-24 20:48:14 +0300
committerArd Biesheuvel <ardb@kernel.org>2024-02-25 11:43:39 +0300
commit2ce507f57ba9c78c080d4a050ebdc97263239de8 (patch)
treeba3feb55bf625a0ae514475cbc48966defe99831 /fs/efivarfs/vars.c
parent9ca01c7adf3993044f59934082087ebb9f7df6d5 (diff)
downloadlinux-2ce507f57ba9c78c080d4a050ebdc97263239de8.tar.xz
efivarfs: Drop 'duplicates' bool parameter on efivar_init()
The 'duplicates' bool argument is always true when efivar_init() is called from its only caller so let's just drop it instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'fs/efivarfs/vars.c')
-rw-r--r--fs/efivarfs/vars.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/efivarfs/vars.c b/fs/efivarfs/vars.c
index 2ad377818d0f..4d722af1014f 100644
--- a/fs/efivarfs/vars.c
+++ b/fs/efivarfs/vars.c
@@ -361,7 +361,6 @@ static void dup_variable_bug(efi_char16_t *str16, efi_guid_t *vendor_guid,
* efivar_init - build the initial list of EFI variables
* @func: callback function to invoke for every variable
* @data: function-specific data to pass to @func
- * @duplicates: error if we encounter duplicates on @head?
* @head: initialised head of variable list
*
* Get every EFI variable from the firmware and invoke @func. @func
@@ -371,7 +370,7 @@ static void dup_variable_bug(efi_char16_t *str16, efi_guid_t *vendor_guid,
*/
int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *,
struct list_head *),
- void *data, bool duplicates, struct list_head *head)
+ void *data, struct list_head *head)
{
unsigned long variable_name_size = 512;
efi_char16_t *variable_name;
@@ -414,8 +413,7 @@ int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *,
* we'll ever see a different variable name,
* and may end up looping here forever.
*/
- if (duplicates &&
- variable_is_present(variable_name, &vendor_guid,
+ if (variable_is_present(variable_name, &vendor_guid,
head)) {
dup_variable_bug(variable_name, &vendor_guid,
variable_name_size);