All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Jie Deng <jie.deng@intel.com>
Cc: linux-i2c@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, wsa@kernel.org,
	wsa+renesas@sang-engineering.com, mst@redhat.com, arnd@arndb.de,
	jasowang@redhat.com, andriy.shevchenko@linux.intel.com,
	yu1.wang@intel.com, shuo.a.liu@intel.com, conghui.chen@intel.com,
	stefanha@redhat.com
Subject: Re: [PATCH v11] i2c: virtio: add a virtio i2c frontend driver
Date: Fri, 2 Jul 2021 10:26:33 +0530	[thread overview]
Message-ID: <20210702045633.gblpud7wcffd5kyj@vireshk-i7> (raw)
In-Reply-To: <34092cb2-03f9-231d-8769-4e45ed51c30f@intel.com>

On 02-07-21, 11:36, Jie Deng wrote:
> OK. Let's add the following two lines to make sure that msg_buf is only
> sent when the msgs len is not zero. And backend judges whether it is
> a zero-length request by checking the number of elements received.
> 
>  + if (msgs[i].len) {
>            reqs[i].buf = i2c_get_dma_safe_msg_buf(&msgs[i], 1);
>            if (!reqs[i].buf)
>                    break;
> 
>           sg_init_one(&msg_buf, reqs[i].buf, msgs[i].len);
> 
>           if (msgs[i].flags & I2C_M_RD)
>                   sgs[outcnt + incnt++] = &msg_buf;
>           else
>                   sgs[outcnt++] = &msg_buf;
> +}

Perfect. Thanks.

-- 
viresh

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Jie Deng <jie.deng@intel.com>
Cc: yu1.wang@intel.com, arnd@arndb.de, mst@redhat.com,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, wsa@kernel.org,
	wsa+renesas@sang-engineering.com, linux-i2c@vger.kernel.org,
	stefanha@redhat.com, shuo.a.liu@intel.com,
	andriy.shevchenko@linux.intel.com, conghui.chen@intel.com
Subject: Re: [PATCH v11] i2c: virtio: add a virtio i2c frontend driver
Date: Fri, 2 Jul 2021 10:26:33 +0530	[thread overview]
Message-ID: <20210702045633.gblpud7wcffd5kyj@vireshk-i7> (raw)
In-Reply-To: <34092cb2-03f9-231d-8769-4e45ed51c30f@intel.com>

On 02-07-21, 11:36, Jie Deng wrote:
> OK. Let's add the following two lines to make sure that msg_buf is only
> sent when the msgs len is not zero. And backend judges whether it is
> a zero-length request by checking the number of elements received.
> 
>  + if (msgs[i].len) {
>            reqs[i].buf = i2c_get_dma_safe_msg_buf(&msgs[i], 1);
>            if (!reqs[i].buf)
>                    break;
> 
>           sg_init_one(&msg_buf, reqs[i].buf, msgs[i].len);
> 
>           if (msgs[i].flags & I2C_M_RD)
>                   sgs[outcnt + incnt++] = &msg_buf;
>           else
>                   sgs[outcnt++] = &msg_buf;
> +}

Perfect. Thanks.

-- 
viresh
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2021-07-02  4:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  3:24 [PATCH v11] i2c: virtio: add a virtio i2c frontend driver Jie Deng
2021-07-01  3:24 ` Jie Deng
2021-07-01  4:04 ` Viresh Kumar
2021-07-01  4:04   ` Viresh Kumar
2021-07-01  6:10   ` Jie Deng
2021-07-01  6:10     ` Jie Deng
2021-07-01  6:18     ` Viresh Kumar
2021-07-01  6:18       ` Viresh Kumar
2021-07-02  3:36       ` Jie Deng
2021-07-02  3:36         ` Jie Deng
2021-07-02  4:56         ` Viresh Kumar [this message]
2021-07-02  4:56           ` Viresh Kumar
2021-07-01 19:24   ` Wolfram Sang
2021-07-02  4:55     ` Viresh Kumar
2021-07-02  4:55       ` Viresh Kumar
2021-07-02  6:22       ` Wolfram Sang
2021-07-02  6:52       ` Jie Deng
2021-07-02  6:52         ` Jie Deng
2021-07-02  6:56         ` Viresh Kumar
2021-07-02  6:56           ` Viresh Kumar
2021-07-02  7:11           ` Wolfram Sang
2021-07-02  7:15           ` Jie Deng
2021-07-02  7:15             ` Jie Deng
2021-07-02  7:21             ` Viresh Kumar
2021-07-02  7:21               ` Viresh Kumar
2021-07-02  7:36               ` Wolfram Sang
2021-07-01  8:50 ` kernel test robot
2021-07-01  8:50   ` kernel test robot
2021-07-01  8:50   ` kernel test robot
2021-07-01 10:00 ` kernel test robot
2021-07-01 10:00   ` kernel test robot
2021-07-01 10:00   ` kernel test robot
2021-07-02  3:12   ` Jie Deng
2021-07-02  3:12     ` Jie Deng
2021-07-02  3:12     ` Jie Deng
2021-07-02  6:38     ` [kbuild-all] " Rong Chen
2021-07-02  6:38       ` Rong Chen
2021-07-01 10:45 ` Andy Shevchenko
2021-07-01 10:45   ` Andy Shevchenko
2021-07-02  1:05   ` Jie Deng
2021-07-02  1:05     ` Jie Deng

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=20210702045633.gblpud7wcffd5kyj@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=conghui.chen@intel.com \
    --cc=jasowang@redhat.com \
    --cc=jie.deng@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=shuo.a.liu@intel.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@kernel.org \
    --cc=yu1.wang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.