[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.0?] decodetree: Use Python3 floor division operator
From: |
Richard Henderson |
Subject: |
Re: [PATCH-for-5.0?] decodetree: Use Python3 floor division operator |
Date: |
Mon, 30 Mar 2020 11:46:23 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 3/30/20 10:14 AM, Richard Henderson wrote:
> On 3/30/20 5:13 AM, Philippe Mathieu-Daudé wrote:
>> This script started using Python2, where the 'classic' division
>> operator returns the floor result. In commit 3d004a371 we started
>> to use Python3, where the division operator returns the float
>> result ('true division').
>> To keep the same behavior, use the 'floor division' operator "//"
>> which returns the floor result.
>>
>> Fixes: 3d004a371
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> ---
>> We didn't notice it because only the RX port (which uses the
>> --varinsnwidth option, and got merged very recently) triggers
>> these problems.
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> ---
>> scripts/decodetree.py | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>
> Reviewed-by: Richard Henderson <address@hidden>
Queued to tcg-next for 5.0.
r~