[PATCH] drm/radeon: Only define radeon_acpi_vfct_match when actually used

Uwe Kleine-König posted 1 patch 1 week, 2 days ago
drivers/gpu/drm/radeon/radeon_bios.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] drm/radeon: Only define radeon_acpi_vfct_match when actually used
Posted by Uwe Kleine-König 1 week, 2 days ago
This fixes the build failure

drivers/gpu/drm/radeon/radeon_bios.c:614:12: error: ‘radeon_acpi_vfct_match’ defined but not used [-Werror=unused-function]
  614 | static int radeon_acpi_vfct_match(struct radeon_device *rdev,
      |            ^~~~~~~~~~~~~~~~~~~~~~

for builds with CONFIG_ACPI unset.

Fixes: 33a18ecd2fbf ("drm/radeon: Fix VFCT bus number matching with soft filter")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,

33a18ecd2fbf is currently in next via

	https://gitlab.freedesktop.org/agd5f/linux.git drm-next

.

Best regards
Uwe

 drivers/gpu/drm/radeon/radeon_bios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
index cc10880af096..cd7a5d458157 100644
--- a/drivers/gpu/drm/radeon/radeon_bios.c
+++ b/drivers/gpu/drm/radeon/radeon_bios.c
@@ -596,6 +596,7 @@ static bool radeon_read_disabled_bios(struct radeon_device *rdev)
 		return legacy_read_disabled_bios(rdev);
 }
 
+#ifdef CONFIG_ACPI
 /**
  * radeon_acpi_vfct_match() - Check if a VFCT entry matches the device
  * @rdev: Radeon device
@@ -635,7 +636,6 @@ static int radeon_acpi_vfct_match(struct radeon_device *rdev,
 	return 0;
 }
 
-#ifdef CONFIG_ACPI
 static bool radeon_acpi_vfct_bios(struct radeon_device *rdev)
 {
 	struct acpi_table_header *hdr;

base-commit: 33a18ecd2fbf6bcbf803836e94eb31c26f4c7f41
-- 
2.55.0.11.g153666a7d9bb

Re: [PATCH] drm/radeon: Only define radeon_acpi_vfct_match when actually used
Posted by Alex Deucher 1 week, 2 days ago
Applied.  Thanks!

On Thu, Jul 16, 2026 at 9:04 AM Uwe Kleine-König
<u.kleine-koenig@baylibre.com> wrote:
>
> This fixes the build failure
>
> drivers/gpu/drm/radeon/radeon_bios.c:614:12: error: ‘radeon_acpi_vfct_match’ defined but not used [-Werror=unused-function]
>   614 | static int radeon_acpi_vfct_match(struct radeon_device *rdev,
>       |            ^~~~~~~~~~~~~~~~~~~~~~
>
> for builds with CONFIG_ACPI unset.
>
> Fixes: 33a18ecd2fbf ("drm/radeon: Fix VFCT bus number matching with soft filter")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> 33a18ecd2fbf is currently in next via
>
>         https://gitlab.freedesktop.org/agd5f/linux.git drm-next
>
> .
>
> Best regards
> Uwe
>
>  drivers/gpu/drm/radeon/radeon_bios.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
> index cc10880af096..cd7a5d458157 100644
> --- a/drivers/gpu/drm/radeon/radeon_bios.c
> +++ b/drivers/gpu/drm/radeon/radeon_bios.c
> @@ -596,6 +596,7 @@ static bool radeon_read_disabled_bios(struct radeon_device *rdev)
>                 return legacy_read_disabled_bios(rdev);
>  }
>
> +#ifdef CONFIG_ACPI
>  /**
>   * radeon_acpi_vfct_match() - Check if a VFCT entry matches the device
>   * @rdev: Radeon device
> @@ -635,7 +636,6 @@ static int radeon_acpi_vfct_match(struct radeon_device *rdev,
>         return 0;
>  }
>
> -#ifdef CONFIG_ACPI
>  static bool radeon_acpi_vfct_bios(struct radeon_device *rdev)
>  {
>         struct acpi_table_header *hdr;
>
> base-commit: 33a18ecd2fbf6bcbf803836e94eb31c26f4c7f41
> --
> 2.55.0.11.g153666a7d9bb
>
Re: [PATCH] drm/radeon: Only define radeon_acpi_vfct_match when actually used
Posted by Mario Limonciello 1 week, 2 days ago

On 7/16/26 07:36, Uwe Kleine-König wrote:
> This fixes the build failure
> 
> drivers/gpu/drm/radeon/radeon_bios.c:614:12: error: ‘radeon_acpi_vfct_match’ defined but not used [-Werror=unused-function]
>    614 | static int radeon_acpi_vfct_match(struct radeon_device *rdev,
>        |            ^~~~~~~~~~~~~~~~~~~~~~
> 
> for builds with CONFIG_ACPI unset.
> 
> Fixes: 33a18ecd2fbf ("drm/radeon: Fix VFCT bus number matching with soft filter")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

> ---
> Hello,
> 
> 33a18ecd2fbf is currently in next via
> 
> 	https://gitlab.freedesktop.org/agd5f/linux.git drm-next
> 
> .
> 
> Best regards
> Uwe
> 
>   drivers/gpu/drm/radeon/radeon_bios.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
> index cc10880af096..cd7a5d458157 100644
> --- a/drivers/gpu/drm/radeon/radeon_bios.c
> +++ b/drivers/gpu/drm/radeon/radeon_bios.c
> @@ -596,6 +596,7 @@ static bool radeon_read_disabled_bios(struct radeon_device *rdev)
>   		return legacy_read_disabled_bios(rdev);
>   }
>   
> +#ifdef CONFIG_ACPI
>   /**
>    * radeon_acpi_vfct_match() - Check if a VFCT entry matches the device
>    * @rdev: Radeon device
> @@ -635,7 +636,6 @@ static int radeon_acpi_vfct_match(struct radeon_device *rdev,
>   	return 0;
>   }
>   
> -#ifdef CONFIG_ACPI
>   static bool radeon_acpi_vfct_bios(struct radeon_device *rdev)
>   {
>   	struct acpi_table_header *hdr;
> 
> base-commit: 33a18ecd2fbf6bcbf803836e94eb31c26f4c7f41