[PATCH v2 1/3] ACPI: osl: Add __force attribute in acpi_os_map_iomem() cast

Lorenzo Pieralisi lorenzo.pieralisi at arm.com
Mon Aug 2 08:23:57 PDT 2021


Add a __force attribute to the void* cast in acpi_os_map_iomem()
to prevent sparse warnings.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
Cc: Ard Biesheuvel <ardb at kernel.org>
Cc: "Rafael J. Wysocki" <rjw at rjwysocki.net>
---
 drivers/acpi/osl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 45c5c0e45e33..8f67bf0f090b 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -376,7 +376,7 @@ EXPORT_SYMBOL_GPL(acpi_os_map_iomem);
 
 void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
 {
-	return (void *)acpi_os_map_iomem(phys, size);
+	return (__force void *)acpi_os_map_iomem(phys, size);
 }
 EXPORT_SYMBOL_GPL(acpi_os_map_memory);
 
-- 
2.31.0




More information about the linux-arm-kernel mailing list