Re: [PATCH v5 3/3] hwmon: pmbus: add MPQ8646 driver

Markus Elfring <[email protected]>
Newsgroups org.kernel.vger.linux-hwmon,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
…
> +++ b/drivers/hwmon/pmbus/mpq8646.c
> @@ -0,0 +1,1253 @@
…
> +static int mpq8646_dbg_probe_smbus_rword(void *data, u64 val)
> +{
…
> +	mutex_lock(&priv->mps_lock);
> +	rc = i2c_smbus_read_word_data(priv->client, (u8)val);
…
> +	mutex_unlock(&priv->mps_lock);
> +	return 0;
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&priv->mps_lock);”?
https://elixir.bootlin.com/linux/v7.2-rc4/source/include/linux/mutex.h#L253

Regards,
Markus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.