qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 02/21] libqos: Rename i2c_send and i2c_recv


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v6 02/21] libqos: Rename i2c_send and i2c_recv
Date: Fri, 3 Jan 2020 12:01:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/9/19 1:02 PM, Thomas Huth wrote:
On 29/11/2019 22.34, Oleinik, Alexander wrote:
The names i2c_send and i2c_recv collide with functions defined in
hw/i2c/core.c. This causes an error when linking against libqos and
softmmu simultaneously (for example when using qtest inproc). Rename the
libqos functions to avoid this.

Signed-off-by: Alexander Bulekov <address@hidden>
---
  tests/libqos/i2c.c   | 10 +++++-----
  tests/libqos/i2c.h   |  4 ++--
  tests/pca9552-test.c | 10 +++++-----
  3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/libqos/i2c.c b/tests/libqos/i2c.c
index 156114e745..38f800dbab 100644
--- a/tests/libqos/i2c.c
+++ b/tests/libqos/i2c.c
@@ -10,12 +10,12 @@
  #include "libqos/i2c.h"
  #include "libqtest.h"
-void i2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len)
+void qi2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len)
  {
      i2cdev->bus->send(i2cdev->bus, i2cdev->addr, buf, len);
  }
-void i2c_recv(QI2CDevice *i2cdev, uint8_t *buf, uint16_t len)
+void qi2c_recv(QI2CDevice *i2cdev, uint8_t *buf, uint16_t len)
  {
      i2cdev->bus->recv(i2cdev->bus, i2cdev->addr, buf, len);
  }

I'd prefer qos_i2c_send and qos_i2c_recv instead ... but that's just a
matter of taste.

Acked-by: Thomas Huth <address@hidden>

Agreed.

Renamed qos_*:
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]