Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1571481imu; Wed, 9 Jan 2019 22:15:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN72vcTdhj5X2dSSPorDEfEE9skGnnRsHAoBm//7Jhprq6BOT4k2KuLje7GuP+2LshEukaeA X-Received: by 2002:a63:88c7:: with SMTP id l190mr8043091pgd.110.1547100933791; Wed, 09 Jan 2019 22:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547100933; cv=none; d=google.com; s=arc-20160816; b=QPRsi6K4uwD+DvqIKmQD5Blh7fV0gqb4sevdKECVZq0+I8gHrGFj7qzawebyGsl/zV y3ENfBecWGZ3gY35qqgyOzIpdY5aIWvF7/1gSEPQoQ7HxwnYVPSi3PhRx3NaubjDJL7H L5U0qWRT0NU+9jUXlBh0wx1CTDRXTWpZRas3wopEumYi/bYPfA2FAEqsvqUjjyX0thDN zhWxCXpPV0t8aqhvupq3bmNBu5ZoIEzhycnXMjbUNTi3scMr8cxEFEW+V+Glf0TXjaec cE1szOQnn2PijU2urifwj8hpcJScA5ti6aSo3pFP2ZXSyvgGsurr70eY0o1qHCZ/deWm QTNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=OS3d67xknKUkrjT6zLxCzD6QQek0gwr/GJh8u/NiTvw=; b=yG2BRKp1LmcdxHaFCiqN80nPq5Oibmhd9kzSsMtXY/LcLJp1Q0PQ99Fmfhuuhoxfit 6HwzedpTMONXdoYvq/imv9G7khRnxSY+HJV3kPAqmXBaa5fE6uiwakiir+3hGuYkO67a UQwGj+fzriLAbpVtnnTobKJO6F6w7LBEIRXRa8WHW2u3OYxFwokRWbLU8u/Nyutx2gb7 jEE4Flu9cXrVMoHb0r7plDdGLuttN0+K/tmLAD+n3Tp/cHvxEVxOz+4EQlOmn2fOKBgr rLq8ponU8cPJpTHlLSEYanzk9UYPXbdd2wTqguAUCTsp1JVUfaj1UXTQJMY+VIutOrSw APeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HNTRuqhP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si5533973plg.318.2019.01.09.22.15.15; Wed, 09 Jan 2019 22:15:33 -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=@gmail.com header.s=20161025 header.b=HNTRuqhP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727026AbfAJGN6 (ORCPT + 99 others); Thu, 10 Jan 2019 01:13:58 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:44143 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfAJGN6 (ORCPT ); Thu, 10 Jan 2019 01:13:58 -0500 Received: by mail-pl1-f193.google.com with SMTP id e11so4735565plt.11 for ; Wed, 09 Jan 2019 22:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=OS3d67xknKUkrjT6zLxCzD6QQek0gwr/GJh8u/NiTvw=; b=HNTRuqhPzLVJYtVTfftJQUld9V/LSLDSQaGxlbhKbADdZi6YcVB/xt9RWLcgRIi/Qr CiMlHzH1dz+HyG1peyIW2WRprTVTwHU121pqLU8bB9N4BTg4OFsE8NJC248X2e8l8IJ2 l+RwnrLaRtW2ZHjzmfH00WkU1Z+e3zqjGxS5pVdlboTG44NYT+1jXDF2cfyeJi14i9aM +S15pyDWXXEECWQ6HdNM6LdcAyCyK/dWxcSJKw6gEhYDC84kiBhMzEgyAzpShBSOjJ8S ToBEt/j0cl2eceUKLwEWmvO5RfQh5Cry/SC4CDxqMV2QXOaWmIZ4XOCUyX6VL7mFPT0x TJrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OS3d67xknKUkrjT6zLxCzD6QQek0gwr/GJh8u/NiTvw=; b=FSX0L8Rp7NHsckNfQiqjtl2wltSFlnpiyTN1m3z4xQku4ZIF0ke6wzDaeHXjToCT9w cL0HJxWjX+VTgNq7RLyeBjdkr9HdiaFHOTFW4MIConP7H8xJn8aFVJrWXufZ68/xlteT +0dXBwlVxBG8ifXzh+i3cYwZl4VFKSUKjtSjhXCGhpZvcyVumRTeXGOX8Go8fXv7eX7P yEaiqju1UzUO65msVgxNudXcI1RWSmx9IPDRGowPTtW/HwH44MSxltITS7hrrFgKlNon fmei54j0DI5o5tMhjGNCMzq93iTTeSZujzPiKJm52PPhvpTlgMefteBM/yx6sKi+YVyH W7xg== X-Gm-Message-State: AJcUukfgEhCubOhKsKxdKgdM5oFQnc4Q6lXfyzvV/QmQ36yZwfGPYeBT hStiNQgTi4to2wTPe7kAhhs= X-Received: by 2002:a17:902:8484:: with SMTP id c4mr8860344plo.59.1547100837375; Wed, 09 Jan 2019 22:13:57 -0800 (PST) Received: from localhost.localdomain ([220.94.163.22]) by smtp.gmail.com with ESMTPSA id r130sm131481686pfr.48.2019.01.09.22.13.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 22:13:56 -0800 (PST) From: Sidong Yang To: Greg Kroah-Hartman Cc: Sidong Yang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: vboxvideo: vbox_main: Remove unnecessary local variable Date: Thu, 10 Jan 2019 06:13:47 +0000 Message-Id: <20190110061347.31326-1-realwakka@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; - ret = hgsmi_query_conf(vbox->guest_pool, - VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING, - &have_cursor); - if (ret) + if (hgsmi_query_conf(vbox->guest_pool, + VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING, + &have_cursor)) return false; return have_hints == VINF_SUCCESS && have_cursor == VINF_SUCCESS; -- 2.17.1