Re: [PATCH v5 14/17] i3c: renesas: Organize structures to avoid unnecessary padding
[email protected] Mon, 13 Jul 2026 14:15:43 +0000
| Newsgroups | org.infradead.lists.linux-i3c |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The patch implicitly adds a new, completely unused field `bool resuming;` to `struct renesas_i3c` which also introduces unnecessary padding. -- --- Patch [14]: [PATCH v5 14/17] i3c: renesas: Organize structures to avoid unnecessary padding --- commit c33f65cddae91fbf173c604e3698103c59da9466 Author: Claudiu Beznea <[email protected]> i3c: renesas: Organize structures to avoid unnecessary padding This commit reorders the members of the renesas_i3c_cmd and renesas_i3c structures. The stated goal is to reduce padding and improve memory layout. > diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c > index 2cff7c6ae3692..a54c20ef5f6ea 100644 > --- a/drivers/i3c/master/renesas-i3c.c > +++ b/drivers/i3c/master/renesas-i3c.c [ ... ] > @@ -253,21 +253,22 @@ struct renesas_i3c_xferqueue { > }; > > struct renesas_i3c { > + void __iomem *regs; > + struct clk_bulk_data *clks; > + struct reset_control *presetn; > + struct reset_control *tresetn; > + struct renesas_i3c_xferqueue xferqueue; > struct i3c_master_controller base; > + u8 addrs[RENESAS_I3C_MAX_DEVS]; > + unsigned long rate; > enum i3c_internal_state internal_state; > - u16 maxdevs; > + bool resuming; [Severity: Medium] Does the addition of this boolean field contradict the commit message? The commit message states the goal is to reduce padding and improve memory layout, but this adds a completely unused field, resuming, to struct renesas_i3c that was not present before. Adding this 1-byte field between a 4-byte enum (internal_state) and a 4-byte u32 (free_pos) appears to introduce 3 bytes of internal padding to satisfy alignment requirements. Is it possible this field was accidentally included from another patch? > u32 free_pos; > u32 dyn_addr; > u32 i2c_STDBR; > u32 i3c_STDBR; -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=14 -- linux-i3c mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-i3c