aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorzhenwei pi <pizhenwei@bytedance.com>2023-07-28 10:20:04 +0800
committerHanna Czenczek <hreitz@redhat.com>2023-08-29 10:49:24 +0200
commit7017313882e39b6285e1a47dc474a395ba6f0e7d (patch)
tree2a1ff97c9157ed941d84c23b3b215c0bdc27f098 /scripts/qapi/source.py
parentthrottle: use enum ThrottleDirection instead of bool is_write (diff)
downloadqemu-7017313882e39b6285e1a47dc474a395ba6f0e7d.tar.xz
qemu-7017313882e39b6285e1a47dc474a395ba6f0e7d.zip
throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code
The first dimension of both to_check and bucket_types_size/bucket_types_units is used as throttle direction, use THROTTLE_MAX instead of hard coded number. Also use ARRAY_SIZE() to avoid hard coded number for the second dimension. Hanna noticed that the two array should be static. Yes, turn them into static variables. Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20230728022006.1098509-8-pizhenwei@bytedance.com> Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions