From d831cd18820a8f89ce762fb9d37685234875a06c Mon Sep 17 00:00:00 2001 From: Ketan Patil Date: Wed, 25 May 2022 09:56:01 +0000 Subject: [PATCH] driver: platform: tegra: Fix typecast warnings Sparse is reporting typecast warnings in tegra_bootloader_debug driver, fix them by forcing typecast. Bug 3528414 Change-Id: Iad12b917b9a36cfca328051e7cfb0e742681eb23 Signed-off-by: Ketan Patil Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2718125 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2864630 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: svcacv Reviewed-by: Bharat Nihalani Tested-by: Bharat Nihalani GVS: Gerrit_Virtual_Submit --- drivers/platform/tegra/tegra_bootloader_debug.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/platform/tegra/tegra_bootloader_debug.c b/drivers/platform/tegra/tegra_bootloader_debug.c index 5ecc79c0..055798e9 100644 --- a/drivers/platform/tegra/tegra_bootloader_debug.c +++ b/drivers/platform/tegra/tegra_bootloader_debug.c @@ -365,9 +365,9 @@ static int __init tegra_bootloader_debuginit(void) pr_info("Remapped tegra_bl_debug_data_start(0x%llx)" " to address(0x%llx), size(0x%llx)\n", (u64)tegra_bl_debug_data_start, - (u64)ptr_bl_debug_data_start, + (__force u64)ptr_bl_debug_data_start, (u64)tegra_bl_debug_data_size); - tegra_bl_mapped_debug_data_start = ptr_bl_debug_data_start; + tegra_bl_mapped_debug_data_start = (__force void *)ptr_bl_debug_data_start; } /* @@ -395,7 +395,7 @@ static int __init tegra_bootloader_debuginit(void) (unsigned int)tegra_bl_bcp_start); goto out_err; } - tegra_bl_mapped_boot_cfg_start = ptr_bl_boot_cfg_start; + tegra_bl_mapped_boot_cfg_start = (__force void *)ptr_bl_boot_cfg_start; } } #endif /* CONFIG_DEBUG_FS */ @@ -441,10 +441,10 @@ static int __init tegra_bootloader_debuginit(void) pr_info("Remapped tegra_bl_full_carveout(0x%llx) " "to address 0x%llx, size(0x%llx)\n", (u64)tegra_bl_full_carveout, - (u64)ptr_bl_full_carveout, + (__force u64)ptr_bl_full_carveout, (u64)SIZE_OF_FULL_CARVEOUT); - tegra_bl_mapped_full_carveout = ptr_bl_full_carveout; + tegra_bl_mapped_full_carveout = (__force void *)ptr_bl_full_carveout; } tegra_bl_mapped_prof_start = tegra_bl_mapped_full_carveout + @@ -546,13 +546,13 @@ static void __exit tegra_bl_debuginit_module_exit(void) debugfs_remove_recursive(bl_debug_node); if (tegra_bl_mapped_debug_data_start) - iounmap(tegra_bl_mapped_debug_data_start); + iounmap((void __iomem *)tegra_bl_mapped_debug_data_start); if (tegra_bl_mapped_boot_cfg_start) - iounmap(tegra_bl_mapped_boot_cfg_start); + iounmap((void __iomem *)tegra_bl_mapped_boot_cfg_start); #endif if (tegra_bl_mapped_full_carveout) - iounmap(tegra_bl_mapped_full_carveout); + iounmap((void __iomem *)tegra_bl_mapped_full_carveout); if (boot_profiler_kobj) { sysfs_remove_file(boot_profiler_kobj,