函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:scripts\dtc\libfdt\fdt_rw.c Create Date:2022-07-27 07:16:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:fdt_add_subnode_namelen

函数原型:int fdt_add_subnode_namelen(void *fdt, int parentoffset, const char *name, int namelen)

返回类型:int

参数:

类型参数名称
void *fdt
intparentoffset
const char *name
intnamelen
330  offset等于fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen)
331  如果offset大于等于0则返回:负FDT_ERR_NOTFOUND: The requested node or property does not exist
333  否则如果offset不等于负Error codes: informative error codes 则返回:offset
337  fdt_next_tag(fdt, parentoffset, & nextoffset)
338  循环
339  offset等于nextoffset
340  tag等于fdt_next_tag(fdt, offset, & nextoffset)
341 tag恒等于Property: name off,size, content tag恒等于p 循环
343  nh等于fdt_offset_ptr_w_(fdt, offset)
344  nodelen等于nh的长度加FDT_TAGALIGN(namelen + 1)加FDT_TAGSIZE
346  err等于fdt_splice_struct_(fdt, nh, 0, nodelen)
347  如果err则返回:err
350  tag等于cpu_to_fdt32(Start node: full name )
351  memset(name, 0, FDT_TAGALIGN(namelen + 1))
352  内存复制(name, name, namelen)
353  endtag等于nhnodelenFDT_TAGSIZE
354  endtag等于cpu_to_fdt32(End node )
356  返回:offset
调用者
名称描述
fdt_add_subnode