[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3005245.mvXUDI8C0e@sven-desktop>
Date: Sun, 10 Aug 2025 10:54:44 +0200
From: Sven Eckelmann <sven@...fation.org>
To: Jonas Jelonek <jelonek.jonas@...il.com>, linux-i2c@...r.kernel.org,
devicetree@...r.kernel.org, Andi Shyti <andi.shyti@...nel.org>,
Chris Packham <chris.packham@...iedtelesis.co.nz>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Rob Herring <robh@...nel.org>,
Markus Elfring <Markus.Elfring@....de>
Cc: LKML <linux-kernel@...r.kernel.org>, Conor Dooley <conor+dt@...nel.org>,
Harshal Gohel <hg@...onwunderlich.de>,
Markus Stockhausen <markus.stockhausen@....de>
Subject:
Re: [PATCH v5 07/11] i2c: rtl9300: move setting SCL frequency to config_io
On Sunday, 10 August 2025 10:49:02 CEST Markus Elfring wrote:
> …
> > +++ b/drivers/i2c/busses/i2c-rtl9300.c
> …
> > +static int mshv_vtl_sint_ioctl_set_eventfd(struct mshv_vtl_set_eventfd __user *arg)
> > +{
> …
> > @@ -244,7 +245,7 @@ static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned s
> >
> > mutex_lock(&i2c->lock);
> > if (chan->sda_num != i2c->sda_num) {
> > - ret = rtl9300_i2c_config_io(i2c, chan->sda_pin);
> > + ret = rtl9300_i2c_config_io(i2c, chan);
> > if (ret)
> > goto out_unlock;
> …
>
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&i2c->lock);”?
> https://elixir.bootlin.com/linux/v6.16/source/include/linux/mutex.h#L225
https://lwn.net/Articles/934679/ ("From cleanup functions to classes")
Kind regards,
Sven
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists