From: Thorsten Blum Date: Tue, 27 Aug 2024 12:48:40 +0000 (+0200) Subject: affs: Replace one-element array with flexible-array member X-Git-Tag: v6.12-rc1~208^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf751ad062b58d0750a5b9fb77d1400532a0ea44;p=thirdparty%2Fkernel%2Flinux.git affs: Replace one-element array with flexible-array member Replace the deprecated one-element array with a modern flexible-array member in the struct affs_root_head. Add a comment that most struct members are not used, but kept as documentation. Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Thorsten Blum Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h index 1b973a669d235..da3217ab6adbc 100644 --- a/fs/affs/amigaffs.h +++ b/fs/affs/amigaffs.h @@ -49,12 +49,13 @@ struct affs_short_date { struct affs_root_head { __be32 ptype; + /* The following fields are not used, but kept as documentation. */ __be32 spare1; __be32 spare2; __be32 hash_size; __be32 spare3; __be32 checksum; - __be32 hashtable[1]; + __be32 hashtable[]; }; struct affs_root_tail {