linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Daniel Stodden <daniel.stodden@gmail.com>
Cc: linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH i2c-tools] i2ctransfer: add support for I2C_M_RECV_LEN
Date: Sun, 2 Aug 2020 23:38:28 +0200	[thread overview]
Message-ID: <20200802213828.GB13339@kunai> (raw)
In-Reply-To: <C5EC2F45-41AD-465E-83F9-BDE3640B02AA@gmail.com>

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

Hi Daniel,

> > +		__u16 len = recv_len ? msgs[i].buf[0] + 1 : msgs[i].len;
> 
> This is post-ioctl()? (Sorry, still not familiar enough with i2c-tools.)

Yes, read buffers are only printed after the ioctl. And 'print_msgs' is
probably the most complex function within this tool :/

> It isn’t wrong, but shouldn’t be necessary.
> Unless the adapter driver you’re using went astray. Not ruling that out.

I have just checked existing I2C_M_RECV_LEN handling. Quite some drivers
do it wrong. And there is no consistency in what they return. Lots of
things to fix there...

Thanks for the quick comments,

   Wolfram


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

  reply	other threads:[~2020-08-02 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 19:28 [PATCH i2c-tools] i2ctransfer: add support for I2C_M_RECV_LEN Wolfram Sang
2020-08-02 20:28 ` Daniel Stodden
2020-08-02 21:38   ` Wolfram Sang [this message]
2020-08-03  7:30     ` Daniel Stodden
2020-08-03  8:38       ` Wolfram Sang
2020-08-03 20:25         ` Daniel Stodden
2020-08-03 20:45           ` Wolfram Sang
2020-08-03 19:14 ` 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=20200802213828.GB13339@kunai \
    --to=wsa+renesas@sang-engineering.com \
    --cc=daniel.stodden@gmail.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;
as well as URLs for NNTP newsgroup(s).