diff mbox

accel: make configure_accelerator return void

Message ID 1458036463-20180-1-git-send-email-weijg.fnst@cn.fujitsu.com
State New
Headers show

Commit Message

Wei Jiangang March 15, 2016, 10:07 a.m. UTC
Return the negated value of accel_initialised is meaningless,
and the caller vl doesn't check it.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 accel.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Wei Jiangang April 14, 2016, 3:19 a.m. UTC | #1
ping...
Any comments?
On Tue, 2016-03-15 at 18:07 +0800, Wei Jiangang wrote:
> Return the negated value of accel_initialised is meaningless,

> and the caller vl doesn't check it.

> 

> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>

> ---

>  accel.c | 4 +---

>  1 file changed, 1 insertion(+), 3 deletions(-)

> 

> diff --git a/accel.c b/accel.c

> index 0510b90..403eb5e 100644

> --- a/accel.c

> +++ b/accel.c

> @@ -77,7 +77,7 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)

>      return ret;

>  }

>  

> -int configure_accelerator(MachineState *ms)

> +void configure_accelerator(MachineState *ms)

>  {

>      const char *p;

>      char buf[10];

> @@ -128,8 +128,6 @@ int configure_accelerator(MachineState *ms)

>      if (init_failed) {

>          fprintf(stderr, "Back to %s accelerator.\n", acc->name);

>      }

> -

> -    return !accel_initialised;

>  }

>  

>
Changlong Xie April 14, 2016, 3:34 a.m. UTC | #2
On 04/14/2016 11:19 AM, Wei, Jiangang wrote:
> ping...
> Any comments?
> On Tue, 2016-03-15 at 18:07 +0800, Wei Jiangang wrote:
>> Return the negated value of accel_initialised is meaningless,
>> and the caller vl doesn't check it.
>>
>> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
>> ---
>>   accel.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/accel.c b/accel.c
>> index 0510b90..403eb5e 100644
>> --- a/accel.c
>> +++ b/accel.c
>> @@ -77,7 +77,7 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)
>>       return ret;
>>   }
>>
>> -int configure_accelerator(MachineState *ms)
>> +void configure_accelerator(MachineState *ms)
>>   {
>>       const char *p;
>>       char buf[10];
>> @@ -128,8 +128,6 @@ int configure_accelerator(MachineState *ms)
>>       if (init_failed) {
>>           fprintf(stderr, "Back to %s accelerator.\n", acc->name);
>>       }
>> -
>> -    return !accel_initialised;
>>   }

Have you compiled the code with this path?

Thanks
	-Xie
>>
>>
>
>
>
Wei Jiangang April 14, 2016, 3:53 a.m. UTC | #3
On Thu, 2016-04-14 at 11:34 +0800, Changlong Xie wrote:
> On 04/14/2016 11:19 AM, Wei, Jiangang wrote:

> > ping...

> > Any comments?

> > On Tue, 2016-03-15 at 18:07 +0800, Wei Jiangang wrote:

> >> Return the negated value of accel_initialised is meaningless,

> >> and the caller vl doesn't check it.

> >>

> >> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>

> >> ---

> >>   accel.c | 4 +---

> >>   1 file changed, 1 insertion(+), 3 deletions(-)

> >>

> >> diff --git a/accel.c b/accel.c

> >> index 0510b90..403eb5e 100644

> >> --- a/accel.c

> >> +++ b/accel.c

> >> @@ -77,7 +77,7 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)

> >>       return ret;

> >>   }

> >>

> >> -int configure_accelerator(MachineState *ms)

> >> +void configure_accelerator(MachineState *ms)

> >>   {

> >>       const char *p;

> >>       char buf[10];

> >> @@ -128,8 +128,6 @@ int configure_accelerator(MachineState *ms)

> >>       if (init_failed) {

> >>           fprintf(stderr, "Back to %s accelerator.\n", acc->name);

> >>       }

> >> -

> >> -    return !accel_initialised;

> >>   }

> 

> Have you compiled the code with this path?


Thanks for your remind.
I compiled it,
But  I forgot to add the changed head file together with accel.c.

I will resend the second version.

Regards,
wei
> 

> Thanks

> 	-Xie

> >>

> >>

> >

> >

> >
diff mbox

Patch

diff --git a/accel.c b/accel.c
index 0510b90..403eb5e 100644
--- a/accel.c
+++ b/accel.c
@@ -77,7 +77,7 @@  static int accel_init_machine(AccelClass *acc, MachineState *ms)
     return ret;
 }
 
-int configure_accelerator(MachineState *ms)
+void configure_accelerator(MachineState *ms)
 {
     const char *p;
     char buf[10];
@@ -128,8 +128,6 @@  int configure_accelerator(MachineState *ms)
     if (init_failed) {
         fprintf(stderr, "Back to %s accelerator.\n", acc->name);
     }
-
-    return !accel_initialised;
 }