1
0
Fork 0
mirror of https://github.com/yuzu-emu/unicorn.git synced 2025-04-01 23:07:03 +00:00

accel: make configure_accelerator return void

Return the negated value of accel_initialised is meaningless,
and the caller vl doesn't check it.

Backports commit bdc3f61dec2f9c227235bb5f677a0272e1184c82 from qemu
This commit is contained in:
Wei Jiangang 2018-02-24 00:30:51 -05:00 committed by Lioncash
parent eab60b7c77
commit 7cf135457a
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 2 additions and 7 deletions
qemu
accel.c
include/sysemu

View file

@ -71,10 +71,9 @@ static const TypeInfo tcg_accel_type = {
};
int configure_accelerator(MachineState *ms)
void configure_accelerator(MachineState *ms)
{
int ret;
bool accel_initialised = false;
AccelClass *acc;
acc = accel_find(ms->uc, "tcg");
@ -83,11 +82,7 @@ int configure_accelerator(MachineState *ms)
fprintf(stderr, "failed to initialize %s: %s\n",
acc->name,
strerror(-ret));
} else {
accel_initialised = true;
}
return !accel_initialised;
}
void register_accel_types(struct uc_struct *uc)

View file

@ -55,7 +55,7 @@ typedef struct AccelClass {
#define ACCEL_GET_CLASS(uc, obj) \
OBJECT_GET_CLASS(uc, AccelClass, (obj), TYPE_ACCEL)
int configure_accelerator(MachineState *ms);
void configure_accelerator(MachineState *ms);
void register_accel_types(struct uc_struct *uc);