Re: Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType

2023-06-26 Thread zhenwei pi
On 6/27/23 05:24, Alberto Garcia wrote: On Sun 25 Jun 2023 04:56:27 PM +08, zhenwei pi wrote: Use enum ThrottleTimerType instead of number index. +typedef enum { +THROTTLE_TIMER_READ = 0, +THROTTLE_TIMER_WRITE, +THROTTLE_TIMER_MAX +} ThrottleTimerType; If you're doing this I

Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType

2023-06-26 Thread Alberto Garcia
On Sun 25 Jun 2023 04:56:27 PM +08, zhenwei pi wrote: > Use enum ThrottleTimerType instead of number index. > +typedef enum { > +THROTTLE_TIMER_READ = 0, > +THROTTLE_TIMER_WRITE, > +THROTTLE_TIMER_MAX > +} ThrottleTimerType; If you're doing this I suppose you could also change 'bool

[PATCH 1/5] throttle: introduce enum ThrottleTimerType

2023-06-25 Thread zhenwei pi
Use enum ThrottleTimerType instead of number index. Signed-off-by: zhenwei pi --- include/qemu/throttle.h | 12 +--- util/throttle.c | 16 +--- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index