Linux EFI development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: wuqianhai@loongson.cn, chenhuacai@kernel.org, kernel@xen0n.name,
	tzimmermann@suse.de, deller@gmx.de, bhelgaas@google.com
Cc: ardb@kernel.org, ilias.apalodimas@linaro.org, javierm@redhat.com,
	linux-pci@vger.kernel.org, linux-efi@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 4/6] LoongArch: video: Implement primary framebuffer device detection
Date: Tue, 10 Nov 2026 09:58:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-206820@kernel.org> (raw)
In-Reply-To: <20261110092418.2647821-1-wuqianhai@loongson.cn>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] LoongArch: video: missing linux/export.h include in
  video-common.c
--

commit 3e46d96932a555bf0346972f71660950e04f755d
Author: wuqianhai <wuqianhai@loongson.cn>

LoongArch: video: Implement primary framebuffer device detection

This commit implements video_is_primary_device() for LoongArch by checking
whether a PCI display device matches vga_default_device().

> diff --git a/arch/loongarch/video/video-common.c b/arch/loongarch/video/video-common.c
> new file mode 100644
> index 0000000000000..6fea46661cb64
> --- /dev/null
> +++ b/arch/loongarch/video/video-common.c
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2026 Loongson Technology Corporation Limited
> + */
> +
> +#include <linux/module.h>
> +#include <linux/pci.h>
> +#include <linux/vgaarb.h>
> +
> +#include <asm/video.h>
> +
> +bool video_is_primary_device(struct device *dev)
> +{
> +	struct pci_dev *pdev;
> +
> +	if (!dev_is_pci(dev))
> +		return false;
> +
> +	pdev = to_pci_dev(dev);
> +
> +	if (!pci_is_display(pdev))
> +		return false;
> +
> +	return pdev == vga_default_device();
> +}
> +EXPORT_SYMBOL(video_is_primary_device);
> +
> +MODULE_DESCRIPTION("LoongArch video helpers");
> +MODULE_LICENSE("GPL");

[Severity: Low]
Should this file include <linux/export.h> instead of <linux/module.h>?

Using EXPORT_SYMBOL() without a direct #include <linux/export.h> triggers
a scripts/misc-check warning when building with W=2:

  arch/loongarch/video/video-common.c: warning: EXPORT_SYMBOL() is used, but #include <linux/export.h> is missing

Since CONFIG_VIDEO is a bool Kconfig symbol, video-common.o is only ever
built-in and does not need <linux/module.h>, MODULE_DESCRIPTION(), or
MODULE_LICENSE().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110090203.2631481-1-wuqianhai@loongson.cn?part=4

  reply	other threads:[~2026-11-10  9:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261029033440.973077-1-wuqianhai@loongson.cn>
2026-11-10  8:56 ` [PATCH v3 0/6] LoongArch: Identify the firmware/boot display device wuqianhai
2026-11-10  8:56   ` [PATCH v3 1/6] LoongArch: efi: Provide sysfb_primary_display for screen_info users wuqianhai
2026-11-10 14:34     ` Thomas Zimmermann
2026-11-10 14:39     ` Thomas Zimmermann
2026-11-10 16:25     ` Thomas Zimmermann
2026-11-10  8:56   ` [PATCH v3 2/6] LoongArch/PCI: Refresh screen_info after resource assignment wuqianhai
2026-11-10 14:46     ` Thomas Zimmermann
2026-11-10  8:56   ` [PATCH v3 3/6] LoongArch/PCI: Remove vga default device override wuqianhai
2026-11-10  9:01 ` [PATCH v3 0/6] LoongArch: Identify the firmware/boot display device wuqianhai
2026-11-10  9:01   ` [PATCH v3 1/6] LoongArch: efi: Provide sysfb_primary_display for screen_info users wuqianhai
2026-11-10  9:01   ` [PATCH v3 2/6] LoongArch/PCI: Refresh screen_info after resource assignment wuqianhai
2026-11-10  9:52     ` sashiko-bot
2026-11-10  9:02   ` [PATCH v3 3/6] LoongArch/PCI: Remove vga default device override wuqianhai
2026-11-10  9:24   ` [PATCH v3 4/6] LoongArch: video: Implement primary framebuffer device detection wuqianhai
2026-11-10  9:58     ` sashiko-bot [this message]
2026-11-10  9:24   ` [PATCH v3 5/6] efi/libstub: Enable direct sysfb_primary_display access on LoongArch wuqianhai
2026-11-10  9:24   ` [PATCH v3 6/6] PCI/VGA: Enable firmware default device detection " wuqianhai
2026-11-10  9:49     ` sashiko-bot
2026-11-10 10:00   ` [PATCH v3 0/6] LoongArch: Identify the firmware/boot display device Huacai Chen
2026-11-10  8:57 [PATCH v3 4/6] LoongArch: video: Implement primary framebuffer device detection wuqianhai

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=sashiko-outbox-206820@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ardb@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=chenhuacai@kernel.org \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=javierm@redhat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tzimmermann@suse.de \
    --cc=wuqianhai@loongson.cn \
    /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