[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver
From: |
Viresh Kumar |
Subject: |
Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver |
Date: |
Thu, 25 Mar 2021 12:06:49 +0530 |
User-agent: |
NeoMutt/20180716-391-311a52 |
On 25-03-21, 14:17, Jie Deng wrote:
> i2c->adapter_num is set here, but used in vi2c_remove_adapters.
> when you goto out from while {...}, i2c->adapter_num is always 0,
> May be a bug ?
It certainly is, this should fix it:
diff --git a/tools/vhost-user-i2c/main.c b/tools/vhost-user-i2c/main.c
index 071493cbd5c5..65d27ef04d42 100644
--- a/tools/vhost-user-i2c/main.c
+++ b/tools/vhost-user-i2c/main.c
@@ -202,7 +202,7 @@ static void vi2c_remove_adapters(VuI2c *i2c)
VI2cAdapter *adapter;
int32_t i;
- for (i = 0; i < i2c->adapter_num; i++) {
+ for (i = 0; i < MAX_I2C_ADAPTER; i++) {
adapter = i2c->adapter[i];
if (!adapter) {
break;
--
viresh
- [PATCH 0/5] virtio: Implement generic vhost-user-i2c backend, Viresh Kumar, 2021/03/24
- [PATCH 1/5] hw/virtio: add boilerplate for vhost-user-i2c device, Viresh Kumar, 2021/03/24
- [PATCH 2/5] hw/virtio: add vhost-user-i2c-pci boilerplate, Viresh Kumar, 2021/03/24
- [PATCH 3/5] tools/vhost-user-i2c: Add backend driver, Viresh Kumar, 2021/03/24
- Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver, Jie Deng, 2021/03/25
- Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver,
Viresh Kumar <=
- Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver, Arnd Bergmann, 2021/03/25
- Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver, Viresh Kumar, 2021/03/26
- Re: [PATCH 3/5] tools/vhost-user-i2c: Add backend driver, Arnd Bergmann, 2021/03/26
[PATCH 4/5] docs: add a man page for vhost-user-i2c, Viresh Kumar, 2021/03/24
[PATCH 5/5] MAINTAINERS: Add entry for virtio-i2c, Viresh Kumar, 2021/03/24
Re: [PATCH 0/5] virtio: Implement generic vhost-user-i2c backend, no-reply, 2021/03/24