Skip to contentSkip to conversation

accel: get rid of AccelClass::opt_name

PATCH Applied Wainer dos Santos Moschetta 2 participants 3 messages May 31, 2019 – Jun 5, 2019

lore
Share & tools
lore
#0 lore raw

cover accel: get rid of AccelClass::opt_name

The AccelClass::opt_name is not used. Unless there is a reason for keeping hat attribute, this patch remove it.

Git: https://github.com/wainersm/qemu
Branch: accel_del_opt_name
Travis: https://travis-ci.org/wainersm/qemu/builds/539721285
(Failed test case is not related with this change as well as fails on master too.)

Wainer dos Santos Moschetta (1):
accel: Remove unused AccelClass::opt_name attribute

 include/sysemu/accel.h | 1 -
 1 file changed, 1 deletion(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 accel: Remove unused AccelClass::opt_name attribute

The AccelType type was converted to AccelClass QOM object on b14a0b7469f, and the original data type had a field to store the option name which in turn was used to search an accelerator. The lookup method (accel_find) changed too, making the option field unnecessary but it became AccelClass::opt_name despite that. Therefore, and given that none accelerator implementation sets AccelClass::opt_name, let's remove this attribute.

---
 include/sysemu/accel.h | 1 -
 1 file changed, 1 deletion(-)
include/sysemu/accel.h +0 -1
index 70e9e2f2a1..81293cdb08 100644
@@ -36,7 +36,6 @@ typedef struct AccelClass {
     ObjectClass parent_class;
     /*< public >*/
 
-    const char *opt_name;
     const char *name;
     int (*init_machine)(MachineState *ms);
     void (*setup_post)(MachineState *ms, AccelState *accel);
Signature · 1 line
2.21.0
#2 lore raw

Re: [Qemu-devel] [PATCH 1/1] accel: Remove unused AccelClass::opt_name attribute

Quoted 11 lines · Wainer dos Santos Moschetta

The AccelType type was converted to AccelClass QOM object on b14a0b7469f, and the original data type had a field to store the option name which in turn was used to search an accelerator. The lookup method (accel_find) changed too, making the option field unnecessary but it became AccelClass::opt_name despite that. Therefore, and given that none accelerator implementation sets AccelClass::opt_name, let's remove this attribute.

Queued, thanks!

Signature · 1 line
Eduardo