mirror of
https://github.com/torvalds/linux
synced 2024-10-04 18:33:42 +00:00
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>
This commit is contained in:
parent
9ca01c7adf
commit
2ce507f57b
|
@ -38,7 +38,7 @@ struct efivar_entry {
|
||||||
|
|
||||||
int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *,
|
int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *,
|
||||||
struct list_head *),
|
struct list_head *),
|
||||||
void *data, bool duplicates, struct list_head *head);
|
void *data, struct list_head *head);
|
||||||
|
|
||||||
int efivar_entry_add(struct efivar_entry *entry, struct list_head *head);
|
int efivar_entry_add(struct efivar_entry *entry, struct list_head *head);
|
||||||
void __efivar_entry_add(struct efivar_entry *entry, struct list_head *head);
|
void __efivar_entry_add(struct efivar_entry *entry, struct list_head *head);
|
||||||
|
|
|
@ -343,7 +343,7 @@ static int efivarfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
return efivar_init(efivarfs_callback, sb, true, &sfi->efivarfs_list);
|
return efivar_init(efivarfs_callback, sb, &sfi->efivarfs_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int efivarfs_get_tree(struct fs_context *fc)
|
static int efivarfs_get_tree(struct fs_context *fc)
|
||||||
|
|
|
@ -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
|
* efivar_init - build the initial list of EFI variables
|
||||||
* @func: callback function to invoke for every variable
|
* @func: callback function to invoke for every variable
|
||||||
* @data: function-specific data to pass to @func
|
* @data: function-specific data to pass to @func
|
||||||
* @duplicates: error if we encounter duplicates on @head?
|
|
||||||
* @head: initialised head of variable list
|
* @head: initialised head of variable list
|
||||||
*
|
*
|
||||||
* Get every EFI variable from the firmware and invoke @func. @func
|
* 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 *,
|
int efivar_init(int (*func)(efi_char16_t *, efi_guid_t, unsigned long, void *,
|
||||||
struct list_head *),
|
struct list_head *),
|
||||||
void *data, bool duplicates, struct list_head *head)
|
void *data, struct list_head *head)
|
||||||
{
|
{
|
||||||
unsigned long variable_name_size = 512;
|
unsigned long variable_name_size = 512;
|
||||||
efi_char16_t *variable_name;
|
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,
|
* we'll ever see a different variable name,
|
||||||
* and may end up looping here forever.
|
* and may end up looping here forever.
|
||||||
*/
|
*/
|
||||||
if (duplicates &&
|
if (variable_is_present(variable_name, &vendor_guid,
|
||||||
variable_is_present(variable_name, &vendor_guid,
|
|
||||||
head)) {
|
head)) {
|
||||||
dup_variable_bug(variable_name, &vendor_guid,
|
dup_variable_bug(variable_name, &vendor_guid,
|
||||||
variable_name_size);
|
variable_name_size);
|
||||||
|
|
Loading…
Reference in a new issue