On 23/02/2022 12:39, Christoph Hellwig wrote:
On Wed, Feb 23, 2022 at 12:21:10PM +0000, John Garry wrote:
I am just wondering did you consider using struct_group() for safety?
I don't think the scsi_cmnd members have special ordering apart from
co-locating related members.
Here's how it could look (on top of yours):
Besides being ugly as hell I don't see the benefit. Quite contrary,
a lot of these fields are properly initialized later and we can drop
the zeroing as well, but I'd rather do that separately and with a proper
audit.
.
ok, fine - so the init may be removed later.
For the record, advantages now could include:
- prob more efficient
- somewhat safer coding practice
- more condense C code
But, for sure, it's not so pretty to have this sub-struct.
Anyway, I don't feel too strongly about it and it was just a suggestion.
Thanks,
John