* [PATCH] affs: Remove unused struct members in affs_root_head
@ 2024-08-26 14:27 Thorsten Blum
2024-08-26 20:08 ` Kees Cook
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Blum @ 2024-08-26 14:27 UTC (permalink / raw)
To: dsterba, gustavoars, kees; +Cc: linux-fsdevel, linux-kernel, Thorsten Blum
Only ptype is actually used. Remove the other struct members.
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
fs/affs/amigaffs.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h
index 1b973a669d23..9b40ae618852 100644
--- a/fs/affs/amigaffs.h
+++ b/fs/affs/amigaffs.h
@@ -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 {
--
2.46.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] affs: Remove unused struct members in affs_root_head
2024-08-26 14:27 [PATCH] affs: Remove unused struct members in affs_root_head Thorsten Blum
@ 2024-08-26 20:08 ` Kees Cook
2024-08-26 20:48 ` Thorsten Blum
0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2024-08-26 20:08 UTC (permalink / raw)
To: Thorsten Blum; +Cc: dsterba, gustavoars, linux-fsdevel, linux-kernel
On Mon, Aug 26, 2024 at 04:27:36PM +0200, Thorsten Blum wrote:
> Only ptype is actually used. Remove the other struct members.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
> ---
> fs/affs/amigaffs.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h
> index 1b973a669d23..9b40ae618852 100644
> --- a/fs/affs/amigaffs.h
> +++ b/fs/affs/amigaffs.h
> @@ -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.
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] affs: Remove unused struct members in affs_root_head
2024-08-26 20:08 ` Kees Cook
@ 2024-08-26 20:48 ` Thorsten Blum
2024-08-27 12:51 ` Thorsten Blum
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Blum @ 2024-08-26 20:48 UTC (permalink / raw)
To: Kees Cook; +Cc: dsterba, Gustavo A. R. Silva, linux-fsdevel, linux-kernel
On 26. Aug 2024, at 22:08, Kees Cook <kees@kernel.org> wrote:
> On Mon, Aug 26, 2024 at 04:27:36PM +0200, Thorsten Blum wrote:
>> Only ptype is actually used. Remove the other struct members.
>>
>> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
>> ---
>> fs/affs/amigaffs.h | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h
>> index 1b973a669d23..9b40ae618852 100644
>> --- a/fs/affs/amigaffs.h
>> +++ b/fs/affs/amigaffs.h
>> @@ -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.
Yes, I was looking at hashtable. I'll submit a v2.
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] affs: Remove unused struct members in affs_root_head
2024-08-26 20:48 ` Thorsten Blum
@ 2024-08-27 12:51 ` Thorsten Blum
0 siblings, 0 replies; 4+ messages in thread
From: Thorsten Blum @ 2024-08-27 12:51 UTC (permalink / raw)
To: Kees Cook; +Cc: dsterba, Gustavo A. R. Silva, linux-fsdevel, LKML
On 26. Aug 2024, at 22:48, Thorsten Blum <thorsten.blum@toblux.com> wrote:
> On 26. Aug 2024, at 22:08, Kees Cook <kees@kernel.org> wrote:
>> On Mon, Aug 26, 2024 at 04:27:36PM +0200, Thorsten Blum wrote:
>>> Only ptype is actually used. Remove the other struct members.
>>>
>>> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
>>> ---
>>> fs/affs/amigaffs.h | 6 ------
>>> 1 file changed, 6 deletions(-)
>>>
>>> diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h
>>> index 1b973a669d23..9b40ae618852 100644
>>> --- a/fs/affs/amigaffs.h
>>> +++ b/fs/affs/amigaffs.h
>>> @@ -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.
>
> Yes, I was looking at hashtable. I'll submit a v2.
I submitted a new patch instead of a v2.
Link: https://lore.kernel.org/linux-kernel/20240827124839.81288-2-thorsten.blum@toblux.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-27 12:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 14:27 [PATCH] affs: Remove unused struct members in affs_root_head Thorsten Blum
2024-08-26 20:08 ` Kees Cook
2024-08-26 20:48 ` Thorsten Blum
2024-08-27 12:51 ` Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).