Re: [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API
From: Thomas Weißschuh
Date: Tue Feb 04 2025 - 04:50:53 EST
Hi Billy,
On 2025-02-04 17:17:01+0800, Billy Tsai wrote:
> The change is necessary to enable the use of the
> `i2c_get_dma_safe_msg_buf()` API, which requires a non-const
> `struct i2c_msg *` to operate. The `i2c_get_dma_safe_msg_buf()` function
> ensures safe handling of I2C messages when using DMA, making it essential
> for scenarios where DMA transfers are involved. By removing the `const`
> qualifier, this patch allows drivers to prepare and manage DMA-safe
> buffers directly.
This is missing a changelog to v1 of the series.
Also I asked before why it is not possible to change the signature of
i2c_get_dma_safe_msg_buf() to accept 'const struct i2c_msg *' [0].
That looks like the nicer solution to me.
> Signed-off-by: Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>
> ---
> drivers/i3c/master/dw-i3c-master.c | 2 +-
> drivers/i3c/master/i3c-master-cdns.c | 2 +-
> drivers/i3c/master/mipi-i3c-hci/core.c | 2 +-
> drivers/i3c/master/svc-i3c-master.c | 2 +-
> include/linux/i3c/master.h | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
<snip>
[0] https://lore.kernel.org/lkml/23854752-435e-432e-ba21-caf690c0cecc@xxxxxxxx/