Question about two option formats for netdev

2021-03-16 Thread Masahiro Yamada
different worlds, we need to choose appropriate form to use a particular device, correct? -- Best Regards Masahiro Yamada

[PATCH] qom/container: remove .instance_size initializer from container_info

2020-05-12 Thread Masahiro Yamada
You can omit .instance_size if it is the same as that of the parent. .class_size = sizeof(ObjectClass) ... is omitted here, so removing .instance_size is more consistent. Signed-off-by: Masahiro Yamada --- qom/container.c | 1 - 1 file changed, 1 deletion(-) diff --git a/qom/container.c

Re: [PATCH] qom/object: pass (Object *) to object_initialize_with_type()

2020-05-12 Thread Masahiro Yamada
On Wed, May 13, 2020 at 3:17 AM Philippe Mathieu-Daudé wrote: > > On 5/12/20 7:31 PM, Masahiro Yamada wrote: > > object_new_with_type() already passes (Object *) pointer. > > Avoid casting back and forth. > > But object_initialize() doesn't... That is no problem. A c

[PATCH] qom/object: simplify type_initialize_interface()

2020-05-12 Thread Masahiro Yamada
iface_impl->class is the same as new_iface. Make it more readable. Signed-off-by: Masahiro Yamada --- qom/object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qom/object.c b/qom/object.c index 9d1a918e42..75c628591d 100644 --- a/qom/object.c +++ b/qom/objec

[PATCH] qom/object: pass (Object *) to object_initialize_with_type()

2020-05-12 Thread Masahiro Yamada
object_new_with_type() already passes (Object *) pointer. Avoid casting back and forth. Signed-off-by: Masahiro Yamada --- qom/object.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qom/object.c b/qom/object.c index e4085d8ae2..9d1a918e42 100644 --- a/qom/object.c

[PATCH] qom/object: factor out the initialization of hash table of properties

2020-05-12 Thread Masahiro Yamada
Properties are not related to the initialization of interfaces. The initialization of the hash table can be moved after the if-block, and unified. Signed-off-by: Masahiro Yamada --- qom/object.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qom/object.c b/qom

[PATCH] qom: remove index from object_resolve_abs_path()

2020-05-09 Thread Masahiro Yamada
You can advance 'parts' to track the current path fragment. The 'index' parameter is unneeded. Signed-off-by: Masahiro Yamada --- qom/object.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/qom/object.c b/qom/object.c index aa8a3f24e6..a3ee968b12 100644

[PATCH] qemu-option: pass NULL rather than 0 to the id of qemu_opts_set()

2020-04-26 Thread Masahiro Yamada
The second argument 'id' is a pointer. Pass NULL rather than 0. Signed-off-by: Masahiro Yamada --- softmmu/vl.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 32c0047889..afd2615fb3 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c

[PATCH] target/arm/arm-semi: fix SYS_OPEN to return nonzero filehandle

2020-01-08 Thread Masahiro Yamada
t a big deal. Fixes: 35e9a0a8ce4b ("target/arm/arm-semi: Make semihosting code hand out its own file descriptors") Signed-off-by: Masahiro Yamada --- target/arm/arm-semi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/arm-semi.c b/target/arm