From nobody Tue Feb 10 03:00:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EFDB66BB2F; Wed, 3 Apr 2024 08:09:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131749; cv=none; b=jVDxWVWOH+jYdDJZ+ekBjMGYGy7FDkOUJf/GwAC/VihjFeEzvmJqZ+fLENe34FZrd1b5G70JgCx2ZQeOte7wl7p+Z57oiN27HrvGaB382H0Yk8IFHUf119BQHJobQUokwtbVXH6Iu1Gdok6b52cx1bdfgDov/UTJ/NeB3qZ3gX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131749; c=relaxed/simple; bh=6hTjKP6WBOCL/0dZJm2MA9w9IJCqbMQSjTLYDwQEjY4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q94EUFAr37AjyeGxkF9KkbZHnC23tOCqrWIu1Hc2X+bIOs1l4iGl0ZeQNnpPb++VeY6MA44lbX0BFFw9jTCQ4NQi1ohVmBHub5jlSSv+pPPsr1PlJBAQrX9QZuVRLdb7vdVBfWc6ekMN1KeqUp4gfnfX7HdmWtsZzYnU055Al+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l/8zCn6N; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l/8zCn6N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4667CC433C7; Wed, 3 Apr 2024 08:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131748; bh=6hTjKP6WBOCL/0dZJm2MA9w9IJCqbMQSjTLYDwQEjY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l/8zCn6NLbDyqzej6+yt2TFIWP7PIg7HiHXdCQJTFoDO4X3FezNWc74lPih5w58/b 4SHUoSGfn3/vxivbPxIElkwdeoq/D/yQabS63yJmL6JjCYomj+IqJ3DFZENlZ3TUoa rhZV2Pyvjd8OPOwzsYl/LdBV1F7oyyNXlGRJFLZGV2wt5XYnmRW1Up41u4ssWjuPb3 /tp3IdroXWZozQkG2q99BzZ84oIGuVuHWgl3SeB8uTqTmwLmPaYdZMOtyawfZiuHLv RwBJzDy4Lvwbm11hITuga07fsnbMW3ksH+f5fhy9szvFEMoA7d2dH6ANDpkRERrh44 pkPXTIlCQDMhQ== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Ard Biesheuvel , Javier Martinez Canillas , Randy Dunlap , Daniel Vetter Cc: Arnd Bergmann , Ilias Apalodimas , "Kirill A. Shutemov" , Tom Lendacky , "Borislav Petkov (AMD)" , Masahisa Kojima , "Rafael J. Wysocki" , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , linux-efi@vger.kernel.org Subject: [PATCH 10/34] efi: sysfb: don't build when EFI is disabled Date: Wed, 3 Apr 2024 10:06:28 +0200 Message-Id: <20240403080702.3509288-11-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann With 'make W=3D1', there is a warning when EFI is turned off but sysfb_efi still gets built: drivers/firmware/efi/sysfb_efi.c:188:35: error: unused variable 'efifb_dmi_= system_table' [-Werror,-Wunused-const-variable] static const struct dmi_system_id efifb_dmi_system_table[] __initconst =3D { ^ drivers/firmware/efi/sysfb_efi.c:238:35: error: unused variable 'efifb_dmi_= swap_width_height' [-Werror,-Wunused-const-variable] static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst= =3D { ^ drivers/firmware/efi/sysfb_efi.c:297:28: error: unused function 'find_pci_o= verlap_node' [-Werror,-Wunused-function] static struct device_node *find_pci_overlap_node(void) There was an earlier patch to address the duplicate function definitions, b= ut that missed how we should not be building this file in the first place. Fixes: 15d27b15de96 ("efi: sysfb_efi: fix build when EFI is not set") Signed-off-by: Arnd Bergmann Acked-by: Ard Biesheuvel Acked-by: Javier Martinez Canillas --- drivers/firmware/efi/Makefile | 3 ++- drivers/firmware/efi/sysfb_efi.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile index a2d0009560d0..3baf80d8cf81 100644 --- a/drivers/firmware/efi/Makefile +++ b/drivers/firmware/efi/Makefile @@ -30,7 +30,8 @@ obj-$(CONFIG_EFI_RCI2_TABLE) +=3D rci2-table.o obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE) +=3D embedded-firmware.o obj-$(CONFIG_LOAD_UEFI_KEYS) +=3D mokvar-table.o =20 -obj-$(CONFIG_SYSFB) +=3D sysfb_efi.o +sysfb-$(CONFIG_SYSFB) +=3D sysfb_efi.o +obj-$(CONFIG_EFI) +=3D $(sysfb-y) =20 arm-obj-$(CONFIG_EFI) :=3D efi-init.o arm-runtime.o obj-$(CONFIG_ARM) +=3D $(arm-obj-y) diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_= efi.c index cc807ed35aed..a8c982475f6b 100644 --- a/drivers/firmware/efi/sysfb_efi.c +++ b/drivers/firmware/efi/sysfb_efi.c @@ -346,7 +346,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) @@ -372,4 +371,3 @@ __init void sysfb_set_efifb_fwnode(struct platform_devi= ce *pd) pd->dev.fwnode =3D &efifb_fwnode; } } -#endif --=20 2.39.2