lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aWoFLngIi5ZTtYzz@zenone.zhora.eu>
Date: Fri, 16 Jan 2026 13:36:39 +0100
From: Andi Shyti <andi.shyti@...nel.org>
To: Benoît Monin <benoit.monin@...tlin.com>
Cc: Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Jarkko Nikula <jarkko.nikula@...ux.intel.com>, Mika Westerberg <mika.westerberg@...ux.intel.com>, 
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Jan Dabros <jsd@...ihalf.com>, 
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Clark Williams <clrkwllms@...nel.org>, 
	Steven Rostedt <rostedt@...dmis.org>, Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
	Gregory CLEMENT <gregory.clement@...tlin.com>, Théo Lebrun <theo.lebrun@...tlin.com>, 
	Tawfik Bayouk <tawfik.bayouk@...ileye.com>, Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>, 
	Dmitry Guzman <dmitry.guzman@...ileye.com>, linux-i2c@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH v4 5/7] i2c: designware: Implement I2C_M_STOP support

Hi Benoit,

the patch looks good, just a couple of nits.

...

> @@ -805,18 +792,15 @@ static int i2c_dw_wait_transfer(struct dw_i2c_dev *dev)
>  }
>  
>  /*
> - * Prepare controller for a transaction and call i2c_dw_xfer_msg.
> + * Prepare controller for a transaction, start the transfer of the msgs
> + * and wait for completion, either a STOP or a error.
> + * Return the number of messages transferred or a negative error code.

we are ignoring the number of messages returned, though. Do we
really need it?

>   */
>  static int
> -i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
> +__i2c_dw_xfer_one_part(struct dw_i2c_dev *dev, struct i2c_msg *msgs, size_t num)
>  {
> -	struct dw_i2c_dev *dev = i2c_get_adapdata(adap);
>  	int ret;
>  
> -	dev_dbg(dev->dev, "%s: msgs: %d\n", __func__, num);
> -
> -	pm_runtime_get_sync(dev->dev);
> -
>  	reinit_completion(&dev->cmd_complete);
>  	dev->msgs = msgs;
>  	dev->msgs_num = num;

...

> +/*
> + * Verify that the message at index @idx can be processed as part
> + * of a single transaction. The @msgs array contains the messages
> + * of the transaction. The message is checked against its predecessor
> + * to ensure that it respects the limitation of the controller.
> + */
> +static inline bool

why does this need to be explicitely declared as inline? I don't
think it's necessary.

Thanks,
Andi

> +i2c_dw_msg_is_valid(struct dw_i2c_dev *dev, const struct i2c_msg *msgs, size_t idx)
> +{

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ