[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/49] script/codeconverter/qom_type_info: Deprecate MakeTypeRegis
From: |
Paolo Bonzini |
Subject: |
[PULL 33/49] script/codeconverter/qom_type_info: Deprecate MakeTypeRegisterStatic and MakeTypeRegisterNotStatic |
Date: |
Wed, 11 Dec 2024 17:27:03 +0100 |
From: Zhao Liu <zhao1.liu@intel.com>
Deprecate MakeTypeRegisterStatic and MakeTypeRegisterNotStatic because
type_register() will be deprecated, then only type_register_static()
is used.
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20241029085934.2799066-16-zhao1.liu@intel.com
---
.../codeconverter/qom_type_info.py | 20 -------------------
1 file changed, 20 deletions(-)
diff --git a/scripts/codeconverter/codeconverter/qom_type_info.py
b/scripts/codeconverter/codeconverter/qom_type_info.py
index 255cb59923d..f92c3a4730e 100644
--- a/scripts/codeconverter/codeconverter/qom_type_info.py
+++ b/scripts/codeconverter/codeconverter/qom_type_info.py
@@ -901,26 +901,6 @@ class TypeRegisterCall(FileMatch):
regexp = S(r'^[ \t]*', NAMED('func_name', 'type_register'),
r'\s*\(&\s*', NAMED('name', RE_IDENTIFIER), r'\s*\);[ \t]*\n')
-class MakeTypeRegisterStatic(TypeRegisterCall):
- """Make type_register() call static if variable is static const"""
- def gen_patches(self):
- var = self.file.find_match(TypeInfoVar, self.name)
- if var is None:
- self.warn("can't find TypeInfo var declaration for %s", self.name)
- return
- if var.is_static() and var.is_const():
- yield
self.group_match('func_name').make_patch('type_register_static')
-
-class MakeTypeRegisterNotStatic(TypeRegisterStaticCall):
- """Make type_register() call static if variable is static const"""
- def gen_patches(self):
- var = self.file.find_match(TypeInfoVar, self.name)
- if var is None:
- self.warn("can't find TypeInfo var declaration for %s", self.name)
- return
- if not var.is_static() or not var.is_const():
- yield self.group_match('func_name').make_patch('type_register')
-
class TypeInfoMacro(FileMatch):
"""TYPE_INFO macro usage"""
regexp = S(r'^[ \t]*TYPE_INFO\s*\(\s*', NAMED('name', RE_IDENTIFIER),
r'\s*\)[ \t]*;?[ \t]*\n')
--
2.47.1
- [PULL 24/49] hw/scsi: Replace type_register() with type_register_static(), (continued)
- [PULL 24/49] hw/scsi: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 23/49] hw/rtc: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 26/49] hw/usb: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 25/49] hw/sensor: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 28/49] i386: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 27/49] hw/virtio: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 29/49] target/mips: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 30/49] target/sparc: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 31/49] target/xtensa: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 32/49] ui: Replace type_register() with type_register_static(), Paolo Bonzini, 2024/12/11
- [PULL 33/49] script/codeconverter/qom_type_info: Deprecate MakeTypeRegisterStatic and MakeTypeRegisterNotStatic,
Paolo Bonzini <=
- [PULL 34/49] qom/object: Remove type_register(), Paolo Bonzini, 2024/12/11
- [PULL 35/49] bql: check that the BQL is not dropped within marked sections, Paolo Bonzini, 2024/12/11
- [PULL 36/49] rust: cell: add BQL-enforcing Cell variant, Paolo Bonzini, 2024/12/11
- [PULL 38/49] rust: define prelude, Paolo Bonzini, 2024/12/11
- [PULL 37/49] rust: cell: add BQL-enforcing RefCell variant, Paolo Bonzini, 2024/12/11
- [PULL 39/49] rust: add bindings for interrupt sources, Paolo Bonzini, 2024/12/11
- [PULL 40/49] rust: add a bit operation module, Paolo Bonzini, 2024/12/11
- [PULL 41/49] rust: qom: add default definitions for ObjectImpl, Paolo Bonzini, 2024/12/11
- [PULL 42/49] rust: qom: rename Class trait to ClassInitImpl, Paolo Bonzini, 2024/12/11