From nobody Mon Nov 25 13:44:53 2024 Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB98429CE5; Sat, 26 Oct 2024 06:48:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729925336; cv=none; b=i7ux70FxOeIAI3z8chXGFc/izZgQni6fjg0btilFskRjAWquhhRhag9Nvpa/pEWTDgrLw9NfGTdjNKe26Y7xR6imt0TlID3czxqj6RiDZO8QWsHC3JB0op9JykuoGwmvM/QwoAEzINcFXtwZJcglAEyPqeISnUkO4i1J0dUCEFo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729925336; c=relaxed/simple; bh=cvqGneQGGub8/U4EpGyH4uuPlIxfrPXBqsIovPe5Hoc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=GryBUbi/z3TrXQrNLCEI1UvAXQB37X4rsUbUBsp0m6JRoFqMHmJqpSjbe04UcPM00brdK3ARsFXT6UqTsErnfZJl4bTdzkNqDqAdPhxfvTFFqExC8wQ4EOsFjheOGLQx592FsXWbon21xf7eBlWFAo6lNeEGcpqlZtlIPPvdPt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Xb9F66h4jz1SD2V; Sat, 26 Oct 2024 14:47:22 +0800 (CST) Received: from kwepemf100008.china.huawei.com (unknown [7.202.181.222]) by mail.maildlp.com (Postfix) with ESMTPS id 4FCE1180041; Sat, 26 Oct 2024 14:48:50 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemf100008.china.huawei.com (7.202.181.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 26 Oct 2024 14:48:49 +0800 From: Zeng Heng To: , , , , , CC: , , Subject: [PATCH v2] efi: sysfb_efi: Fix unused const variable 'efifb_fwnode_ops' Date: Sat, 26 Oct 2024 15:02:28 +0800 Message-ID: <20241026070228.3240177-1-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemf100008.china.huawei.com (7.202.181.222) Fix the following compilation warning: drivers/firmware/efi/sysfb_efi.c:345:39: warning: =E2=80=98efifb_fwnode_ops=E2=80=99 defined but not used [-Wunused-const-var= iable=3D] 345 | static const struct fwnode_operations efifb_fwnode_ops =3D { drivers/firmware/efi/sysfb_efi.c:238:35: warning: =E2=80=98efifb_dmi_swap_width_height=E2=80=99 defined but not used [-Wunused-const-variable=3D] 238 | static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst =3D { drivers/firmware/efi/sysfb_efi.c:188:35: warning: =E2=80=98efifb_dmi_system_table=E2=80=99 defined but not used [-Wunused-const-variable=3D] 188 | static const struct dmi_system_id efifb_dmi_system_table[] __initconst =3D { In addition to the above warning messages, a series of unused warnings because of cascading dependencies were found. The variables and functions related to warnings are only used after CONFIG_EFI enabled. Therefore, these warnings are addressed and fixed in this commit. Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup f= or all arches") Signed-off-by: Zeng Heng --- drivers/firmware/efi/sysfb_efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_= efi.c index cc807ed35aed..0cfc11ecc98b 100644 --- a/drivers/firmware/efi/sysfb_efi.c +++ b/drivers/firmware/efi/sysfb_efi.c @@ -82,6 +82,7 @@ void efifb_setup_from_dmi(struct screen_info *si, const c= har *opt) } } =20 +#ifdef CONFIG_EFI #define choose_value(dmivalue, fwvalue, field, flags) ({ \ typeof(fwvalue) _ret_ =3D fwvalue; \ if ((flags) & (field)) \ @@ -346,7 +347,6 @@ static const struct fwnode_operations efifb_fwnode_ops = =3D { .add_links =3D efifb_add_links, }; =20 -#ifdef CONFIG_EFI static struct fwnode_handle efifb_fwnode; =20 __init void sysfb_apply_efi_quirks(void) --=20 2.25.1