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 <[email protected]>

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/[email protected]?part=4

Reply via email to