From: Denis Orlov <denorl2009@gmail.com>
To: barebox@lists.infradead.org
Cc: Denis Orlov <denorl2009@gmail.com>
Subject: [PATCH] MIPS: use more consistent type for memory size values
Date: Sun, 23 Jun 2024 23:46:53 +0300 [thread overview]
Message-ID: <20240623204805.44070-1-denorl2009@gmail.com> (raw)
Switch from using u32 to unsigned long for these. It is unlikely to be
actually utilized on 64-bit builds, but this feels a bit safer,
considering that we work with the whole register width (32 or 64 bit,
depending on the config setting) for the corresponding value on the
assembly side.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
---
arch/mips/boot/uncompress.c | 6 +++---
arch/mips/lib/reloc.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/boot/uncompress.c b/arch/mips/boot/uncompress.c
index 9344679a6b..0630d03c6b 100644
--- a/arch/mips/boot/uncompress.c
+++ b/arch/mips/boot/uncompress.c
@@ -19,14 +19,14 @@ extern void *input_data_end;
unsigned long free_mem_ptr;
unsigned long free_mem_end_ptr;
-void barebox_pbl_start(void *fdt, void *fdt_end, u32 ram_size);
+void barebox_pbl_start(void *fdt, void *fdt_end, unsigned long ram_size);
void __section(.text_entry) barebox_pbl_start(void *fdt, void *fdt_end,
- u32 ram_size)
+ unsigned long ram_size)
{
u32 piggy_len, fdt_len;
void *fdt_new;
- void (*barebox)(void *fdt, u32 ram_size);
+ void (*barebox)(void *fdt, unsigned long ram_size);
puts_ll("barebox_pbl_start()\n");
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index ec351b66f7..be8267a0bb 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -41,7 +41,7 @@
#include <asm-generic/memory_layout.h>
void main_entry(void *fdt);
-void __noreturn relocate_code(void *fdt, u32 relocaddr);
+void __noreturn relocate_code(void *fdt, unsigned long ram_size);
/**
* read_uint() - Read an unsigned integer from the buffer
@@ -106,7 +106,7 @@ static void apply_reloc(unsigned int type, void *addr, long off)
}
}
-void __noreturn relocate_code(void *fdt, u32 ram_size)
+void __noreturn relocate_code(void *fdt, unsigned long ram_size)
{
unsigned long addr, length, bss_len, relocaddr, new_stack;
uint8_t *buf;
--
2.45.2
next reply other threads:[~2024-06-23 20:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-23 20:46 Denis Orlov [this message]
2024-07-01 12:12 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240623204805.44070-1-denorl2009@gmail.com \
--to=denorl2009@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox