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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 108EAC4320A for ; Wed, 28 Jul 2021 08:39:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD51760FC4 for ; Wed, 28 Jul 2021 08:39:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234258AbhG1IjO convert rfc822-to-8bit (ORCPT ); Wed, 28 Jul 2021 04:39:14 -0400 Received: from mail-vs1-f52.google.com ([209.85.217.52]:34632 "EHLO mail-vs1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234207AbhG1IjO (ORCPT ); Wed, 28 Jul 2021 04:39:14 -0400 Received: by mail-vs1-f52.google.com with SMTP id y18so990934vsc.1; Wed, 28 Jul 2021 01:39:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yVmhrRbJkvgpIhHEAfbGhWQBI7I0jYe3w6v9jo77iwE=; b=sKxXEB0p7o0zlVd0I4e2lBNZObdJdxiYaMBNWcPzpfIZIR5xPiuvC56P9cvCuu9ILx Vhc9QBsbpYbrgfz6H37IzDkWv6FjlOoacwz680mKx3DBM280LXXGB4n+q3lPwRmQJt9F yElBNeqfpOtQMzqhtHcHPfAcpBGOrMYNUXHKhgBpYccyoQha5ROMMpgAQ1GS9QbmTHvC pTl2syQYQukzDCud3ivxQXE5WsLaXTJ4lMb5ubrQbfhmvkG417imY7W7ekJ07to+f/7C HlS4oQZtKmHAKRr8sGSBn9yH0WHntC9/WX/HJ0ioV6XTHfKXLTM6HbnPe7sEhxxNr+BO HHpg== X-Gm-Message-State: AOAM532ekmn8Ph23vhgpUrtKee6Kn/zIh/gWfFYI9aRuIUEcc52m2wTv uwHV8FdyoV5FzLdm3zrbwNbaRO9EIhFQeseaC5Q= X-Google-Smtp-Source: ABdhPJxBvXkiNS/OAZjMRCgmqbqSWehnUkEclqwsoSHvLr0T9EfEWNQPPBEhYZvfHmNNmJI9lZ0l29OGsFVNYdIokAI= X-Received: by 2002:a05:6102:2828:: with SMTP id ba8mr20835288vsb.18.1627461552305; Wed, 28 Jul 2021 01:39:12 -0700 (PDT) MIME-Version: 1.0 References: <20210727050447.7339-1-rdunlap@infradead.org> In-Reply-To: <20210727050447.7339-1-rdunlap@infradead.org> From: Geert Uytterhoeven Date: Wed, 28 Jul 2021 10:39:00 +0200 Message-ID: Subject: Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set To: Randy Dunlap Cc: Linux Kernel Mailing List , Ard Biesheuvel , linux-efi , DRI Development , Javier Martinez Canillas , Thomas Zimmermann , Mark Brown , Linux-Next Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Hi Randy, On Tue, Jul 27, 2021 at 7:06 AM Randy Dunlap wrote: > When # CONFIG_EFI is not set, there are 2 definitions of > sysfb_apply_efi_quirks(). The stub from sysfb.h should be used > and the __init function from sysfb_efi.c should not be used. > > ../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’ > __init void sysfb_apply_efi_quirks(struct platform_device *pd) > ^~~~~~~~~~~~~~~~~~~~~~ > In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0: > ../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here > static inline void sysfb_apply_efi_quirks(struct platform_device *pd) > ^~~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Randy Dunlap Thanks for your patch! > --- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c > +++ linext-20210726/drivers/firmware/efi/sysfb_efi.c > @@ -332,6 +332,7 @@ static const struct fwnode_operations ef > .add_links = efifb_add_links, > }; > > +#ifdef CONFIG_EFI > static struct fwnode_handle efifb_fwnode; > > __init void sysfb_apply_efi_quirks(struct platform_device *pd) > @@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc > pd->dev.fwnode = &efifb_fwnode; > } > } > +#endif How come you enter drivers/firmware/efi/ without CONFIG_EFI? Oh: drivers/firmware/Makefile:obj-$(CONFIG_EFI) += efi/ drivers/firmware/Makefile:obj-$(CONFIG_UEFI_CPER) += efi/ Looks like UEFI_CPER is not related to EFI at all (it's not set in my arm64 config which has CONFIG_EFI=y). Perhaps it should be moved to drivers/acpi/ instead? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds