[PATCH] dm: core: fix no null pointer detection in ofnode_get_addr_size_index()

2021-05-13 Thread chenguanqiao
From: Chen Guanqiao Fixed a defect of a null pointer being discovered by Coverity Scan: CID 331544: Null pointer dereferences (REVERSE_INULL) Null-checking "size" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Chen

[PATCH v2] dm: core: fix no null pointer detection in ofnode_get_addr_size_index()

2021-07-06 Thread chenguanqiao
From: Chen Guanqiao Fixed a defect of a null pointer being discovered by Coverity Scan: CID 331544: Null pointer dereferences (REVERSE_INULL) Null-checking "size" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Chen

[PATCH v3] dm: core: fix no null pointer detection in ofnode_get_addr_size_index()

2021-07-12 Thread chenguanqiao
From: Chen Guanqiao Fixed a defect of a null pointer being discovered by Coverity Scan: CID 331544: Null pointer dereferences (REVERSE_INULL) Null-checking "size" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Chen

[PATCH] dm: core: Add size operations on device tree references

2021-04-01 Thread chenguanqiao
Add functions to add size of addresses in the device tree using ofnode references. Signed-off-by: Chen Guanqiao --- drivers/core/ofnode.c | 9 + include/dm/ofnode.h | 10 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index

[PATCH v2 1/2] dm: core: Add size operations on device tree references

2021-04-02 Thread chenguanqiao
Add functions to add size of addresses in the device tree using ofnode references. Signed-off-by: Chen Guanqiao --- drivers/core/ofnode.c | 9 + include/dm/ofnode.h | 10 ++ 2 files changed, 19 insertions(+) diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index

[PATCH v2 2/2] test: dm: add test item for ofnode_get_addr() and ofnode_get_size()

2021-04-02 Thread chenguanqiao
Add test item for getting address and size functions Test the following function: - ofnode_get_addr() - ofnode_get_size() Signed-off-by: Chen Guanqiao --- test/dm/ofnode.c | 24 1 file changed, 24 insertions(+) diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index

[PATCH v2 0/2] dm: core: Add size operations on device tree references

2021-04-02 Thread chenguanqiao
Currently, there is only an interface for obtaining address from node, and if you want to get the size, you need to traverse the node. So I added the function to get the size ,and added related test case. Changes for v2: - Add a test to test/dm/ofnode.c Chen Guanqiao (2): dm: core: Add size

[PATCH v3 0/2] dm: core: Add size operations on device tree references

2021-04-12 Thread chenguanqiao
From: Chen Guanqiao Currently, there is only an interface for obtaining address from node, and if you want to get the size, you need to traverse the node. So I added the function to get the size, and added related test case. Changes for v3: - Add return error for ofnode_get_size Changes for

[PATCH v3 2/2] test: dm: add test item for ofnode_get_addr() and ofnode_get_size()

2021-04-12 Thread chenguanqiao
From: Chen Guanqiao Add test item for getting address and size functions Test the following function: - ofnode_get_addr() - ofnode_get_size() Signed-off-by: Chen Guanqiao --- test/dm/ofnode.c | 31 +++ 1 file changed, 31 insertions(+) diff --git

[PATCH v3 1/2] dm: core: Add size operations on device tree references

2021-04-12 Thread chenguanqiao
From: Chen Guanqiao Add functions to add size of addresses in the device tree using ofnode references. If the size is not set, return FDT_SIZE_T_NONE. Signed-off-by: Chen Guanqiao --- drivers/core/ofnode.c | 11 +++ include/dm/ofnode.h | 10 ++ include/fdtdec.h | 5