Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Randy Dunlap <rdunlap@infradead.org>,
	kernel test robot <lkp@intel.com>,
	David Rheinsberg <david@readahead.eu>,
	Hans de Goede <hdegoede@redhat.com>,
	Peter Jones <pjones@redhat.com>, Simona Vetter <simona@ffwll.ch>,
	linux-fbdev@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	linux-efi@vger.kernel.org
Subject: Re: [PATCH] efi: sysfb_efi: fix W=1 warnings when EFI is not set
Date: Wed, 08 Jan 2025 09:22:30 +0100	[thread overview]
Message-ID: <87zfk1iuk9.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20250107235312.236247-1-rdunlap@infradead.org>

Randy Dunlap <rdunlap@infradead.org> writes:

Hello Randy,

> A build with W=1 fails because there are code and data that are not
> needed or used when CONFIG_EFI is not set. Move the "#ifdef CONFIG_EFI"
> block to earlier in the source file so that the unused code/data are
> not built.
>
> drivers/firmware/efi/sysfb_efi.c:345:39: warning: ‘efifb_fwnode_ops’ defined but not used [-Wunused-const-variable=]
>   345 | static const struct fwnode_operations efifb_fwnode_ops = {
>       |                                       ^~~~~~~~~~~~~~~~
> drivers/firmware/efi/sysfb_efi.c:238:35: warning: ‘efifb_dmi_swap_width_height’ defined but not used [-Wunused-const-variable=]
>   238 | static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/firmware/efi/sysfb_efi.c:188:35: warning: ‘efifb_dmi_system_table’ defined but not used [-Wunused-const-variable=]
>   188 | static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: 15d27b15de96 ("efi: sysfb_efi: fix build when EFI is not set")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202501071933.20nlmJJt-lkp@intel.com/
> Cc: David Rheinsberg <david@readahead.eu>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Javier Martinez Canillas <javierm@redhat.com>
> Cc: Peter Jones <pjones@redhat.com>
> Cc: Simona Vetter <simona@ffwll.ch>
> Cc: linux-fbdev@vger.kernel.org
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: linux-efi@vger.kernel.org
> ---
>  drivers/firmware/efi/sysfb_efi.c |    2 +-

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  parent reply	other threads:[~2025-01-08  8:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 23:53 [PATCH] efi: sysfb_efi: fix W=1 warnings when EFI is not set Randy Dunlap
2025-01-08  8:08 ` Thomas Zimmermann
2025-01-08  8:22 ` Javier Martinez Canillas [this message]
2025-01-08 16:38   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfk1iuk9.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=ardb@kernel.org \
    --cc=david@readahead.eu \
    --cc=hdegoede@redhat.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=pjones@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox