qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [PATCH 15/27] iommu: Add IOMMU index argument to notifier


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH 15/27] iommu: Add IOMMU index argument to notifier APIs
Date: Mon, 4 Jun 2018 16:23:26 +0100

On 4 June 2018 at 16:09, Alex Bennée <address@hidden> wrote:
>
> Peter Maydell <address@hidden> writes:
>
>> On 23 May 2018 at 10:08, Alex Bennée <address@hidden> wrote:
>>> Its a minor thing but are we ever expecting iommu_idx to ever be
>>> negative?
>>
>> Coming back to this one -- no, we don't expect negative iommu_idxs.
>> But on the other hand we don't ever expect negative TCG mmu_indexes
>> either, and we use 'int' for those...
>
> That's a clean-up right there ;-)
>
> As I said it's a minor thing but I generally favour clearest type for
> the range you are going to see. That said the enum stuff on the older
> clangs did confuse me so there is that...

I prefer the "don't use unsigned unless you need the
unsigned-integer semantics" approach. (For instance most
loop indexes won't ever be negative, but "int i" is the
usual thing there.)

thanks
-- PMM



reply via email to

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