Re: [PATCH 14/17] i3c: renesas: Organize structures to avoid unnecessary padding

Frank Li <[email protected]>
Newsgroups org.infradead.lists.linux-i3c,org.kernel.vger.linux-kernel,org.kernel.vger.linux-renesas-soc
Message-ID <ahCzgdbIs9th3Ovn@lizhi-Precision-Tower-5810>
On Fri, May 22, 2026 at 01:18:12PM +0300, Claudiu Beznea wrote:
> From: Claudiu Beznea <[email protected]>
>
> Reorder structure members to reduce padding and improve memory layout.
>
> Signed-off-by: Claudiu Beznea <[email protected]>
> ---
Reviewed-by: Frank Li <[email protected]>
>  drivers/i3c/master/renesas-i3c.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
> index 631c9c5d8038..5614ed99553c 100644
> --- a/drivers/i3c/master/renesas-i3c.c
> +++ b/drivers/i3c/master/renesas-i3c.c
> @@ -221,19 +221,19 @@ enum renesas_i3c_event {
>  };
>
>  struct renesas_i3c_cmd {
> +	const void *tx_buf;
> +	void *rx_buf;
> +	/* i2c xfer */
> +	u8 *i2c_buf;
> +	const struct i2c_msg *msg;
> +	int i2c_bytes_left;
> +	int i2c_is_last;
>  	u32 cmd0;
>  	u32 len;
> -	const void *tx_buf;
>  	u32 tx_count;
> -	void *rx_buf;
>  	u32 rx_count;
>  	u32 err;
>  	u8 rnw;
> -	/* i2c xfer */
> -	int i2c_bytes_left;
> -	int i2c_is_last;
> -	u8 *i2c_buf;
> -	const struct i2c_msg *msg;
>  };
>
>  struct renesas_i3c_xfer {
> @@ -253,21 +253,21 @@ 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;
> +	unsigned long rate;
>  	enum i3c_internal_state internal_state;
> -	u16 maxdevs;
>  	u32 free_pos;
>  	u32 dyn_addr;
>  	u32 i2c_STDBR;
>  	u32 i3c_STDBR;
>  	u32 extbr;
> -	unsigned long rate;
> +	u16 maxdevs;
>  	u8 addrs[RENESAS_I3C_MAX_DEVS];
> -	struct renesas_i3c_xferqueue xferqueue;
> -	void __iomem *regs;
> -	struct clk_bulk_data *clks;
> -	struct reset_control *presetn;
> -	struct reset_control *tresetn;
>  	u8 num_clks;
>  	u8 refclk_div;
>  };
> --
> 2.43.0
>

-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.