From cf84669ff41a0a97d031e152a6df7294208cfdfd Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 10 Sep 2026 15:07:29 +0200 Subject: [PATCH] efivars: name the parameters of efi_get_variable() consistently The definition calls the output parameters ret_attribute, ret_value and ret_size, as CODING_STYLE asks, but the declaration says attribute and the stub for builds without EFI support value and size. clang-tidy lets a prefix difference between declarations pass, while its bugprone-argument-comment compares argument comments against the first declaration it sees, so a comment that is right for one build is wrong for another. Use the definition's names in the declaration and the stub. --- src/basic/efivars.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basic/efivars.h b/src/basic/efivars.h index c0ec94af5b1..fd96740bd13 100644 --- a/src/basic/efivars.h +++ b/src/basic/efivars.h @@ -39,7 +39,7 @@ #if ENABLE_EFI -int efi_get_variable(const char *variable, uint32_t *attribute, void **ret_value, size_t *ret_size); +int efi_get_variable(const char *variable, uint32_t *ret_attribute, void **ret_value, size_t *ret_size); int efi_get_variable_string(const char *variable, char **ret); int efi_get_variable_path(const char *variable, char **ret); int efi_set_variable(const char *variable, const void *value, size_t size) _nonnull_if_nonzero_(2, 3); @@ -52,7 +52,7 @@ SecureBootMode efi_get_secure_boot_mode(void); #else -static inline int efi_get_variable(const char *variable, uint32_t *attribute, void **value, size_t *size) { +static inline int efi_get_variable(const char *variable, uint32_t *ret_attribute, void **ret_value, size_t *ret_size) { return -EOPNOTSUPP; }