lkml.org 
[lkml]   [2019]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] staging: vboxvideo: vbox_main: Remove unnecessary local variable
On Thu, Jan 10, 2019 at 06:13:47AM +0000, Sidong Yang wrote:
> Removed unnecessary local variable in have_hgsmi_mode_hints.
> The result of hgsmi_query_conf should be directly compared without
> assigning to local variable.
>
> Signed-off-by: Sidong Yang <realwakka@gmail.com>
> ---
> drivers/staging/vboxvideo/vbox_main.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
> index e1fb70a42d32..62a69fde7435 100644
> --- a/drivers/staging/vboxvideo/vbox_main.c
> +++ b/drivers/staging/vboxvideo/vbox_main.c
> @@ -170,18 +170,15 @@ static void vbox_accel_fini(struct vbox_private *vbox)
> static bool have_hgsmi_mode_hints(struct vbox_private *vbox)
> {
> u32 have_hints, have_cursor;
> - int ret;
>
> - ret = hgsmi_query_conf(vbox->guest_pool,
> - VBOX_VBVA_CONF32_MODE_HINT_REPORTING,
> - &have_hints);
> - if (ret)
> + if (hgsmi_query_conf(vbox->guest_pool,
> + VBOX_VBVA_CONF32_MODE_HINT_REPORTING,
> + &have_hints))
> return false;

As Dan says, the original is best here. I'm dropping this from my patch
queue.

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-01-11 10:43    [W:0.057 / U:22.756 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site