Re: [PATCH v2 7/8] convert code to qdev_new_dynamic() where appropriate

2024-11-14 Thread Peter Xu
On Mon, Nov 11, 2024 at 03:55:54PM +, Daniel P. Berrangé wrote: > In cases where qdev_new() is not being passed a static, const > string, the caller cannot be sure what type they are instantiating. > There is a risk that instantiation could fail, if it is an abstract > type. > > Convert such c

[PATCH v2 7/8] convert code to qdev_new_dynamic() where appropriate

2024-11-11 Thread Daniel P . Berrangé
In cases where qdev_new() is not being passed a static, const string, the caller cannot be sure what type they are instantiating. There is a risk that instantiation could fail, if it is an abstract type. Convert such cases over to use qdev_new_dynamic() such that they are forced to expect failure.