Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit ddb9d5da authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Michael Bestas
Browse files

msm: camera: isp: fix -Wpointer-to-int-cast



Fixes:
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.c:399:20:
error: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from
'uint32_t *' (aka 'unsigned int *') [-Werror,-Wpointer-to-int-cast]
cam_cpas_reg_read((uint32_t)soc_private->cpas_handle,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_fe_ver1.c:403:20:
error: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from
'uint32_t *' (aka 'unsigned int *') [-Werror,-Wpointer-to-int-cast]
cam_cpas_reg_read((uint32_t)soc_private->cpas_handle,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This code should be carefully reviewed, as this looks like the compiler
has highlighted a bug.  Based on the use of soc_private->cpas_handle
being passed to cam_cpas_reg_read in another translation unit,
drivers/media/platform/msm/camera_floral/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_top/cam_vfe_camif_ver2.c
I suspect that they meant to use the first element's value, not the
address of the first element, truncated to 32b.

Bug: 155426751
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Change-Id: I966e41000aec72c5d117cbce5097128daa818a3d
parent 922485b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment