Skip to contentSkip to conversation

affs: Remove unused struct members in affs_root_head

PATCH In review Thorsten Blum 2 participants 4 messages Aug 26, 2024 – Aug 27, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 affs: Remove unused struct members in affs_root_head

Only ptype is actually used. Remove the other struct members.

---
 fs/affs/amigaffs.h | 6 ------
 1 file changed, 6 deletions(-)
fs/affs/amigaffs.h +0 -6
index 1b973a669d23..9b40ae618852 100644
@@ -49,12 +49,6 @@ struct affs_short_date {
 
 struct affs_root_head {
 	__be32 ptype;
-	__be32 spare1;
-	__be32 spare2;
-	__be32 hash_size;
-	__be32 spare3;
-	__be32 checksum;
-	__be32 hashtable[1];
 };
 
 struct affs_root_tail {
Signature · 1 line
2.46.0
#1 lore raw
Quoted 12 lines · Thorsten Blum

Only ptype is actually used. Remove the other struct members.

---
 fs/affs/amigaffs.h | 6 ------
 1 file changed, 6 deletions(-)
fs/affs/amigaffs.h +0 -0
index 1b973a669d23..9b40ae618852 100644

fs/affs/amigaffs.h struct affs_short_date { · line 52

Quoted 10 lines
fs/affs/amigaffs.h +0 -6
@@ -49,12 +49,6 @@ struct affs_short_date {
 
 struct affs_root_head {
 	__be32 ptype;
-	__be32 spare1;
-	__be32 spare2;
-	__be32 hash_size;
-	__be32 spare3;
-	__be32 checksum;
-	__be32 hashtable[1];
 };

This is removing documentation, in a way. Since I suspect you were looking at this due to hashtable, maybe just change that to [] and note that it (and the other fields) aren't used, but they're kept around to help document the format.

Signature · 1 line
Kees Cook
#2 lore raw
Quoted 14 lines · Kees Cook
Quoted 13 lines · Thorsten Blum

Only ptype is actually used. Remove the other struct members.

---
fs/affs/amigaffs.h | 6 ------

1 file changed, 6 deletions(-)
fs/affs/amigaffs.h +0 -0
index 1b973a669d23..9b40ae618852 100644
@@ -49,12 +49,6 @@ struct affs_short_date {
 
Quoted 14 lines

fs/affs/amigaffs.h struct affs_short_date { · line 52

Quoted 9 lines
fs/affs/amigaffs.h +0 -6
 struct affs_root_head {
 __be32 ptype;
- __be32 spare1;
- __be32 spare2;
- __be32 hash_size;
- __be32 spare3;
- __be32 checksum;
- __be32 hashtable[1];
 };

This is removing documentation, in a way. Since I suspect you were looking at this due to hashtable, maybe just change that to [] and note that it (and the other fields) aren't used, but they're kept around to help document the format.

Yes, I was looking at hashtable. I'll submit a v2.

Thanks,
Thorsten

#3 lore raw
Quoted 30 lines · Thorsten Blum
Quoted 14 lines · Kees Cook
Quoted 13 lines · Thorsten Blum

Only ptype is actually used. Remove the other struct members.

---
fs/affs/amigaffs.h | 6 ------

1 file changed, 6 deletions(-)
fs/affs/amigaffs.h +0 -0
index 1b973a669d23..9b40ae618852 100644
@@ -49,12 +49,6 @@ struct affs_short_date {
 
Quoted 14 lines

fs/affs/amigaffs.h struct affs_short_date { · line 52

Quoted 9 lines
fs/affs/amigaffs.h +0 -6
 struct affs_root_head {
 __be32 ptype;
- __be32 spare1;
- __be32 spare2;
- __be32 hash_size;
- __be32 spare3;
- __be32 checksum;
- __be32 hashtable[1];
 };

This is removing documentation, in a way. Since I suspect you were looking at this due to hashtable, maybe just change that to [] and note that it (and the other fields) aren't used, but they're kept around to help document the format.

Quoted 1 line

Yes, I was looking at hashtable. I'll submit a v2.

I submitted a new patch instead of a v2.