X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Ffdt_support.c;h=1f0d8f5fe9a3348addd99255b4538dd3830fd424;hb=dd88ab325cfcc7f803afd40600571b3f9c79319c;hp=416100e394dc92d3c61f143aa807681b1a5c84ce;hpb=efc284e32503b240dbd35c6e8b8d098d702b4be7;p=u-boot diff --git a/common/fdt_support.c b/common/fdt_support.c index 416100e394..1f0d8f5fe9 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -4,23 +4,7 @@ * * Copyright 2010-2011 Freescale Semiconductor, Inc. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -458,7 +442,7 @@ void fdt_fixup_ethernet(void *fdt) { int node, i, j; char enet[16], *tmp, *end; - char mac[16] = "ethaddr"; + char mac[16]; const char *path; unsigned char mac_addr[6]; @@ -467,6 +451,7 @@ void fdt_fixup_ethernet(void *fdt) return; i = 0; + strcpy(mac, "ethaddr"); while ((tmp = getenv(mac)) != NULL) { sprintf(enet, "ethernet%d", i); path = fdt_getprop(fdt, node, enet, NULL); @@ -781,11 +766,11 @@ int fdt_node_set_part_info(void *blob, int parent_offset, part = list_entry(pentry, struct part_info, link); - debug("%2d: %-20s0x%08x\t0x%08x\t%d\n", + debug("%2d: %-20s0x%08llx\t0x%08llx\t%d\n", part_num, part->name, part->size, part->offset, part->mask_flags); - sprintf(buf, "partition@%x", part->offset); + sprintf(buf, "partition@%llx", part->offset); add_sub: ret = fdt_add_subnode(blob, parent_offset, buf); if (ret == -FDT_ERR_NOSPACE) {