diff mbox series

[1/3] exec: Make the MemOp enum cast explicit

Message ID 20240618224528.878425-1-rkir@google.com (mailing list archive)
State New, archived
Headers show
Series [1/3] exec: Make the MemOp enum cast explicit | expand

Commit Message

Roman Kiryanov June 18, 2024, 10:45 p.m. UTC
to use the QEMU headers with a C++ compiler.

Google-Bug-Id: 331190993
Change-Id: I785f2e65d192287f1f964d2840131b653755648c
Signed-off-by: Roman Kiryanov <rkir@google.com>
---
 include/exec/memop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Henderson June 18, 2024, 10:59 p.m. UTC | #1
On 6/18/24 15:45, Roman Kiryanov wrote:
> to use the QEMU headers with a C++ compiler.
> 
> Google-Bug-Id: 331190993
> Change-Id: I785f2e65d192287f1f964d2840131b653755648c
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
>   include/exec/memop.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/exec/memop.h b/include/exec/memop.h
> index 06417ff361..f881fe7af4 100644
> --- a/include/exec/memop.h
> +++ b/include/exec/memop.h
> @@ -161,7 +161,7 @@ static inline MemOp size_memop(unsigned size)
>       /* Power of 2 up to 8.  */
>       assert((size & (size - 1)) == 0 && size >= 1 && size <= 8);
>   #endif
> -    return ctz32(size);
> +    return (MemOp)ctz32(size);
>   }
>   

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


r~
Philippe Mathieu-Daudé June 19, 2024, 10:40 a.m. UTC | #2
On 19/6/24 00:45, Roman Kiryanov wrote:
> to use the QEMU headers with a C++ compiler.
> 
> Google-Bug-Id: 331190993
> Change-Id: I785f2e65d192287f1f964d2840131b653755648c
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
>   include/exec/memop.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

and queued, thanks!
Philippe Mathieu-Daudé June 19, 2024, 10:49 a.m. UTC | #3
On 19/6/24 12:40, Philippe Mathieu-Daudé wrote:
> On 19/6/24 00:45, Roman Kiryanov wrote:
>> to use the QEMU headers with a C++ compiler.
>>
>> Google-Bug-Id: 331190993

I searched for this on 
https://developers.google.com/issue-tracker/concepts/searches but no 
hit, is this public information?

>> Change-Id: I785f2e65d192287f1f964d2840131b653755648c
>> Signed-off-by: Roman Kiryanov <rkir@google.com>
>> ---
>>   include/exec/memop.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> and queued, thanks!
diff mbox series

Patch

diff --git a/include/exec/memop.h b/include/exec/memop.h
index 06417ff361..f881fe7af4 100644
--- a/include/exec/memop.h
+++ b/include/exec/memop.h
@@ -161,7 +161,7 @@  static inline MemOp size_memop(unsigned size)
     /* Power of 2 up to 8.  */
     assert((size & (size - 1)) == 0 && size >= 1 && size <= 8);
 #endif
-    return ctz32(size);
+    return (MemOp)ctz32(size);
 }
 
 /* Big endianness from MemOp.  */