diff mbox series

[v2,3/4] efivarfs: Remove unused internal struct members

Message ID 20240328205041.76812-3-timschumi@gmx.de
State Accepted
Commit 89ea21d70d9c9968dfd10c7e30520d0f03d465c2
Headers show
Series [v2,1/4] efi: pstore: Request at most 512 bytes for variable names | expand

Commit Message

Tim Schumacher March 28, 2024, 8:50 p.m. UTC
The structure was moved to the efivarfs internals in commit 2d82e6227ea1
("efi: vars: Move efivar caching layer into efivarfs") after previously
being used as the data ABI for efivars until its removal in commit
0f5b2c69a4cb ("efi: vars: Remove deprecated 'efivars' sysfs interface").

As efivarfs only uses the structure for the variable name caching layer,
the data-related members were never in use. Remove them to avoid
implying that efivarfs is bound by the same restrictions that efivars
once had. While at it, remove the packed attribute, since we no longer
have to guarantee a stable layout.

Signed-off-by: Tim Schumacher <timschumi@gmx.de>
---
Changes from v1:
 - Split out documentation changes into a separate patch
 - Remove the packed attribute of the struct
---
 fs/efivarfs/internal.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--
2.44.0
diff mbox series

Patch

diff --git a/fs/efivarfs/internal.h b/fs/efivarfs/internal.h
index f7206158ee813..d71d2e08422f0 100644
--- a/fs/efivarfs/internal.h
+++ b/fs/efivarfs/internal.h
@@ -24,11 +24,8 @@  struct efivarfs_fs_info {
 struct efi_variable {
 	efi_char16_t  VariableName[EFI_VAR_NAME_LEN/sizeof(efi_char16_t)];
 	efi_guid_t    VendorGuid;
-	unsigned long DataSize;
-	__u8          Data[1024];
-	efi_status_t  Status;
 	__u32         Attributes;
-} __attribute__((packed));
+};

 struct efivar_entry {
 	struct efi_variable var;