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:

committed by
Camera Software Integration

부모
996c88bbaf
커밋
d2a1f0c968
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user