Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp372661imu; Fri, 11 Jan 2019 01:51:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN6KDOwVEQwM+LPO+htvXrd07C1MJnZ10+M1V4Iizt/SzVzA/uu362WKy0Xo+8R+x6fiPLgP X-Received: by 2002:a63:5252:: with SMTP id s18mr12705595pgl.326.1547200265555; Fri, 11 Jan 2019 01:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547200265; cv=none; d=google.com; s=arc-20160816; b=XHSVYnsRS2WX51kBw+8wBjIiWVXAFIvSfoQyFS4GZqpVPJrr7zmt3NeKyjgOINTsuu n1GNFM2XB7Q43cNpDLPbajclePhELWllSviAdlpAJ3TA3NoizUxXna2Ul6Yl/spjD1Qs XgC8w85VW552nuUNDAlKrA1orhAmFG52yiQrowQp2VCRVAwOl3bx0ynVMAEnxCmsp76g AX8xHyF1mySZRT+BxOOCriXn8/hxEwrNBGQQdlKHypgVULu2hxus7yAyIcWYgrkGxtGy iZ7Jzj3UKnnQtV7joUeBqNvG96LLx4oDwQcXoyTCJgcnNLkvYDbzs8vxWUGjwqOjfmzQ vMHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CJmEtyttOpg4C2n4j6q8u7KEMDXz6HOFAvHgNlO6DXA=; b=tG2N5CJe5u1jJDpr2Yrzu9wulVc2ARPwcfujKy4zvHaf4sNRa2D5Kaq92zQ90avisJ 4Lk/VHDzMv19+ziIR1JKs19ZLQRmlARtwko34YiQQLK6CypmAprnrKbA//bXt8/4HtY1 cVTjQeXO6EzfJVUniwouTk5fpp8DJ7NXN3VVJkQKdGCTmre+lsSdKY9fIIcNNt+wJI3d cwMdY0+FhUBOOMDsoCiZcfgUMMNuNrwbXATiD/UJgtGFa0kOqh8OBYDUxtmOARtYWRYJ B2fOO4rfzAzz0owBWvl9KDFZaf/gBiPEvfqrail0asFCv/ixyXsukGTibFMRUrjre7R9 pw4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wFXcQSxE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si15396666pgl.6.2019.01.11.01.50.50; Fri, 11 Jan 2019 01:51:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wFXcQSxE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730871AbfAKJmm (ORCPT + 99 others); Fri, 11 Jan 2019 04:42:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:37814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729413AbfAKJmm (ORCPT ); Fri, 11 Jan 2019 04:42:42 -0500 Received: from localhost (unknown [178.228.36.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0142620874; Fri, 11 Jan 2019 09:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547199761; bh=GpbqKr9FE4wSb4TSnHkz8ogcPEIWfV7Aq9ULtqOOsF8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wFXcQSxEasiW6RDApKAsNIY9TBGS6LHX88gpC3812FEjJCamlMULzbTaKpyIpeaI1 j/Rym9vKtOj4IHozQoBEgknfnz4TmZSF0LUwRTTf8ZSWLHbulL7dyBLlti8yAY0xkZ 145fL7UPGxprhB9VhKDTtxTI6kmLT7X7erWw9oGo= Date: Fri, 11 Jan 2019 10:42:38 +0100 From: Greg Kroah-Hartman To: Sidong Yang Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: vboxvideo: vbox_main: Remove unnecessary local variable Message-ID: <20190111094238.GA28232@kroah.com> References: <20190110061347.31326-1-realwakka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190110061347.31326-1-realwakka@gmail.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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