Re: [PATCH] iio: ssp: Serialize watchdog timer state changes
From: Runyu Xiao
Date: Sun Oct 04 2026 - 05:33:12 EST
On Sun, Oct 04, 2026 at 11:37:59AM +0300, Andriy Shevchenko wrote:
> General rule of thumb is to defer a new version until the discussion is settled
> down in the previous round(s).
>
> Same Q here, can you reduce the gap by 4 bytes by rearranging the new members?
Yes. I checked both layouts with pahole on x86_64. In v2, wdt_enabled and
wdt_suspended are at offsets 80 and 81, and work_wdt starts at 88, leaving a
six-byte hole; sizeof(struct ssp_data) is 816 bytes.
Moving the two flags after time_syncing and before timestamp puts work_wdt at
offset 80 and the flags at offsets 203 and 204. There are then three bytes of
padding before timestamp at offset 208, and sizeof(struct ssp_data) is 808
bytes. This reduces the structure size by eight bytes, exceeding the four-byte
reduction requested. I will include this layout change with the other agreed
review changes in the next revision.
Thanks,
Runyu