public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: "Gabbasov, Andrew" <Andrew_Gabbasov@mentor.com>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Eugeniu Rosca <erosca@de.adit-jv.com>,
	"Surachari, Bhuvanesh" <Bhuvanesh_Surachari@mentor.com>
Subject: Re: [PATCH v4] i2c: rcar: add support for I2C_M_RECV_LEN
Date: Thu, 7 Apr 2022 14:18:04 +0200	[thread overview]
Message-ID: <Yk7WfPUVa6l25RbM@shikoro> (raw)
In-Reply-To: <1649330034935.59928@mentor.com>

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]


> Besides avoiding of double assignment of that "length" byte to the buffer,
> this move will avoid pollution of the buffer in case of an error (invalid length).

This was intendend as a feature not a bug ;) This was the reason I put
the data to the buffer at the beginning, so people could see the wrong
data length. But yes, it can be argued if it should be logged somewhere
instead of being in the buffer. I'll check what other drivers do.

Sidenote: It is planned to add SMBus3 features somewhen. Then, there
won't be an invalid length anymore because it allows 255 byte transfers.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-04-07 12:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 10:07 [PATCH v4] i2c: rcar: add support for I2C_M_RECV_LEN Wolfram Sang
2022-04-06 17:18 ` Eugeniu Rosca
2022-04-06 19:48   ` Wolfram Sang
2022-04-07 11:13 ` Gabbasov, Andrew
2022-04-07 12:18   ` Wolfram Sang [this message]
2022-04-07 12:42     ` Gabbasov, Andrew
2022-04-07 13:04       ` Wolfram Sang
2022-04-15 21:36 ` Wolfram Sang

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=Yk7WfPUVa6l25RbM@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=Andrew_Gabbasov@mentor.com \
    --cc=Bhuvanesh_Surachari@mentor.com \
    --cc=erosca@de.adit-jv.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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