Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1297811ybp; Fri, 4 Oct 2019 12:28:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8O5Zp4I1+cm++F0IfIdXOQfpKIEDAUmH1Q2879n52gEJQUpCvm0rDbGpcqtsyUMBNyXwG X-Received: by 2002:a17:906:13cd:: with SMTP id g13mr13759237ejc.302.1570217314073; Fri, 04 Oct 2019 12:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570217314; cv=none; d=google.com; s=arc-20160816; b=Dhuzx2yXTY0LFPRBU8xGoi+3RITqJVgKbi3j/qNp7/D3IuL2VjPbWILxK/Wya5zTUH PpGFfnnpb8l/pRO1nz81RE77TbeUkqRscbDWmzAoFvdCDlxgjo7LV/LQf5ymwWCVEUQN AWOgw+LHkg9Rvu6mXbilo1HcCT7aapjjPAWg77wjaIMlzBSG9K+LSX3HFl1WaSi+nQY0 OjqX2wHxqoq/TOGrkM9Uryget+T+UP71lkhohbmNnOW9R63T/kyH8LvNfcJdXi0Ku8d8 UO9XRD9Y5VZd0T+tqq2IOF0KCFEDGAYJyvhYx+aEQaMNBhydu4IFAfKX5CaESWj7TC69 6ETw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=DtnHMzx4PkKbbhmDLeo4cfeGtQ2uEwk3ewTCL4WPu+4=; b=IF3PQk7lhZBlC9Jy0byulrv6Yhb7JZim1e2ygMleoTt6PWui4MY0lMtY1De+cTQHme 9sHkQuD+3FgPOA1TFfanO1rV7NewSXTYv8wyKLMi6Urse/4L74NKeS4Y7MfqglJnnn5x SOAWyzni3db3+zNNNfGP85jgVE4Z7Bg2g62kLkxdDD5r6WiQH9I29zp7rMEjIKHCqamI SDTFr+TZVI5C47ixEmMxn6+qPEf/rb+++tjkhxFw2Dy5n2WCrIO023mh35+PoVhsshlJ S+n7YVK3FgfrABk5ljrtE1rFpKIuY6h7YDhU5VEBuj43MWngZm/stW7MekBYJiB+cyN9 34hQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f29si3481154ejj.110.2019.10.04.12.28.10; Fri, 04 Oct 2019 12:28:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730348AbfJDT1X (ORCPT + 99 others); Fri, 4 Oct 2019 15:27:23 -0400 Received: from foss.arm.com ([217.140.110.172]:53228 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbfJDT1W (ORCPT ); Fri, 4 Oct 2019 15:27:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1D72F15AB; Fri, 4 Oct 2019 12:27:22 -0700 (PDT) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EEACE3F534; Fri, 4 Oct 2019 12:27:21 -0700 (PDT) Received: by e110455-lin.cambridge.arm.com (Postfix, from userid 1000) id 90F28682570; Fri, 4 Oct 2019 20:27:20 +0100 (BST) Date: Fri, 4 Oct 2019 20:27:20 +0100 From: Liviu Dudau To: Colin King Cc: James Wang , Brian Starkey , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] drm/komeda: remove redundant assignment to pointer disable_done Message-ID: <20191004192720.7eiqdvsm2yv62svg@e110455-lin.cambridge.arm.com> References: <20191004162156.325-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191004162156.325-1-colin.king@canonical.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 04, 2019 at 05:21:56PM +0100, Colin King wrote: > From: Colin Ian King > > The pointer disable_done is being initialized with a value that > is never read and is being re-assigned a little later on. The > assignment is redundant and hence can be removed. Not really true, isn't it? The re-assignment is done under the condition that crtc->state->active is true. disable_done will be used regardless after the if block, so we can't skip this initialisation. Not sure why Coverity flags this, but I would NAK this patch. Best regards, Liviu > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- > drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c > index 75263d8cd0bd..9beeda04818b 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c > @@ -296,7 +296,7 @@ komeda_crtc_atomic_disable(struct drm_crtc *crtc, > struct komeda_crtc_state *old_st = to_kcrtc_st(old); > struct komeda_pipeline *master = kcrtc->master; > struct komeda_pipeline *slave = kcrtc->slave; > - struct completion *disable_done = &crtc->state->commit->flip_done; > + struct completion *disable_done; > bool needs_phase2 = false; > > DRM_DEBUG_ATOMIC("CRTC%d_DISABLE: active_pipes: 0x%x, affected: 0x%x\n", > -- > 2.20.1 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯