[PATCH v1 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API
Thomas Weißschuh
linux at weissschuh.net
Wed Jan 22 00:42:27 PST 2025
On 2025-01-21 19:07:55+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.
Why not modify i2c_get_dma_safe_msg_buf() to accept
'const struct i2c_msg' instead?
> Signed-off-by: Billy Tsai <billy_tsai at aspeedtech.com>
> ---
> 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(-)
More information about the linux-i3c
mailing list