* [PATCH] affs: Replace one-element array with flexible-array member
@ 2024-08-27 12:48 Thorsten Blum
2024-08-28 11:27 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-08-27 12:48 UTC (permalink / raw)
To: dsterba, gustavoars, kees; +Cc: linux-fsdevel, linux-kernel, Thorsten Blum
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>
---
fs/affs/amigaffs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h
index 1b973a669d23..da3217ab6adb 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 {
--
2.46.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] affs: Replace one-element array with flexible-array member
2024-08-27 12:48 [PATCH] affs: Replace one-element array with flexible-array member Thorsten Blum
@ 2024-08-28 11:27 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2024-08-28 11:27 UTC (permalink / raw)
To: Thorsten Blum; +Cc: dsterba, gustavoars, kees, linux-fsdevel, linux-kernel
On Tue, Aug 27, 2024 at 02:48:40PM +0200, Thorsten Blum wrote:
> 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>
Added to affs queue, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-28 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 12:48 [PATCH] affs: Replace one-element array with flexible-array member Thorsten Blum
2024-08-28 11:27 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.