msm: camera: common: memset usage optimization

Remove unnecessary memsets of the structure variables
whose fields are assigned prior to their usage or they
are dynamically allocated with calls that set the memory
to 0. This memset usage optimization is to improve
performance.

CRs-Fixed: 3228092
Change-Id: Iec68c6d072863627959ce603cff28afd26a1c408
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This commit is contained in:
Sokchetra Eung
2022-06-22 16:10:27 -07:00
committed by Camera Software Integration
부모 996c88bbaf
커밋 d2a1f0c968
20개의 변경된 파일20개의 추가작업 그리고 72개의 파일을 삭제

파일 보기

@@ -1946,8 +1946,6 @@ static int cam_sync_component_bind(struct device *dev,
cam_sync_init_entity(sync_dev);
video_set_drvdata(sync_dev->vdev, sync_dev);
memset(&sync_dev->sync_table, 0, sizeof(sync_dev->sync_table));
memset(&sync_dev->bitmap, 0, sizeof(sync_dev->bitmap));
bitmap_zero(sync_dev->bitmap, CAM_SYNC_MAX_OBJS);
/*

파일 보기

@@ -651,8 +651,6 @@ int cam_dma_fence_driver_init(void)
for (i = 0; i < CAM_DMA_FENCE_MAX_FENCES; i++)
spin_lock_init(&g_cam_dma_fence_dev->row_spinlocks[i]);
memset(&g_cam_dma_fence_dev->rows, 0, sizeof(g_cam_dma_fence_dev->rows));
memset(&g_cam_dma_fence_dev->bitmap, 0, sizeof(g_cam_dma_fence_dev->bitmap));
bitmap_zero(g_cam_dma_fence_dev->bitmap, CAM_DMA_FENCE_MAX_FENCES);
g_cam_dma_fence_dev->dma_fence_context = dma_fence_context_alloc(1);