hw/arm: Remove redundant arguments from set_kernel_args*
PATCH 1/1 hw/arm: Remove redundant arguments from set_kernel_args*
The parameters initrd_size and base are already included in the info parameter, so there is no need to pass them separately.
Signed-off-by Stefan Weil <[email protected]>
--- hw/arm_boot.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
hw/arm_boot.c +8 -9
@@ -81,9 +81,10 @@ static void default_reset_secondary(CPUState *env, p +=4 ; \ }while (0 ) -static void set_kernel_args(const struct arm_boot_info *info, -int initrd_size,target_phys_addr_t base) +static void set_kernel_args(const struct arm_boot_info *info) { +int initrd_size = info->initrd_size; +target_phys_addr_t base = info->loader_start;target_phys_addr_t p; p = base +KERNEL_ARGS_ADDR ;
@@ -134,12 +135,12 @@ static void set_kernel_args(const struct arm_boot_info *info,WRITE_WORD (p,0 ); } -static void set_kernel_args_old (const struct arm_boot_info *info, -int initrd_size,target_phys_addr_t base) +static void set_kernel_args_old (const struct arm_boot_info *info) {target_phys_addr_t p;const char *s; - +int initrd_size = info->initrd_size; +target_phys_addr_t base = info->loader_start;/* see linux/include/asm-arm/setup.h */ p = base +KERNEL_ARGS_ADDR ;
@@ -222,11 +223,9 @@ static void do_cpu_reset(void *opaque)if (env == first_cpu) { env->regs[15 ] = info->loader_start;if (old_param) { -set_kernel_args_old (info, info->initrd_size, - info->loader_start); +set_kernel_args_old (info); }else { -set_kernel_args (info, info->initrd_size, - info->loader_start); +set_kernel_args (info); } }else { info->secondary_cpu_reset_hook (env, info);
Signature · 1 line
1.7.7.3
andrzej zaborowski
AppliedQuoted 3 lines · Stefan Weil
The parameters
initrd_sizeand base are already included in the info parameter, so there is no need to pass them separately.
Thanks, applied.
Cheers