public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Qianfeng Rong <rongqianfeng@vivo.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: wsa+renesas@sang-engineering.com,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH v3] i2c: busses: Use min() to improve code
Date: Wed, 9 Jul 2025 10:44:26 +0800	[thread overview]
Message-ID: <969dbbcd-e965-4c38-8817-56bd87a83f98@vivo.com> (raw)
In-Reply-To: <20250708120658.0000668a@huawei.com>


在 2025/7/8 19:06, Jonathan Cameron 写道:
>> -     for (; i > 0; i--, c->count--, c->buf++)
>> +     for (i = min(c->count, SSC_TXFIFO_SIZE - tx_fstat);
>> +             i > 0; i--, c->count--, c->buf++)
>          for (i = min(c->count, SSC_TXFIFO_SIZE - tx_fstat);
>               i > 0; i--, c->count--, c->buf++)
>                  st_i2c_write_tx_fifo(i2c_dev, *c->buf);
>
> So different alignment form what you have.
>
Thank you for pointing out the alignment issue in the code snippet,
Will do in the next version.

Best regards,
Qianfeng


      reply	other threads:[~2025-07-09  2:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  3:15 [PATCH v3] i2c: busses: Use min() to improve code Qianfeng Rong
2025-07-08 11:06 ` Jonathan Cameron
2025-07-09  2:44   ` Qianfeng Rong [this message]

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=969dbbcd-e965-4c38-8817-56bd87a83f98@vivo.com \
    --to=rongqianfeng@vivo.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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