difos/target/linux/bcm27xx/patches-6.12/950-0466-drivers-media-pci-Fix-Hailo-compile-warnings.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

41 lines
1.6 KiB
Diff

From 5aef434750bf05249efd7349440bbaec964c7672 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 2 Sep 2024 09:01:45 +0100
Subject: [PATCH] drivers: media: pci: Fix Hailo compile warnings
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/media/pci/hailo/common/pcie_common.c | 2 +-
drivers/media/pci/hailo/vdma/memory.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/media/pci/hailo/common/pcie_common.c
+++ b/drivers/media/pci/hailo/common/pcie_common.c
@@ -656,7 +656,7 @@ int hailo_pcie_write_firmware(struct hai
}
// TODO: HRT-14147 - remove this function
-bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
+static bool hailo_pcie_is_device_ready_for_boot(struct hailo_pcie_resources *resources)
{
return hailo_get_boot_status(resources) == BOOT_STATUS_UNINITIALIZED;
}
--- a/drivers/media/pci/hailo/vdma/memory.c
+++ b/drivers/media/pci/hailo/vdma/memory.c
@@ -512,6 +512,7 @@ void hailo_vdma_clear_continuous_buffer_
*
* Return: zero and the pfn at @pfn on success, -ve otherwise.
*/
+#if defined(HAILO_SUPPORT_MMIO_DMA_MAPPING)
static int follow_pfn(struct vm_area_struct *vma, unsigned long address,
unsigned long *pfn)
{
@@ -529,7 +530,7 @@ static int follow_pfn(struct vm_area_str
pte_unmap_unlock(ptep, ptl);
return 0;
}
-
+#endif
// Assumes the provided user_address belongs to the vma and that MMIO_AND_NO_PAGES_VMA_MASK bits are set under
// vma->vm_flags. This is validated in hailo_vdma_buffer_map, and won't be checked here