From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A212DC433EF for ; Wed, 8 Dec 2021 13:04:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC98C7330E; Wed, 8 Dec 2021 13:04:23 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 148A47330A; Wed, 8 Dec 2021 13:04:22 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10191"; a="261901254" X-IronPort-AV: E=Sophos;i="5.88,189,1635231600"; d="scan'208";a="261901254" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2021 05:04:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,189,1635231600"; d="scan'208";a="658278402" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by fmsmga001.fm.intel.com with SMTP; 08 Dec 2021 05:04:17 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 08 Dec 2021 15:04:17 +0200 Date: Wed, 8 Dec 2021 15:04:17 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: cgel.zte@gmail.com Message-ID: References: <20211208074619.404138-1-luo.penghao@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211208074619.404138-1-luo.penghao@zte.com.cn> X-Patchwork-Hint: comment Subject: Re: [Intel-gfx] [PATCH linux-next] drm/i915/display: Delete redundant post_mask assignment X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, luo penghao , Zeal Robot Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Dec 08, 2021 at 07:46:19AM +0000, cgel.zte@gmail.com wrote: > From: luo penghao > > This value will be overwritten by the following if statement, even > if the if is not executed, the value will not be used > > The clang_analyzer complains as follows: > > Value stored to 'port_mask' is never read > > Reported-by: Zeal Robot > Signed-off-by: luo penghao > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c > index bd18432..3aad0c3 100644 > --- a/drivers/gpu/drm/i915/display/intel_ddi.c > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c > @@ -2011,7 +2011,6 @@ void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder) > return; > } > > - port_mask = BIT(encoder->port); > ddi_clk_needed = encoder->base.crtc; > > if (encoder->type == INTEL_OUTPUT_DSI) { 'port_mask' declaration could now be moved into this block. > -- > 2.15.2 > -- Ville Syrjälä Intel