public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>,
	"pgaj@cadence.com" <pgaj@cadence.com>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	"conor.culhane@silvaco.com" <conor.culhane@silvaco.com>,
	"aniketmaurya@google.com" <aniketmaurya@google.com>,
	"Shyam-sundar.S-k@amd.com" <Shyam-sundar.S-k@amd.com>,
	"jarkko.nikula@linux.intel.com" <jarkko.nikula@linux.intel.com>,
	"wsa+renesas@sang-engineering.com"
	<wsa+renesas@sang-engineering.com>,
	"xiaopei01@kylinos.cn" <xiaopei01@kylinos.cn>,
	"Guruvendra.Punugupati@amd.com" <Guruvendra.Punugupati@amd.com>,
	"linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	BMC-SW <BMC-SW@aspeedtech.com>
Subject: Re: [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API
Date: Tue, 4 Feb 2025 17:56:17 +0100	[thread overview]
Message-ID: <2025020416561726c9efa0@mail.local> (raw)
In-Reply-To: <f05fb969-0632-48a6-afcd-c526c8568d4b@t-8ch.de>

On 04/02/2025 17:50:14+0100, Thomas Weißschuh wrote:
> Hi Billy,
> 
> On 2025-02-04 10:09:31+0000, Billy Tsai wrote:
> > > 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.
> 
> > The i2c_get_dma_safe_msg_buf() function has existed for a long time,
> > but I do not know the original reason why it declares struct i2c_msg *
> > without const.
> 
> I would guess that nobody ever cared before.
> 
> > However, I believe this is because the
> > i2c_put_dma_safe_msg_buf() function modifies the buffer data, so for
> > consistency, it is declared without const.
> 
> IMO that's a weak argument.
> Maybe the maintainers have a preference?
> 

I guess Wolfram will be the one have the preference, I'm fine using the
existing API as-is.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2025-02-04 16:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  9:17 [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API Billy Tsai
2025-02-04  9:17 ` [PATCH v2 2/2] i3c: mipi-i3c-hci: Use I2C DMA-safe api Billy Tsai
2025-02-04 15:16   ` Mukesh Kumar Savaliya
2025-02-05 11:28     ` Jarkko Nikula
2025-02-05 16:51   ` Frank Li
2025-02-04  9:50 ` [PATCH v2 1/2] i3c: Remove the const qualifier from i2c_msg pointer in i2c_xfers API Thomas Weißschuh
2025-02-04 10:09   ` Billy Tsai
2025-02-04 16:50     ` Thomas Weißschuh
2025-02-04 16:56       ` Alexandre Belloni [this message]
2025-02-17  9:57         ` wsa+renesas
2025-02-05 16:50 ` Frank Li
2025-02-20 22:09 ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025020416561726c9efa0@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=BMC-SW@aspeedtech.com \
    --cc=Guruvendra.Punugupati@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=aniketmaurya@google.com \
    --cc=billy_tsai@aspeedtech.com \
    --cc=conor.culhane@silvaco.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=miquel.raynal@bootlin.com \
    --cc=pgaj@cadence.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=xiaopei01@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox