mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Tomas Marek <tomas.marek@elrest.cz>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] i2c: add EFI i2c master driver
Date: Wed, 3 Apr 2024 14:13:59 +0200	[thread overview]
Message-ID: <Zg1IB9EmqjlyB-Gm@pengutronix.de> (raw)
In-Reply-To: <20240403074909.32256-1-tomas.marek@elrest.cz>

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 |



  parent reply	other threads:[~2024-04-03 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  7:49 Tomas Marek
2024-04-03 12:09 ` Sascha Hauer
2024-04-03 12:13 ` Sascha Hauer [this message]
2024-04-04  5:28   ` Tomas Marek
2024-04-04  6:35     ` Sascha Hauer

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=Zg1IB9EmqjlyB-Gm@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=tomas.marek@elrest.cz \
    /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