Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <thorsten.blum@toblux.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Thorsten Blum and committed by
David Sterba
bf751ad0 112bcd25

+2 -1
+2 -1
fs/affs/amigaffs.h
··· 49 49 50 50 struct affs_root_head { 51 51 __be32 ptype; 52 + /* The following fields are not used, but kept as documentation. */ 52 53 __be32 spare1; 53 54 __be32 spare2; 54 55 __be32 hash_size; 55 56 __be32 spare3; 56 57 __be32 checksum; 57 - __be32 hashtable[1]; 58 + __be32 hashtable[]; 58 59 }; 59 60 60 61 struct affs_root_tail {