msm: camera: Change %p into %pK
Change %p into %pK to prevent kernel info leak. Change-Id: Iad411dbba05326aa2bce82aff5e8140fd0a31a08 Signed-off-by: Santhosh Kumar Thimmanna Bhattar <sthim@codeaurora.org>
This commit is contained in:
parent
d58f9255b0
commit
63b0dbd6bf
|
@ -1122,7 +1122,7 @@ static int msm_vfe40_start_fetch_engine(struct vfe_device *vfe_dev,
|
|||
rc = vfe_dev->buf_mgr->ops->get_buf_by_index(
|
||||
vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf);
|
||||
if (rc < 0 || !buf) {
|
||||
pr_err("%s: No fetch buffer rc= %d buf= %p\n",
|
||||
pr_err("%s: No fetch buffer rc= %d buf= %pK\n",
|
||||
__func__, rc, buf);
|
||||
mutex_unlock(&vfe_dev->buf_mgr->lock);
|
||||
return -EINVAL;
|
||||
|
|
|
@ -2152,7 +2152,7 @@ int msm_isp_axi_reset(struct vfe_device *vfe_dev,
|
|||
bufq = vfe_dev->buf_mgr->ops->get_bufq(vfe_dev->buf_mgr,
|
||||
bufq_handle);
|
||||
if (!bufq) {
|
||||
pr_err("%s: bufq null %p by handle %x\n",
|
||||
pr_err("%s: bufq null %pK by handle %x\n",
|
||||
__func__, bufq, bufq_handle);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -563,7 +563,7 @@ static void bu24219_ois_init_shift_table (struct bu24219_ois_ctrl_t *a_ctrl)
|
|||
ret = bu24219_ois_verify_sum(&buf[ois_shift_start_addr],\
|
||||
a_ctrl->fw_info.shift_data_size, *(int *)(buf + a_ctrl->fw_info.shift_chksum_offset));
|
||||
if (ret < 0) {
|
||||
pr_err("ERROR %s :check sum verification failed! checksum[%p] fw[%p]\n", __func__,
|
||||
pr_err("ERROR %s :check sum verification failed! checksum[%pK] fw[%pK]\n", __func__,
|
||||
&buf[a_ctrl->fw_info.shift_chksum_offset], &buf[ois_shift_start_addr]);
|
||||
return;
|
||||
}
|
||||
|
@ -668,7 +668,7 @@ int bu24219_ois_download_factory_fw_set(struct bu24219_ois_ctrl_t *a_ctrl)
|
|||
ret = bu24219_ois_verify_sum(&buf[ois_set_fw_addr],\
|
||||
a_ctrl->fw_info.fa_fw_data_size, *(int *)(buf + a_ctrl->fw_info.fa_fw_chksum_offset));
|
||||
if (ret < 0) {
|
||||
pr_err("%s: OIS_FW check sum verification failed! checksum[%p] fw[%p]\n", __func__,
|
||||
pr_err("%s: OIS_FW check sum verification failed! checksum[%pK] fw[%pK]\n", __func__,
|
||||
&buf[a_ctrl->fw_info.fa_fw_chksum_offset], &buf[ois_set_fw_addr]);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -767,7 +767,7 @@ int bu24219_ois_download_fw_set(struct bu24219_ois_ctrl_t *a_ctrl)
|
|||
ret = bu24219_ois_verify_sum(&buf[ois_set_fw_addr],\
|
||||
a_ctrl->fw_info.fw_data_size, *(int *)(buf + a_ctrl->fw_info.fw_chksum_offset));
|
||||
if (ret < 0) {
|
||||
pr_err("OIS_FW check sum verification failed! checksum[%p] fw[%p]\n", &buf[a_ctrl->fw_info.fw_chksum_offset],\
|
||||
pr_err("OIS_FW check sum verification failed! checksum[%pK] fw[%pK]\n", &buf[a_ctrl->fw_info.fw_chksum_offset],\
|
||||
&buf[ois_set_fw_addr]);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ int bu24219_ois_download_cal_data(struct bu24219_ois_ctrl_t *a_ctrl, int mode)
|
|||
ret = bu24219_ois_verify_sum(&buf[ois_cal_start_addr],\
|
||||
a_ctrl->fw_info.cal_data_size, *(int *)(buf + a_ctrl->fw_info.cal_chksum_offset));
|
||||
if (ret < 0) {
|
||||
pr_err("OIS_CAL check sum verification failed! checksum[%p] fw[%p]\n", &buf[a_ctrl->fw_info.cal_chksum_offset],\
|
||||
pr_err("OIS_CAL check sum verification failed! checksum[%pK] fw[%pK]\n", &buf[a_ctrl->fw_info.cal_chksum_offset],\
|
||||
&buf[ois_cal_start_addr]);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1430,7 +1430,7 @@ static long bu24219_ois_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
{
|
||||
struct bu24219_ois_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd);
|
||||
void __user *argp = (void __user *)arg;
|
||||
CDBG_I("%s:%d a_ctrl %p argp %p command %d \n", __func__, __LINE__, a_ctrl, argp, cmd);
|
||||
CDBG_I("%s:%d a_ctrl %pK argp %pK command %d \n", __func__, __LINE__, a_ctrl, argp, cmd);
|
||||
switch (cmd) {
|
||||
case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID:
|
||||
return bu24219_ois_get_subdev_id(a_ctrl, argp);
|
||||
|
@ -1475,7 +1475,7 @@ static int bu24219_ois_power_up(struct bu24219_ois_ctrl_t *ctrl)
|
|||
|
||||
if (ctrl->is_camera_run == FALSE && ctrl->ois_state == OIS_POWER_DOWN) {
|
||||
|
||||
CDBG("[%p] [%p]\n", ctrl->pinctrl_info.pinctrl,
|
||||
CDBG("[%pK] [%pK]\n", ctrl->pinctrl_info.pinctrl,
|
||||
ctrl->pinctrl_info.gpio_state_active);
|
||||
|
||||
pinctrl_select_state(ctrl->pinctrl_info.pinctrl,
|
||||
|
@ -1518,7 +1518,7 @@ static int bu24219_ois_power_down(struct bu24219_ois_ctrl_t *ctrl)
|
|||
|
||||
if (ctrl->is_camera_run == FALSE && ctrl->ois_state == OIS_POWER_UP) {
|
||||
|
||||
CDBG("[%p] [%p]\n", ctrl->pinctrl_info.pinctrl,
|
||||
CDBG("[%pK] [%pK]\n", ctrl->pinctrl_info.pinctrl,
|
||||
ctrl->pinctrl_info.gpio_state_suspend);
|
||||
|
||||
gpio_direction_output(ctrl->ois_en, 0);
|
||||
|
@ -1662,7 +1662,7 @@ static int32_t bu24219_ois_i2c_probe(struct i2c_client *client,
|
|||
}
|
||||
ois_ctrl_t->dev = &client->dev;
|
||||
|
||||
CDBG("client = 0x%p\n", client);
|
||||
CDBG("client = 0x%pK\n", client);
|
||||
|
||||
rc = of_property_read_u32(client->dev.of_node, "cell-index",
|
||||
&ois_ctrl_t->subdev_id);
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
|
||||
void msm_camera_io_w(u32 data, void __iomem *addr)
|
||||
{
|
||||
CDBG("%s: 0x%p %08x\n", __func__, (addr), (data));
|
||||
CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data));
|
||||
writel_relaxed((data), (addr));
|
||||
}
|
||||
|
||||
void msm_camera_io_w_mb(u32 data, void __iomem *addr)
|
||||
{
|
||||
CDBG("%s: 0x%p %08x\n", __func__, (addr), (data));
|
||||
CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data));
|
||||
wmb();
|
||||
writel_relaxed((data), (addr));
|
||||
wmb();
|
||||
|
@ -54,7 +54,7 @@ u32 msm_camera_io_r_mb(void __iomem *addr)
|
|||
rmb();
|
||||
data = readl_relaxed(addr);
|
||||
rmb();
|
||||
CDBG("%s: 0x%p %08x\n", __func__, (addr), (data));
|
||||
CDBG("%s: 0x%pK %08x\n", __func__, (addr), (data));
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void msm_camera_io_dump(void __iomem *addr, int size)
|
|||
p_str = line_str;
|
||||
for (i = 0; i < size/4; i++) {
|
||||
if (i % 4 == 0) {
|
||||
snprintf(p_str, 12, "0x%p: ", p);
|
||||
snprintf(p_str, 12, "0x%pK: ", p);
|
||||
p_str += 10;
|
||||
}
|
||||
data = readl_relaxed(p++);
|
||||
|
@ -100,7 +100,7 @@ void msm_camera_io_dump(void __iomem *addr, int size)
|
|||
void msm_camera_io_memcpy(void __iomem *dest_addr,
|
||||
void __iomem *src_addr, u32 len)
|
||||
{
|
||||
CDBG("%s: %p %p %d\n", __func__, dest_addr, src_addr, len);
|
||||
CDBG("%s: %pK %pK %d\n", __func__, dest_addr, src_addr, len);
|
||||
msm_camera_io_memcpy_toio(dest_addr, src_addr, len / 4);
|
||||
msm_camera_io_dump(dest_addr, len);
|
||||
}
|
||||
|
@ -602,7 +602,7 @@ int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size,
|
|||
int rc = 0, i = 0, err = 0;
|
||||
|
||||
if (!gpio_tbl || !size) {
|
||||
pr_err("%s:%d invalid gpio_tbl %p / size %d\n", __func__,
|
||||
pr_err("%s:%d invalid gpio_tbl %pK / size %d\n", __func__,
|
||||
__LINE__, gpio_tbl, size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -1695,7 +1695,7 @@ int32_t msm_sensor_platform_probe(struct platform_device *pdev,
|
|||
uint32_t session_id;
|
||||
unsigned long mount_pos = 0;
|
||||
s_ctrl->pdev = pdev;
|
||||
CDBG("%s called data %p\n", __func__, data);
|
||||
CDBG("%s called data %pK\n", __func__, data);
|
||||
CDBG("%s pdev name %s\n", __func__, pdev->id_entry->name);
|
||||
if (pdev->dev.of_node) {
|
||||
rc = msm_sensor_get_dt_data(pdev->dev.of_node, s_ctrl);
|
||||
|
|
|
@ -1028,7 +1028,7 @@ static int32_t msm_sensor_driver_get_gpio_data(
|
|||
|
||||
/* Validate input paramters */
|
||||
if (!sensordata || !of_node) {
|
||||
pr_err("failed: invalid params sensordata %p of_node %p",
|
||||
pr_err("failed: invalid params sensordata %pK of_node %pK",
|
||||
sensordata, of_node);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ static void cam_smmu_print_list(int idx)
|
|||
pr_err("index = %d ", idx);
|
||||
list_for_each_entry(mapping,
|
||||
&iommu_cb_set.cb_info[idx].list_head, list) {
|
||||
pr_err("ion_fd = %d, paddr= 0x%p, len = %u\n",
|
||||
pr_err("ion_fd = %d, paddr= 0x%pK, len = %u\n",
|
||||
mapping->ion_fd, (void *)mapping->paddr,
|
||||
(unsigned int)mapping->len);
|
||||
}
|
||||
|
@ -140,10 +140,10 @@ static void cam_smmu_print_table(void)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < iommu_cb_set.cb_num; i++) {
|
||||
pr_err("i= %d, handle= %d, name_addr=%p\n", i,
|
||||
pr_err("i= %d, handle= %d, name_addr=%pK\n", i,
|
||||
(int)iommu_cb_set.cb_info[i].handle,
|
||||
(void *)iommu_cb_set.cb_info[i].name);
|
||||
pr_err("dev = %p ", iommu_cb_set.cb_info[i].dev);
|
||||
pr_err("dev = %pK ", iommu_cb_set.cb_info[i].dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,17 +159,17 @@ static void cam_smmu_check_vaddr_in_range(int idx, void *vaddr)
|
|||
end_addr = (unsigned long)mapping->paddr + mapping->len;
|
||||
|
||||
if (start_addr <= current_addr && current_addr <= end_addr) {
|
||||
pr_err("Error: vaddr %p is valid: range:%p-%p, ion_fd = %d\n",
|
||||
pr_err("Error: vaddr %pK is valid: range:%pK-%pK, ion_fd = %d\n",
|
||||
vaddr, (void *)start_addr, (void *)end_addr,
|
||||
mapping->ion_fd);
|
||||
return;
|
||||
} else {
|
||||
pr_err("vaddr %p is not in this range: %p-%p, ion_fd = %d\n",
|
||||
pr_err("vaddr %pK is not in this range: %pK-%pK, ion_fd = %d\n",
|
||||
vaddr, (void *)start_addr, (void *)end_addr,
|
||||
mapping->ion_fd);
|
||||
}
|
||||
}
|
||||
pr_err("Cannot find vaddr:%p in SMMU. %s uses invalid virtual addreess\n",
|
||||
pr_err("Cannot find vaddr:%pK in SMMU. %s uses invalid virtual addreess\n",
|
||||
vaddr, iommu_cb_set.cb_info[idx].name);
|
||||
return;
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ static int cam_smmu_iommu_fault_handler(struct iommu_domain *domain,
|
|||
if (!strcmp(iommu_cb_set.cb_info[i].name, cb_name)) {
|
||||
mutex_lock(&iommu_cb_set.cb_info[i].lock);
|
||||
if (!(iommu_cb_set.cb_info[i].fault_handler)) {
|
||||
pr_err("Error: %s: %p has page fault\n",
|
||||
pr_err("Error: %s: %pK has page fault\n",
|
||||
(char *)token,
|
||||
(void *)iova);
|
||||
cam_smmu_check_vaddr_in_range(i,
|
||||
|
@ -427,7 +427,7 @@ static void cam_smmu_clean_buffer_list(int idx)
|
|||
|
||||
list_for_each_entry_safe(mapping_info, temp,
|
||||
&iommu_cb_set.cb_info[idx].list_head, list) {
|
||||
CDBG("Free mapping address %p, i = %d, fd = %d\n",
|
||||
CDBG("Free mapping address %pK, i = %d, fd = %d\n",
|
||||
(void *)mapping_info->paddr, idx,
|
||||
mapping_info->ion_fd);
|
||||
ret = cam_smmu_unmap_buf_and_remove_from_list(mapping_info,
|
||||
|
@ -524,11 +524,11 @@ static int cam_smmu_map_buffer_and_add_to_list(int idx, int ion_fd,
|
|||
pr_err("Error: dma_map_sg failed\n");
|
||||
goto err_unmap_sg;
|
||||
}
|
||||
CDBG("DMA buf: %p, device: %p, attach: %p, table: %p\n",
|
||||
CDBG("DMA buf: %pK, device: %pK, attach: %pK, table: %pK\n",
|
||||
(void *)buf,
|
||||
(void *)iommu_cb_set.cb_info[idx].dev,
|
||||
(void *)attach, (void *)table);
|
||||
CDBG("table sgl: %p, rc: %d, dma_address: 0x%x\n",
|
||||
CDBG("table sgl: %pK, rc: %d, dma_address: 0x%x\n",
|
||||
(void *)table->sgl, rc,
|
||||
(unsigned int)table->sgl->dma_address);
|
||||
} else {
|
||||
|
@ -562,7 +562,7 @@ static int cam_smmu_map_buffer_and_add_to_list(int idx, int ion_fd,
|
|||
rc = -ENOSPC;
|
||||
goto err_unmap_sg;
|
||||
}
|
||||
CDBG("ion_fd = %d, dev = %p, paddr= %p, len = %u\n", ion_fd,
|
||||
CDBG("ion_fd = %d, dev = %pK, paddr= %pK, len = %u\n", ion_fd,
|
||||
(void *)iommu_cb_set.cb_info[idx].dev,
|
||||
(void *)*paddr_ptr, (unsigned int)*len_ptr);
|
||||
|
||||
|
@ -586,10 +586,10 @@ static int cam_smmu_unmap_buf_and_remove_from_list(
|
|||
{
|
||||
if ((!mapping_info->buf) || (!mapping_info->table) ||
|
||||
(!mapping_info->attach)) {
|
||||
pr_err("Error: Invalid params dev = %p, table = %p",
|
||||
pr_err("Error: Invalid params dev = %pK, table = %pK",
|
||||
(void *)iommu_cb_set.cb_info[idx].dev,
|
||||
(void *)mapping_info->table);
|
||||
pr_err("Error:dma_buf = %p, attach = %p\n",
|
||||
pr_err("Error:dma_buf = %pK, attach = %pK\n",
|
||||
(void *)mapping_info->buf,
|
||||
(void *)mapping_info->attach);
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue