summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/romapi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-06-13 16:57:34 -0600
committerTom Rini <trini@konsulko.com>2025-06-13 16:57:34 -0600
commit2556caa89caba6c3d4df7910828119bc65beb1f0 (patch)
tree1381f1957105fca50895e85b74101adcd75f6f6f /arch/arm/mach-imx/romapi.c
parentf73450918d66565c5efacf2bb57227ba94bdaa40 (diff)
parentae86cd8c59fe08c9a37d14dbd6e42190dda2a0d4 (diff)
Merge patch series "drop volatile from global data"
Rasmus Villemoes <ravi@prevas.dk> says: There's really no reason for the gd pointer to have the volatile qualifier. In fact, I claim that it's completely unnecessary and just pessimizes code generation and forces ugly casts in lots of places. For example, see the casts in drivers/core/tag.c where elements are added to gd->dm_taglist, or a helper such as cyclic_get_list() that should not be needed. Also, it is what ends up standing in the way of an otherwise innocent code cleanup of list.h: https://lore.kernel.org/u-boot/20250522165656.GB2179216@bill-the-cat/ Note that riscv, x86 as well as arm64 with LTO enabled has not had this volatile qualifier, so it's unlikely there's any generic code that depends on it. Link: https://lore.kernel.org/r/20250604195612.2312979-1-ravi@prevas.dk
Diffstat (limited to 'arch/arm/mach-imx/romapi.c')
-rw-r--r--arch/arm/mach-imx/romapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx/romapi.c
index ff0522c2d11..c6fe4d8858e 100644
--- a/arch/arm/mach-imx/romapi.c
+++ b/arch/arm/mach-imx/romapi.c
@@ -9,7 +9,7 @@ DECLARE_GLOBAL_DATA_PTR;
u32 rom_api_download_image(u8 *dest, u32 offset, u32 size)
{
u32 xor = (uintptr_t)dest ^ offset ^ size;
- volatile gd_t *sgd = gd;
+ gd_t *sgd = gd;
u32 ret;
ret = g_rom_api->download_image(dest, offset, size, xor);
@@ -21,7 +21,7 @@ u32 rom_api_download_image(u8 *dest, u32 offset, u32 size)
u32 rom_api_query_boot_infor(u32 info_type, u32 *info)
{
u32 xor = info_type ^ (uintptr_t)info;
- volatile gd_t *sgd = gd;
+ gd_t *sgd = gd;
u32 ret;
ret = g_rom_api->query_boot_infor(info_type, info, xor);
@@ -34,7 +34,7 @@ extern struct rom_api *g_rom_api;
enum boot_device get_boot_device(void)
{
- volatile gd_t *pgd = gd;
+ gd_t *pgd = gd;
int ret;
u32 boot;
u16 boot_type;