qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v4 14/15] hw/i2c: Extract i2c_do_start_transfer() from i2c_st


From: Richard Henderson
Subject: Re: [PATCH v4 14/15] hw/i2c: Extract i2c_do_start_transfer() from i2c_start_transfer()
Date: Wed, 16 Jun 2021 17:21:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 6/16/21 2:42 PM, Philippe Mathieu-Daudé wrote:
+static int i2c_do_start_transfer(I2CBus *bus, uint8_t address,
+                                 enum i2c_event event)
  {
      I2CSlaveClass *sc;
      I2CNode *node;
      bool bus_scanned = false;
+ assert(event == I2C_START_RECV || event == I2C_START_SEND);

I don't think you need the assert, given that its scope is limited, and there will be exactly 3 users that immediately follow. Document it if you like.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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