Lines Matching refs:oldlen
97 static int _fdt_splice(void *fdt, void *splicepoint, int oldlen, int newlen) in _fdt_splice() argument
102 if (((p + oldlen) < p) || ((p + oldlen) > end)) in _fdt_splice()
104 if ((p < (char *)fdt) || ((end - oldlen + newlen) < (char *)fdt)) in _fdt_splice()
106 if ((end - oldlen + newlen) > ((char *)fdt + fdt_totalsize(fdt))) in _fdt_splice()
108 memmove(p + newlen, p + oldlen, end - p - oldlen); in _fdt_splice()
126 int oldlen, int newlen) in _fdt_splice_struct() argument
128 int delta = newlen - oldlen; in _fdt_splice_struct()
131 if ((err = _fdt_splice(fdt, p, oldlen, newlen))) in _fdt_splice_struct()
206 int oldlen; in _fdt_resize_property() local
209 *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen); in _fdt_resize_property()
211 return oldlen; in _fdt_resize_property()
213 if ((err = _fdt_splice_struct(fdt, (*prop)->data, FDT_TAGALIGN(oldlen), in _fdt_resize_property()
252 int oldlen, newlen; in fdt_set_name() local
257 namep = (char *)(uintptr_t)fdt_get_name(fdt, nodeoffset, &oldlen); in fdt_set_name()
259 return oldlen; in fdt_set_name()
263 err = _fdt_splice_struct(fdt, namep, FDT_TAGALIGN(oldlen+1), in fdt_set_name()
295 int err, oldlen, newlen; in fdt_appendprop() local
299 prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen); in fdt_appendprop()
301 newlen = len + oldlen; in fdt_appendprop()
303 FDT_TAGALIGN(oldlen), in fdt_appendprop()
308 memcpy(prop->data + oldlen, val, len); in fdt_appendprop()