Lines Matching refs:offset
140 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
142 unsigned int uoffset = offset;
143 unsigned int absoffset = offset + fdt_off_dt_struct(fdt);
145 if (offset < 0)
156 || ((offset + len) > fdt_size_dt_struct(fdt)))
159 return fdt_offset_ptr_(fdt, offset);
166 int offset = startoffset;
170 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
174 offset += FDT_TAGSIZE;
181 p = fdt_offset_ptr(fdt, offset++, 1);
188 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
193 sum = len + offset;
195 (INT_MAX <= sum || sum < (uint32_t) offset))
198 /* skip-name offset, length and value */
199 offset += sizeof(struct fdt_property) - FDT_TAGSIZE + len;
203 ((offset - len) % 8) != 0)
204 offset += 4;
216 if (!fdt_offset_ptr(fdt, startoffset, offset - startoffset))
219 *nextoffset = FDT_TAGALIGN(offset);
223 int fdt_check_node_offset_(const void *fdt, int offset)
226 && ((offset < 0) || (offset % FDT_TAGSIZE)))
229 if (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE)
232 return offset;
235 int fdt_check_prop_offset_(const void *fdt, int offset)
238 && ((offset < 0) || (offset % FDT_TAGSIZE)))
241 if (fdt_next_tag(fdt, offset, &offset) != FDT_PROP)
244 return offset;
247 int fdt_next_node(const void *fdt, int offset, int *depth)
252 if (offset >= 0)
253 if ((nextoffset = fdt_check_node_offset_(fdt, offset)) < 0)
257 offset = nextoffset;
258 tag = fdt_next_tag(fdt, offset, &nextoffset);
284 return offset;
287 int fdt_first_subnode(const void *fdt, int offset)
291 offset = fdt_next_node(fdt, offset, &depth);
292 if (offset < 0 || depth != 1)
295 return offset;
298 int fdt_next_subnode(const void *fdt, int offset)
307 offset = fdt_next_node(fdt, offset, &depth);
308 if (offset < 0 || depth < 1)
312 return offset;