* [PATCH] i3c: dw: make struct dw_i3c_cmd smaller
@ 2026-08-13 4:46 Jisheng Zhang
2026-08-13 20:38 ` Frank Li
0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2026-08-13 4:46 UTC (permalink / raw)
To: Alexandre Belloni, Frank Li; +Cc: linux-i3c, linux-kernel
The dw_i3c_cmd is dynamically allocated, make it smaller. For example
on 64bit platforms, we reduce the size from 48 bytes to 32 bytes.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/i3c/master/dw-i3c-master.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 6ba84a97765f..d6f84f0f4c2d 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -247,10 +247,10 @@ struct dw_i3c_cmd {
u32 cmd_lo;
u32 cmd_hi;
u16 tx_len;
- const void *tx_buf;
u16 rx_len;
- void *rx_buf;
u8 error;
+ const void *tx_buf;
+ void *rx_buf;
};
struct dw_i3c_xfer {
--
2.51.0
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] i3c: dw: make struct dw_i3c_cmd smaller
2026-08-13 4:46 [PATCH] i3c: dw: make struct dw_i3c_cmd smaller Jisheng Zhang
@ 2026-08-13 20:38 ` Frank Li
0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2026-08-13 20:38 UTC (permalink / raw)
To: Jisheng Zhang; +Cc: Alexandre Belloni, Frank Li, linux-i3c, linux-kernel
On Thu, Aug 13, 2026 at 12:46:03PM +0800, Jisheng Zhang wrote:
> The dw_i3c_cmd is dynamically allocated, make it smaller. For example
> on 64bit platforms, we reduce the size from 48 bytes to 32 bytes.
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> drivers/i3c/master/dw-i3c-master.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index 6ba84a97765f..d6f84f0f4c2d 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -247,10 +247,10 @@ struct dw_i3c_cmd {
> u32 cmd_lo;
> u32 cmd_hi;
> u16 tx_len;
> - const void *tx_buf;
> u16 rx_len;
only switch rx_len and tx_buf should be enough. otherwise there are data
pad after u8 error.
Frank
> - void *rx_buf;
> u8 error;
> + const void *tx_buf;
> + void *rx_buf;
> };
>
> struct dw_i3c_xfer {
> --
> 2.51.0
>
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-13 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 4:46 [PATCH] i3c: dw: make struct dw_i3c_cmd smaller Jisheng Zhang
2026-08-13 20:38 ` Frank Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox