aboutsummaryrefslogtreecommitdiff
path: root/hw/mips
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:21 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:15 +0200
commit27773d8eeec83f78ed482fdd6031e35d99d2bb8c (patch)
tree88388b86f297caeb9ed197c1b0f759b2aa391891 /hw/mips
parente7dd191c92fb652331d4784a926b64d7095a4d31 (diff)
downloadqemu-27773d8eeec83f78ed482fdd6031e35d99d2bb8c.zip
qemu-27773d8eeec83f78ed482fdd6031e35d99d2bb8c.tar.gz
qemu-27773d8eeec83f78ed482fdd6031e35d99d2bb8c.tar.bz2
hw/mips/r4k: Constify params_size
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180625124238.25339-30-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/mips')
-rw-r--r--hw/mips/mips_r4k.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index e5cf8ed..fc38b4b 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -79,8 +79,9 @@ typedef struct ResetData {
static int64_t load_kernel(void)
{
+ const size_t params_size = 264;
int64_t entry, kernel_high;
- long kernel_size, initrd_size, params_size;
+ long kernel_size, initrd_size;
ram_addr_t initrd_offset;
uint32_t *params_buf;
int big_endian;
@@ -128,7 +129,6 @@ static int64_t load_kernel(void)
}
/* Store command line. */
- params_size = 264;
params_buf = g_malloc(params_size);
params_buf[0] = tswap32(ram_size);
@@ -143,7 +143,7 @@ static int64_t load_kernel(void)
}
rom_add_blob_fixed("params", params_buf, params_size,
- (16 << 20) - 264);
+ (16 << 20) - params_size);
g_free(params_buf);
return entry;