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 7C19BEB64DC for ; Tue, 11 Jul 2023 07:26:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 257E410E326; Tue, 11 Jul 2023 07:26:18 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 97F3510E322; Tue, 11 Jul 2023 07:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689060375; x=1720596375; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=tlxW14yxQCRsTxE0fJAZH/pu3WS4pYDWMfrIU0UEUcA=; b=iD/C9LJfa+EuJGWpIFohmVKnSScmjvvL//NPurUhb0bb9HcOTO6JIK+4 EcXRENrDqTAmQhYQIWkd6t6iQ4VMKc2jfsPzuvNOlTllVDxjIjamDyKcC yQKJUEN62qp8PfqYRDHd0muzocY5IEpaV/44EWxie8zHBP8QsMbWHBnqr hzkXE3i7JMOANbLEH2P98pasDs/cYjE5Pz0MCKW0aH0p3XSeIdNbbiYPh 23P2NxK5SboLZ1T9+jl6m41U7HdUJkBwMkm1yva0CA+T7X24anQtMCzmH uuMgzxHX377Yqfv0SdolyGRmQNHitGbUMVHC61Wc8MEgPXaZypShhrhL/ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10767"; a="344869069" X-IronPort-AV: E=Sophos;i="6.01,196,1684825200"; d="scan'208";a="344869069" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 00:26:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10767"; a="698335426" X-IronPort-AV: E=Sophos;i="6.01,196,1684825200"; d="scan'208";a="698335426" Received: from sneaga-mobl3.ger.corp.intel.com (HELO localhost) ([10.252.52.179]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 00:26:10 -0700 From: Jani Nikula To: zhangshida , joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, airlied@gmail.com, daniel@ffwll.ch, ville.syrjala@linux.intel.com In-Reply-To: <20230711032940.901797-1-zhangshida@kylinos.cn> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20230711032940.901797-1-zhangshida@kylinos.cn> Date: Tue, 11 Jul 2023 10:26:08 +0300 Message-ID: <87ilaqj4dr.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Intel-gfx] [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource 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: k2ci , intel-gfx@lists.freedesktop.org, starzhangzsd@gmail.com, zhangshida@kylinos.cn, dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 11 Jul 2023, zhangshida wrote: > From: Shida Zhang > > Quiet down this gcc warning generated by > gcc (Debian 10.2.1-6) 10.2.1 20210110: > > ../drivers/gpu/drm/i915/soc/intel_gmch.c: In function =E2=80=98intel_allo= c_mchbar_resource=E2=80=99: > ../drivers/gpu/drm/i915/soc/intel_gmch.c:41:6: error: variable =E2=80=98m= chbar_addr=E2=80=99 set but not used [-Werror=3Dunused-but-set-variable] > 41 | u64 mchbar_addr; > | ^~~~~~~~~~~ > > Reported-by: k2ci > Signed-off-by: Shida Zhang Thanks, but this is already fixed by commit b02a9a0c6cb3 ("drm/i915/gmch: avoid unused variable warning"). BR, Jani. > --- > drivers/gpu/drm/i915/soc/intel_gmch.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/soc/intel_gmch.c b/drivers/gpu/drm/i915= /soc/intel_gmch.c > index 6d0204942f7a..f7db6cb3f828 100644 > --- a/drivers/gpu/drm/i915/soc/intel_gmch.c > +++ b/drivers/gpu/drm/i915/soc/intel_gmch.c > @@ -38,16 +38,18 @@ intel_alloc_mchbar_resource(struct drm_i915_private *= i915) > { > int reg =3D GRAPHICS_VER(i915) >=3D 4 ? MCHBAR_I965 : MCHBAR_I915; > u32 temp_lo, temp_hi =3D 0; > +#ifdef CONFIG_PNP > u64 mchbar_addr; > +#endif > int ret; >=20=20 > if (GRAPHICS_VER(i915) >=3D 4) > pci_read_config_dword(i915->gmch.pdev, reg + 4, &temp_hi); > pci_read_config_dword(i915->gmch.pdev, reg, &temp_lo); > - mchbar_addr =3D ((u64)temp_hi << 32) | temp_lo; >=20=20 > /* If ACPI doesn't have it, assume we need to allocate it ourselves */ > #ifdef CONFIG_PNP > + mchbar_addr =3D ((u64)temp_hi << 32) | temp_lo; > if (mchbar_addr && > pnp_range_reserved(mchbar_addr, mchbar_addr + MCHBAR_SIZE)) > return 0; --=20 Jani Nikula, Intel Open Source Graphics Center