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 A912FC433F5 for ; Wed, 8 Dec 2021 13:20:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E88D57345F; Wed, 8 Dec 2021 13:20:23 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58F777341B; Wed, 8 Dec 2021 13:20:22 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10191"; a="218511970" X-IronPort-AV: E=Sophos;i="5.88,189,1635231600"; d="scan'208";a="218511970" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2021 05:20:21 -0800 X-IronPort-AV: E=Sophos;i="5.88,189,1635231600"; d="scan'208";a="503047989" Received: from cahanley-mobl.ger.corp.intel.com (HELO localhost) ([10.252.19.1]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2021 05:20:18 -0800 From: Jani Nikula To: Ville =?utf-8?B?U3lyasOkbMOk?= , cgel.zte@gmail.com In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20211208074619.404138-1-luo.penghao@zte.com.cn> Date: Wed, 08 Dec 2021 15:20:15 +0200 Message-ID: <87lf0v44j4.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 08 Dec 2021, Ville Syrj=C3=A4l=C3=A4 wrote: > On Wed, Dec 08, 2021 at 07:46:19AM +0000, cgel.zte@gmail.com wrote: >> From: luo penghao >>=20 >> This value will be overwritten by the following if statement, even >> if the if is not executed, the value will not be used >>=20 >> The clang_analyzer complains as follows: >>=20 >> Value stored to 'port_mask' is never read >>=20 >> Reported-by: Zeal Robot >> Signed-off-by: luo penghao >> --- >> drivers/gpu/drm/i915/display/intel_ddi.c | 1 - >> 1 file changed, 1 deletion(-) >>=20 >> 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; >> } >>=20=20 >> - port_mask =3D BIT(encoder->port); >> ddi_clk_needed =3D encoder->base.crtc; >>=20=20 >> if (encoder->type =3D=3D INTEL_OUTPUT_DSI) { > > 'port_mask' declaration could now be moved into this block. I've basically given up on patches from cgel.zte@gmail.com, luo.penghao@zte.com.cn, zealci@zte.com.cn, etc. The patches are the simplest possible changes to silence static analyzer warnings, with no further analysis of the issues, and no follow-up on questions. Until that changes, I think we're better off just regarding them static as analyzer reports. BR, Jani. > >> --=20 >> 2.15.2 >>=20 --=20 Jani Nikula, Intel Open Source Graphics Center