Skip to contentSkip to conversation

media: atomisp: Remove unused ISP vmem load/store functions

PATCH In review Avishek Chaulagain 2 participants 2 messages Nov 22 – Nov 23

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: atomisp: Remove unused ISP vmem load/store functions

From: Abhishek Chaulagain <[email protected]>

isp_vmem_load(), isp_vmem_store(), isp_vmem_2d_load() and isp_vmem_2d_store() are the only external functions provided by vmem.c, and none of them has a caller anywhere in the tree. Every other function in the file (load_vector()/store_vector() and the hive_sim_wide pack/unpack helpers) exists solely to implement those four, so the whole translation unit is dead.

Remove vmem.c along with its Makefile entry and the four prototypes in vmem_local.h. The t_vmem_elem/t_svmem_elem typedefs and the VMEM_ARRAY/SVMEM_ARRAY macros in that header are used elsewhere and are kept.

---
 drivers/staging/media/atomisp/Makefile        |   1 -
 .../pci/hive_isp_css_common/host/vmem.c       | 275 ------------------
 .../pci/hive_isp_css_common/host/vmem_local.h |  32 --
 3 files changed, 308 deletions(-)
 delete mode 100644 drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c
drivers/staging/media/atomisp/Makefile +0 -1
index 1d0fbe220..3b2dad720 100644
@@ -146,7 +146,6 @@ atomisp-objs += \
 	pci/hive_isp_css_common/host/mmu.o \
 	pci/hive_isp_css_common/host/sp.o \
 	pci/hive_isp_css_common/host/timed_ctrl.o \
-	pci/hive_isp_css_common/host/vmem.o \
 	pci/hive_isp_css_shared/host/tag.o \
 	pci/system_local.o \
 	pci/runtime/isys/src/ibuf_ctrl_rmgr.o \
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem.c deleted +0 -275

275 lines not on this page · raw message

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/vmem_local.h +0 -32
index 0163d31cd..3af34c9bd 100644
@@ -16,36 +16,4 @@ typedef s16 t_svmem_elem;
 #define VMEM_ARRAY(x, s)	t_vmem_elem x[(s) / ISP_NWAY][ISP_NWAY]
 #define SVMEM_ARRAY(x, s)	t_svmem_elem x[(s) / ISP_NWAY][ISP_NWAY]
 
-void isp_vmem_load(
-    const isp_ID_t		ID,
-    const t_vmem_elem	*from,
-    t_vmem_elem		*to,
-    unsigned int elems); /* In t_vmem_elem */
-
-void isp_vmem_store(
-    const isp_ID_t		ID,
-    t_vmem_elem		*to,
-    const t_vmem_elem	*from,
-    unsigned int elems); /* In t_vmem_elem */
-
-void isp_vmem_2d_load(
-    const isp_ID_t		ID,
-    const t_vmem_elem	*from,
-    t_vmem_elem		*to,
-    unsigned int height,
-    unsigned int width,
-    unsigned int stride_to,  /* In t_vmem_elem */
-
-    unsigned		stride_from /* In t_vmem_elem */);
-
-void isp_vmem_2d_store(
-    const isp_ID_t		ID,
-    t_vmem_elem		*to,
-    const t_vmem_elem	*from,
-    unsigned int height,
-    unsigned int width,
-    unsigned int stride_to,  /* In t_vmem_elem */
-
-    unsigned		stride_from /* In t_vmem_elem */);
-
 #endif /* __VMEM_LOCAL_H_INCLUDED__ */
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Avishek Chaulagain

isp_vmem_load(), isp_vmem_store(), isp_vmem_2d_load() and isp_vmem_2d_store() are the only external functions provided by vmem.c, and none of them has a caller anywhere in the tree. Every other function in the file (load_vector()/store_vector() and the hive_sim_wide pack/unpack helpers) exists solely to implement those four, so the whole translation unit is dead.

Quoted 4 lines

Remove vmem.c along with its Makefile entry and the four prototypes in vmem_local.h. The t_vmem_elem/t_svmem_elem typedefs and the VMEM_ARRAY/SVMEM_ARRAY macros in that header are used elsewhere and are kept.

Looks legit, if it compiles,

Signature · 2 lines
With Best Regards,
Andy Shevchenko