Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp700726ybp; Wed, 9 Oct 2019 02:54:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp0Jdkug6TkuMDCw7W/cDZz92ICPF3Y/7KVp+L+OwOcVI+PyADBvxpJxQE4DF89T6zDFg1 X-Received: by 2002:aa7:de02:: with SMTP id h2mr2097424edv.212.1570614842185; Wed, 09 Oct 2019 02:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570614842; cv=none; d=google.com; s=arc-20160816; b=QNKrYEKzQ0NKFzxWVBFrFe7H3Wgnu/2n1Hsso1q2d8ZsP5tjTqIY77LlS9b/FpZxzn MzJ7ncbEf+junO8XE3f4Mu8C6GDk3tBNGQPNTCT5XowGiHtH7m1LZ+cXjLQaQNl0da2T 1obZ3OKMe9UiCQAWx1nqsOFt9mZOHtwPOrJ9bRqoO0YXerXeuKootIsB1fI4YjhCXIUq Wb/WKp+C/SCgH8H2gS7Kqy+7Mtb48VMan8T2OqMZcplo4kREinoR+YZYyfOKmHbBNUJO N4ZQwNZl7Kx/xEA6Sh3RcdR1Xk4TCySmlH1gsmQjE7j2+LrS2tp6zjh3HZKWIAlPyK33 p8jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=rIsTnG7F4ABKa6aGAQJCz78RyVtQSQutMeE8QmYQGK4=; b=RNzrPnLiv85+PbF3NWV0NicMqa2PKizNYpnXm07/D0GKObRUKZDR58Sw5sckunhFU0 2JGcWtanuUrU9nbRv+gUrP9z3e3CofFq9IleOFVz1f9OQp2RNQukQII339gyl8wsmCKx iPhOr8R1QZ8wq4Msypd7YlDmIbqf3NJc6ft0ZRGmaFKrznw2VL1xrXEX0Me+myflWJEM zB0uqt7p9QuLVrUwPmo847ELJpHqHBTCmAPPdwztV2jNT9w5n9G3SsVjYaaCjW7YyEKj FKcjFYkhexGxmzbbe+YHm67E8NmtiiPj0o5b7GQNeCTD1dT9OkBhVhWZxEhW4op4VkkT Zgnw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si876286edx.302.2019.10.09.02.53.37; Wed, 09 Oct 2019 02:54:02 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730768AbfJIJw0 (ORCPT + 99 others); Wed, 9 Oct 2019 05:52:26 -0400 Received: from mga03.intel.com ([134.134.136.65]:7292 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbfJIJwX (ORCPT ); Wed, 9 Oct 2019 05:52:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 02:52:22 -0700 X-IronPort-AV: E=Sophos;i="5.67,273,1566889200"; d="scan'208";a="187581234" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 02:52:18 -0700 From: Jani Nikula To: Colin King , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] drm/i915: remove redundant variable err In-Reply-To: <20191009093935.17895-1-colin.king@canonical.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20191009093935.17895-1-colin.king@canonical.com> Date: Wed, 09 Oct 2019 12:52:15 +0300 Message-ID: <87h84igsa8.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 09 Oct 2019, Colin King wrote: > From: Colin Ian King > > An earlier commit removed any error assignments to err and we > are now left with a zero assignment to err and a check that is > always false. Clean this up by removing the redundant variable > err and the error check. > > Addresses-Coverity: ("'Constant' variable guard") > Signed-off-by: Colin Ian King Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Reviewed-by: Jani Nikula BR, Jani. > --- > drivers/gpu/drm/i915/i915_active.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c > index aa37c07004b9..67305165c12a 100644 > --- a/drivers/gpu/drm/i915/i915_active.c > +++ b/drivers/gpu/drm/i915/i915_active.c > @@ -438,7 +438,6 @@ static void enable_signaling(struct i915_active_fence *active) > int i915_active_wait(struct i915_active *ref) > { > struct active_node *it, *n; > - int err = 0; > > might_sleep(); > > @@ -456,8 +455,6 @@ int i915_active_wait(struct i915_active *ref) > /* Any fence added after the wait begins will not be auto-signaled */ > > i915_active_release(ref); > - if (err) > - return err; > > if (wait_var_event_interruptible(ref, i915_active_is_idle(ref))) > return -EINTR; -- Jani Nikula, Intel Open Source Graphics Center