
From: Simon Glass <sjg@chromium.org> This variable is a string, so add a _str suffix to make this clear. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/pxe_utils.c | 22 +++++++++++----------- include/pxe_utils.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 0cfe8a4fe1b..d6076efcbf7 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -540,7 +540,8 @@ static int label_process_fdt(struct pxe_context *ctx, struct pxe_label *label, * * @ctx: PXE context * @label: Label to process - * @kernel_addr: String containing kernel address (cannot be NULL) + * @kern_addr_str: String containing kernel address and possible FIT + * configuration (cannot be NULL) * @initrd_addr: String containing initrd address (0 if none) * @initrd_size: initrd size (only used if @initrd_addr) * @initrd_str: initrd string to process (only used if @initrd_addr) @@ -550,7 +551,7 @@ static int label_process_fdt(struct pxe_context *ctx, struct pxe_label *label, * returned, or -ve error value on error */ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label, - char *kernel_addr, ulong initrd_addr, + char *kern_addr_str, ulong initrd_addr, ulong initrd_size, char *initrd_str, const char *conf_fdt_str, ulong conf_fdt) { @@ -562,9 +563,9 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label, bootm_init(&bmi); - bmi.addr_img = kernel_addr; + bmi.addr_img = kern_addr_str; bmi.conf_fdt = conf_fdt_str; - bootm_x86_set(&bmi, bzimage_addr, hextoul(kernel_addr, NULL)); + bootm_x86_set(&bmi, bzimage_addr, hextoul(kern_addr_str, NULL)); if (initrd_addr) { bmi.conf_ramdisk = initrd_str; @@ -572,7 +573,7 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label, bootm_x86_set(&bmi, initrd_size, initrd_size); } - kernel_addr_r = genimg_get_kernel_addr(kernel_addr); + kernel_addr_r = genimg_get_kernel_addr(kern_addr_str); buf = map_sysmem(kernel_addr_r, 0); /* @@ -662,7 +663,6 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) char fit_addr[200]; const char *conf_fdt_str; ulong conf_fdt = 0; - ulong addr; int ret; label_print(label); @@ -797,7 +797,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && ctx->no_boot) { ctx->label = label; - ctx->kernel_addr = strdup(kern_addr_str); + ctx->kern_addr_str = strdup(kern_addr_str); if (initrd_addr) { ctx->initrd_addr = initrd_addr; ctx->initrd_size = initrd_size; @@ -806,14 +806,14 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) ctx->conf_fdt_str = strdup(conf_fdt_str); ctx->conf_fdt = conf_fdt; log_debug("Saving label '%s':\n", label->name); - log_debug("- kernel_addr '%s' conf_fdt_str '%s' conf_fdt %lx\n", - ctx->kernel_addr, ctx->conf_fdt_str, conf_fdt); + log_debug("- kern_addr_str '%s' conf_fdt_str '%s' conf_fdt %lx\n", + ctx->kern_addr_str, ctx->conf_fdt_str, conf_fdt); if (initrd_addr) { log_debug("- initrd addr %lx filesize %lx str '%s'\n", ctx->initrd_addr, ctx->initrd_size, ctx->initrd_str); } - if (!ctx->kernel_addr || (conf_fdt_str && !ctx->conf_fdt_str) || + if (!ctx->kern_addr_str || (conf_fdt_str && !ctx->conf_fdt_str) || (initrd_addr && !ctx->initrd_str)) { printf("malloc fail (saving label)\n"); return 1; @@ -1116,7 +1116,7 @@ int pxe_do_boot(struct pxe_context *ctx) if (!ctx->label) return log_msg_ret("pxb", -ENOENT); - ret = label_run_boot(ctx, ctx->label, ctx->kernel_addr, + ret = label_run_boot(ctx, ctx->label, ctx->kern_addr_str, ctx->initrd_addr, ctx->initrd_size, ctx->initrd_str, ctx->conf_fdt_str, ctx->conf_fdt); if (ret) diff --git a/include/pxe_utils.h b/include/pxe_utils.h index a17af953d2a..523ec68adc7 100644 --- a/include/pxe_utils.h +++ b/include/pxe_utils.h @@ -125,7 +125,7 @@ typedef int (*pxe_getfile_func)(struct pxe_context *ctx, const char *file_path, * * The following are only used when probing for a label * @label: Label to process - * @kernel_addr: String containing kernel address (cannot be NULL) + * @kern_addr_str: String containing kernel address (cannot be NULL) * @initrd_addr: initaddr address (0 if none) * @initrd_size: initrd size (only used if @initrd_addr) * @initrd_str: initrd string to process (only used if @initrd_addr) @@ -159,7 +159,7 @@ struct pxe_context { /* information on the selected label to boot */ struct pxe_label *label; - char *kernel_addr; + char *kern_addr_str; ulong initrd_addr; ulong initrd_size; char *initrd_str; -- 2.43.0