Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-05 Thread Jie Deng
On 2021/7/5 14:30, Viresh Kumar wrote: This is still not enough to convince me.  So I won't change them for now until I see it is the consensus of the majority. Do you see reqs[i] to ever be NULL here ? If not, then if (req) is like if (true). Why would you want to have something like that

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-05 Thread Viresh Kumar
On 05-07-21, 14:21, Jie Deng wrote: > > On 2021/7/5 10:43, Viresh Kumar wrote: > > On 02-07-21, 12:58, Andy Shevchenko wrote: > > > On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: > > > > +static int virtio_i2c_complete_reqs(struct virtqueue *vq, > > > > +

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-05 Thread Viresh Kumar
On 05-07-21, 14:22, Jie Deng wrote: > On 2021/7/5 12:38, Viresh Kumar wrote: > > On 05-07-21, 11:45, Jie Deng wrote: > > > On 2021/7/5 10:40, Viresh Kumar wrote: > > > > On 02-07-21, 16:46, Jie Deng wrote: > > > > The right way of doing this is is making this function return - Error > > > > on

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-05 Thread Jie Deng
On 2021/7/5 12:38, Viresh Kumar wrote: On 05-07-21, 11:45, Jie Deng wrote: On 2021/7/5 10:40, Viresh Kumar wrote: On 02-07-21, 16:46, Jie Deng wrote: The right way of doing this is is making this function return - Error on failure and 0 on success. There is no point returning number of

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-05 Thread Jie Deng
On 2021/7/5 10:43, Viresh Kumar wrote: On 02-07-21, 12:58, Andy Shevchenko wrote: On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: +static int virtio_i2c_complete_reqs(struct virtqueue *vq, + struct virtio_i2c_req *reqs, +

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
On 05-07-21, 11:45, Jie Deng wrote: > On 2021/7/5 10:40, Viresh Kumar wrote: > > On 02-07-21, 16:46, Jie Deng wrote: > > The right way of doing this is is making this function return - Error on > > failure > > and 0 on success. There is no point returning number of successful additions > > here.

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/2 17:58, Andy Shevchenko wrote: On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. The device

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/5 10:40, Viresh Kumar wrote: I think we missed the first deadline for 5.14-rc1 as Wolfram should be out of office now. Anyway lets make sure we fix all the pending bits before he is back and see if we can still pull it off by rc2. On 02-07-21, 16:46, Jie Deng wrote: diff --git

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Jie Deng
On 2021/7/5 10:43, Viresh Kumar wrote: On 02-07-21, 12:58, Andy Shevchenko wrote: On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: +static int virtio_i2c_complete_reqs(struct virtqueue *vq, + struct virtio_i2c_req *reqs, +

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
On 02-07-21, 12:58, Andy Shevchenko wrote: > On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: > > +static int virtio_i2c_complete_reqs(struct virtqueue *vq, > > + struct virtio_i2c_req *reqs, > > + struct i2c_msg *msgs, int nr, >

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-04 Thread Viresh Kumar
I think we missed the first deadline for 5.14-rc1 as Wolfram should be out of office now. Anyway lets make sure we fix all the pending bits before he is back and see if we can still pull it off by rc2. On 02-07-21, 16:46, Jie Deng wrote: > diff --git a/drivers/i2c/busses/i2c-virtio.c

Re: [PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-02 Thread Andy Shevchenko
On Fri, Jul 02, 2021 at 04:46:47PM +0800, Jie Deng wrote: > Add an I2C bus driver for virtio para-virtualization. > > The controller can be emulated by the backend driver in > any device model software by following the virtio protocol. > > The device specification can be found on >

[PATCH v12] i2c: virtio: add a virtio i2c frontend driver

2021-07-02 Thread Jie Deng
Add an I2C bus driver for virtio para-virtualization. The controller can be emulated by the backend driver in any device model software by following the virtio protocol. The device specification can be found on https://lists.oasis-open.org/archives/virtio-comment/202101/msg8.html. By