[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] i2c: Add asserts for second smbus i2c_start_
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2] i2c: Add asserts for second smbus i2c_start_transfer() |
Date: |
Mon, 24 Oct 2016 16:50:07 +0100 |
On 24 October 2016 at 16:42, <address@hidden> wrote:
> From: Corey Minyard <address@hidden>
>
> Some SMBus operations restart the transfer to convert from
> write to read mode without an intervening i2c_end_transfer().
> The second call cannot fail, so the return code is unchecked,
> but this causes Coverity to complain. So add some asserts
> and documentation about this.
>
> Signed-off-by: Corey Minyard <address@hidden>
> ---
> hw/i2c/core.c | 7 ++++++-
> hw/i2c/smbus.c | 12 +++++++++---
> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> Changes since v1:
>
> * Fixed the comments, I should have run it through checkpatch.
>
> * Fixed the asserts to avoid side effects.
Applied to target-arm.next, thanks.
-- PMM