Hi Tomas,

Thanks for the patch. I applied it with some minor adjustments.

On Wed, Apr 03, 2024 at 09:49:09AM +0200, Tomas Marek wrote:
> +static void i2c_msg_to_efi_op(
> +     const struct efi_i2c_priv *i2c_priv,
> +     const struct i2c_msg *msg,
> +     struct efi_i2c_operation **op)

No need to pass a pointer to a pointer to the array, changed that to
*op.

> +{
> +     unsigned int max_len = efi_i2c_max_len(i2c_priv, msg);
> +     unsigned int remaining = msg->len;
> +     u32 flags;
> +
> +     flags = (msg->flags & I2C_M_RD) ? EFI_I2C_FLAG_READ : 0;
> +
> +     do {
> +             unsigned int len = (remaining < max_len) ? remaining : max_len;

We have a min() macro I used instead.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to