FPII-2530 : Information disclosure vulnerability in Qualcomm components CVE-2016-6748 A-30076504
Hide kernel pointers from unprivileged ussers by using %pK format- specifier instead of %p.
This respects the kptr_restrict sysctl setting which is by default on.
So by default %pK will print zeroes as address. echo 1 to kptr_restrict to print proper kernel addresses.
Change-Id: Iab4eff1a2583a2824d7745d1265d02fa8fd7d315
diff --git a/drivers/media/platform/msm/vidc/hfi_packetization.c b/drivers/media/platform/msm/vidc/hfi_packetization.c
index 0e38b18..e948d52 100644
--- a/drivers/media/platform/msm/vidc/hfi_packetization.c
+++ b/drivers/media/platform/msm/vidc/hfi_packetization.c
@@ -1561,7 +1561,7 @@
struct hfi_cmd_sys_test_ssr_packet *pkt)
{
if (!pkt) {
- dprintk(VIDC_ERR, "Invalid params, device: %p\n", pkt);
+ dprintk(VIDC_ERR, "Invalid params, device: %pK\n", pkt);
return -EINVAL;
}
pkt->size = sizeof(struct hfi_cmd_sys_test_ssr_packet);
@@ -1574,7 +1574,7 @@
struct hfi_cmd_sys_get_property_packet *pkt)
{
if (!pkt) {
- dprintk(VIDC_ERR, "%s invalid param :%p\n", __func__, pkt);
+ dprintk(VIDC_ERR, "%s invalid param :%pK\n", __func__, pkt);
return -EINVAL;
}
pkt->size = sizeof(struct hfi_cmd_sys_get_property_packet);
diff --git a/drivers/media/platform/msm/vidc/hfi_response_handler.c b/drivers/media/platform/msm/vidc/hfi_response_handler.c
index 032cca4..9afebbf 100644
--- a/drivers/media/platform/msm/vidc/hfi_response_handler.c
+++ b/drivers/media/platform/msm/vidc/hfi_response_handler.c
@@ -659,7 +659,7 @@
dprintk(VIDC_DBG, "Entered ");
if (!prop) {
dprintk(VIDC_ERR,
- "hal_process_sess_get_prop_buf_req:bad_prop: %p",
+ "hal_process_sess_get_prop_buf_req:bad_prop: %pK\n",
prop);
return;
}
@@ -837,7 +837,7 @@
sess_close = (struct hal_session *)pkt->session_id;
if (sess_close) {
dprintk(VIDC_WARN,
- "Sess init failed: 0x%x, 0x%p",
+ "Sess init failed: 0x%x, 0x%pK\n",
sess_close->session_id, sess_close);
}
}
diff --git a/drivers/media/platform/msm/vidc/msm_smem.c b/drivers/media/platform/msm/vidc/msm_smem.c
index 9604a09..fb1ffe1 100644
--- a/drivers/media/platform/msm/vidc/msm_smem.c
+++ b/drivers/media/platform/msm/vidc/msm_smem.c
@@ -54,7 +54,7 @@
struct ion_client *clnt = NULL;
if (!iova || !buffer_size || !hndl || !smem_client) {
- dprintk(VIDC_ERR, "Invalid params: %p, %p, %p, %p\n",
+ dprintk(VIDC_ERR, "Invalid params: %pK, %pK, %pK, %pK\n",
smem_client, hndl, iova, buffer_size);
return -EINVAL;
}
@@ -109,7 +109,7 @@
struct ion_client *clnt = NULL;
if (!hndl || !smem_client) {
- dprintk(VIDC_WARN, "Invalid params: %p, %p\n",
+ dprintk(VIDC_WARN, "Invalid params: %pK, %pK\n",
smem_client, hndl);
return;
}
@@ -143,7 +143,7 @@
hndl = ion_import_dma_buf(client->clnt, fd);
if (IS_ERR_OR_NULL(hndl)) {
- dprintk(VIDC_ERR, "Failed to get handle: %p, %d, %d, %p\n",
+ dprintk(VIDC_ERR, "Failed to get handle: %pK, %d, %d, %pK\n",
client, fd, offset, hndl);
rc = -ENOMEM;
goto fail_import_fd;
@@ -172,7 +172,7 @@
mem->device_addr = iova;
mem->size = buffer_size;
dprintk(VIDC_DBG,
- "%s: ion_handle = 0x%p, fd = %d, device_addr = 0x%x, size = %d, kvaddr = 0x%p, buffer_type = %d\n",
+ "%s: ion_handle = 0x%pK, fd = %d, device_addr = 0x%x, size = %d, kvaddr = 0x%pK, buffer_type = %d\n",
__func__, mem->smem_priv, fd, (u32)mem->device_addr,
mem->size, mem->kvaddr, mem->buffer_type);
return rc;
@@ -215,7 +215,7 @@
hndl = ion_alloc(client->clnt, size, align, heap_mask, flags);
if (IS_ERR_OR_NULL(hndl)) {
dprintk(VIDC_ERR,
- "Failed to allocate shared memory = %p, %d, %d, 0x%x\n",
+ "Failed to allocate shared memory = %pK, %d, %d, 0x%x\n",
client, size, align, flags);
rc = -ENOMEM;
goto fail_shared_mem_alloc;
@@ -245,7 +245,7 @@
mem->device_addr = iova;
mem->size = size;
dprintk(VIDC_DBG,
- "%s: ion_handle = 0x%p, device_addr = 0x%x, size = %d, kvaddr = 0x%p, buffer_type = %d\n",
+ "%s: ion_handle = 0x%pK, device_addr = 0x%x, size = %d, kvaddr = 0x%pK, buffer_type = %d\n",
__func__, mem->smem_priv, (u32)mem->device_addr,
mem->size, mem->kvaddr, mem->buffer_type);
return rc;
@@ -262,7 +262,7 @@
int domain, partition, rc;
dprintk(VIDC_DBG,
- "%s: ion_handle = 0x%p, device_addr = 0x%x, size = %d, kvaddr = 0x%p, buffer_type = %d\n",
+ "%s: ion_handle = 0x%pK, device_addr = 0x%x, size = %d, kvaddr = 0x%pK, buffer_type = %d\n",
__func__, mem->smem_priv, (u32)mem->device_addr,
mem->size, mem->kvaddr, mem->buffer_type);
rc = msm_smem_get_domain_partition((void *)client, mem->flags,
@@ -334,7 +334,7 @@
int rc = 0;
int msm_cache_ops = 0;
if (!mem || !client) {
- dprintk(VIDC_ERR, "Invalid params: %p, %p\n",
+ dprintk(VIDC_ERR, "Invalid params: %pK, %pK\n",
mem, client);
return -EINVAL;
}
@@ -381,7 +381,7 @@
struct smem_client *client = clt;
int rc = 0;
if (!client) {
- dprintk(VIDC_ERR, "Invalid params: %p\n",
+ dprintk(VIDC_ERR, "Invalid params: %pK\n",
client);
return -EINVAL;
}
diff --git a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
index 5801518..ccf2875 100644
--- a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
@@ -285,7 +285,7 @@
struct platform_device *pdev)
{
if (!core || !pdev) {
- dprintk(VIDC_ERR, "%s: Invalid params %p %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid params %pK %pK\n",
__func__, core, pdev);
return -EINVAL;
}
@@ -516,7 +516,7 @@
struct msm_vidc_core *core;
if (!pdev) {
- dprintk(VIDC_ERR, "%s invalid input %p", __func__, pdev);
+ dprintk(VIDC_ERR, "%s invalid input %pK", __func__, pdev);
return -EINVAL;
}
core = pdev->dev.platform_data;
diff --git a/drivers/media/platform/msm/vidc/msm_vdec.c b/drivers/media/platform/msm/vidc/msm_vdec.c
index 8fcb7f5..79205da 100644
--- a/drivers/media/platform/msm/vidc/msm_vdec.c
+++ b/drivers/media/platform/msm/vidc/msm_vdec.c
@@ -530,7 +530,7 @@
if (inst->state == MSM_VIDC_CORE_INVALID ||
inst->core->state == VIDC_CORE_INVALID) {
dprintk(VIDC_ERR,
- "Core %p in bad state, ignoring prepare buf\n",
+ "Core %pK in bad state, ignoring prepare buf\n",
inst->core);
goto exit;
}
@@ -608,7 +608,7 @@
if (inst->state == MSM_VIDC_CORE_INVALID ||
core->state == VIDC_CORE_INVALID) {
dprintk(VIDC_ERR,
- "Core %p in bad state, ignoring release output buf\n",
+ "Core %pK in bad state, ignoring release output buf\n",
core);
goto exit;
}
@@ -701,7 +701,7 @@
int rc = 0;
if (!inst || !b) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, buffer = %p\n", inst, b);
+ "Invalid input, inst = %pK, buffer = %pK\n", inst, b);
return -EINVAL;
}
q = msm_comm_get_vb2q(inst, b->type);
@@ -732,7 +732,7 @@
if (!inst || !f || !inst->core || !inst->core->device) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, format = %p\n", inst, f);
+ "Invalid input, inst = %pK, format = %pK\n", inst, f);
return -EINVAL;
}
@@ -918,7 +918,7 @@
fps = fps - 1;
if (inst->prop.fps != fps) {
- dprintk(VIDC_PROF, "reported fps changed for %p: %d->%d\n",
+ dprintk(VIDC_PROF, "reported fps changed for %pK: %d->%d\n",
inst, inst->prop.fps, fps);
inst->prop.fps = fps;
@@ -940,7 +940,7 @@
if (!inst || !f) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, format = %p\n", inst, f);
+ "Invalid input, inst = %pK, format = %pK\n", inst, f);
return -EINVAL;
}
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
@@ -1081,7 +1081,7 @@
{
if (!inst || !cap) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, cap = %p\n", inst, cap);
+ "Invalid input, inst = %pK, cap = %pK\n", inst, cap);
return -EINVAL;
}
strlcpy(cap->driver, MSM_VIDC_DRV_NAME, sizeof(cap->driver));
@@ -1101,7 +1101,7 @@
int rc = 0;
if (!inst || !f) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, f = %p\n", inst, f);
+ "Invalid input, inst = %pK, f = %pK\n", inst, f);
return -EINVAL;
}
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
@@ -1140,7 +1140,7 @@
enum hal_property property_id;
if (!q || !num_buffers || !num_planes
|| !sizes || !q->drv_priv) {
- dprintk(VIDC_ERR, "Invalid input, q = %p, %p, %p\n",
+ dprintk(VIDC_ERR, "Invalid input, q = %pK, %pK, %pK\n",
q, num_buffers, num_planes);
return -EINVAL;
}
@@ -1277,7 +1277,7 @@
rc = msm_comm_try_state(inst, MSM_VIDC_START_DONE);
if (rc) {
dprintk(VIDC_ERR,
- "Failed to move inst: %p to start done state\n", inst);
+ "Failed to move inst: %pK to start done state\n", inst);
goto fail_start;
}
if (msm_comm_get_stream_output_mode(inst) ==
@@ -1315,7 +1315,7 @@
rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
if (rc)
dprintk(VIDC_ERR,
- "Failed to move inst: %p to start done state\n", inst);
+ "Failed to move inst: %pK to start done state\n", inst);
return rc;
}
@@ -1325,7 +1325,7 @@
int rc = 0;
struct hfi_device *hdev;
if (!q || !q->drv_priv) {
- dprintk(VIDC_ERR, "Invalid input, q = %p\n", q);
+ dprintk(VIDC_ERR, "Invalid input, q = %pK\n", q);
return -EINVAL;
}
inst = q->drv_priv;
@@ -1358,7 +1358,7 @@
struct msm_vidc_inst *inst;
int rc = 0;
if (!q || !q->drv_priv) {
- dprintk(VIDC_ERR, "Invalid input, q = %p\n", q);
+ dprintk(VIDC_ERR, "Invalid input, q = %pK\n", q);
return -EINVAL;
}
inst = q->drv_priv;
@@ -1383,7 +1383,7 @@
if (rc)
dprintk(VIDC_ERR,
- "Failed to move inst: %p, cap = %d to state: %d\n",
+ "Failed to move inst: %pK, cap = %d to state: %d\n",
inst, q->type, MSM_VIDC_RELEASE_RESOURCES_DONE);
return rc;
}
@@ -1440,7 +1440,7 @@
if (inst->state == MSM_VIDC_CORE_INVALID ||
core->state == VIDC_CORE_INVALID) {
dprintk(VIDC_ERR,
- "Core %p in bad state, Sending CLOSE event\n",
+ "Core %pK in bad state, Sending CLOSE event\n",
core);
msm_vidc_queue_v4l2_event(inst,
V4L2_EVENT_MSM_VIDC_CLOSE_DONE);
@@ -1482,7 +1482,7 @@
{
int rc = 0;
if (!inst) {
- dprintk(VIDC_ERR, "Invalid input = %p\n", inst);
+ dprintk(VIDC_ERR, "Invalid input = %pK\n", inst);
return -EINVAL;
}
inst->fmts[OUTPUT_PORT] = &vdec_formats[1];
@@ -1779,7 +1779,7 @@
rc = msm_comm_try_state(inst, MSM_VIDC_OPEN_DONE);
if (rc) {
dprintk(VIDC_ERR,
- "Failed to move inst: %p to start done state\n", inst);
+ "Failed to move inst: %pK to start done state\n", inst);
goto failed_open_done;
}
diff --git a/drivers/media/platform/msm/vidc/msm_venc.c b/drivers/media/platform/msm/vidc/msm_venc.c
index d439e8b..c24b5134 100644
--- a/drivers/media/platform/msm/vidc/msm_venc.c
+++ b/drivers/media/platform/msm/vidc/msm_venc.c
@@ -1078,7 +1078,7 @@
rc = msm_comm_try_state(inst, MSM_VIDC_START_DONE);
if (rc) {
dprintk(VIDC_ERR,
- "Failed to move inst: %p to start done state\n", inst);
+ "Failed to move inst: %pK to start done state\n", inst);
goto fail_start;
}
mutex_lock(&inst->sync_lock);
@@ -1106,7 +1106,7 @@
struct msm_vidc_inst *inst;
int rc = 0;
if (!q || !q->drv_priv) {
- dprintk(VIDC_ERR, "Invalid input, q = %p\n", q);
+ dprintk(VIDC_ERR, "Invalid input, q = %pK\n", q);
return -EINVAL;
}
inst = q->drv_priv;
@@ -1133,7 +1133,7 @@
struct msm_vidc_inst *inst;
int rc = 0;
if (!q || !q->drv_priv) {
- dprintk(VIDC_ERR, "Invalid input, q = %p\n", q);
+ dprintk(VIDC_ERR, "Invalid input, q = %pK\n", q);
return -EINVAL;
}
inst = q->drv_priv;
@@ -1154,7 +1154,7 @@
if (rc)
dprintk(VIDC_ERR,
- "Failed to move inst: %p, cap = %d to state: %d\n",
+ "Failed to move inst: %pK, cap = %d to state: %d\n",
inst, q->type, MSM_VIDC_CLOSE_DONE);
return rc;
}
@@ -2328,7 +2328,7 @@
if (rc) {
dprintk(VIDC_ERR,
- "Failed to move inst: %p to start done state\n", inst);
+ "Failed to move inst: %pK to start done state\n", inst);
goto failed_open_done;
}
@@ -2371,7 +2371,7 @@
{
int rc = 0;
if (!inst) {
- dprintk(VIDC_ERR, "Invalid input = %p\n", inst);
+ dprintk(VIDC_ERR, "Invalid input = %pK\n", inst);
return -EINVAL;
}
inst->fmts[CAPTURE_PORT] = &venc_formats[1];
@@ -2453,7 +2453,7 @@
{
if (!inst || !cap) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, cap = %p\n", inst, cap);
+ "Invalid input, inst = %pK, cap = %pK\n", inst, cap);
return -EINVAL;
}
strlcpy(cap->driver, MSM_VIDC_DRV_NAME, sizeof(cap->driver));
@@ -2473,7 +2473,7 @@
int rc = 0;
if (!inst || !f) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, f = %p\n", inst, f);
+ "Invalid input, inst = %pK, f = %pK\n", inst, f);
return -EINVAL;
}
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
@@ -2546,7 +2546,7 @@
fps = fps - 1;
if (inst->prop.fps != fps) {
- dprintk(VIDC_PROF, "reported fps changed for %p: %d->%d\n",
+ dprintk(VIDC_PROF, "reported fps changed for %pK: %d->%d\n",
inst, inst->prop.fps, fps);
inst->prop.fps = fps;
frame_rate.frame_rate = inst->prop.fps * (0x1<<16);
@@ -2573,7 +2573,7 @@
struct hfi_device *hdev;
if (!inst || !f) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, format = %p\n", inst, f);
+ "Invalid input, inst = %pK, format = %pK\n", inst, f);
return -EINVAL;
}
@@ -2707,7 +2707,7 @@
struct hal_buffer_requirements *buff_req_buffer;
if (!inst || !f) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, format = %p\n", inst, f);
+ "Invalid input, inst = %pK, format = %pK\n", inst, f);
return -EINVAL;
}
@@ -2772,7 +2772,7 @@
int rc = 0;
if (!inst || !b) {
dprintk(VIDC_ERR,
- "Invalid input, inst = %p, buffer = %p\n", inst, b);
+ "Invalid input, inst = %pK, buffer = %pK\n", inst, b);
return -EINVAL;
}
q = msm_comm_get_vb2q(inst, b->type);
@@ -2809,7 +2809,7 @@
if (inst->state == MSM_VIDC_CORE_INVALID ||
inst->core->state == VIDC_CORE_INVALID) {
dprintk(VIDC_ERR,
- "Core %p in bad state, ignoring prepare buf\n",
+ "Core %pK in bad state, ignoring prepare buf\n",
inst->core);
goto exit;
}
@@ -2880,7 +2880,7 @@
rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
if (rc) {
dprintk(VIDC_ERR,
- "Failed to move inst: %p to release res done state\n",
+ "Failed to move inst: %pK to release res done state\n",
inst);
goto exit;
}
diff --git a/drivers/media/platform/msm/vidc/msm_vidc.c b/drivers/media/platform/msm/vidc/msm_vidc.c
index b8b1db1..4f0ca4c 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc.c
@@ -307,7 +307,7 @@
int i;
if (!list || !device_addr || !inst) {
dprintk(VIDC_ERR,
- "Invalid input- list: %p device_addr: %u inst: %p\n",
+ "Invalid input- list: %pK device_addr: %u inst: %pK\n",
list, device_addr, inst);
goto err_invalid_input;
}
@@ -461,7 +461,7 @@
goto exit;
}
- dprintk(VIDC_DBG, "[MAP] Create binfo = %p fd = %d type = %d\n",
+ dprintk(VIDC_DBG, "[MAP] Create binfo = %pK fd = %d type = %d\n",
binfo, b->m.planes[0].reserved[0], b->type);
for (i = 0; i < b->length; ++i) {
@@ -537,7 +537,7 @@
goto exit;
}
dprintk(VIDC_DBG,
- "%s: [MAP] binfo = %p, handle[%d] = %p, device_addr = 0x%x, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [MAP] binfo = %pK, handle[%d] = %pK, device_addr = 0x%x, fd = %d, offset = %d, mapped = %d\n",
__func__, binfo, i, binfo->handle[i],
binfo->device_addr[i], binfo->fd[i],
binfo->buff_off[i], binfo->mapped[i]);
@@ -560,7 +560,7 @@
bool found = false, keep_node = false;
if (!inst || !binfo) {
- dprintk(VIDC_ERR, "%s invalid param: %p %p\n",
+ dprintk(VIDC_ERR, "%s invalid param: %pK %pK\n",
__func__, inst, binfo);
return -EINVAL;
}
@@ -589,7 +589,7 @@
for (i = 0; i < temp->num_planes; i++) {
dprintk(VIDC_DBG,
- "%s: [UNMAP] binfo = %p, handle[%d] = %p, device_addr = 0x%x, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [UNMAP] binfo = %pK, handle[%d] = %pK, device_addr = 0x%x, fd = %d, offset = %d, mapped = %d\n",
__func__, temp, i, temp->handle[i],
temp->device_addr[i], temp->fd[i],
temp->buff_off[i], temp->mapped[i]);
@@ -621,12 +621,12 @@
}
}
if (!keep_node) {
- dprintk(VIDC_DBG, "[UNMAP] AND-FREED binfo: %p\n", temp);
+ dprintk(VIDC_DBG, "[UNMAP] AND-FREED binfo: %pK\n", temp);
list_del(&temp->list);
kfree(temp);
} else {
temp->inactive = true;
- dprintk(VIDC_DBG, "[UNMAP] NOT-FREED binfo: %p\n", temp);
+ dprintk(VIDC_DBG, "[UNMAP] NOT-FREED binfo: %pK\n", temp);
}
exit:
mutex_unlock(&inst->lock);
@@ -641,7 +641,7 @@
struct v4l2_plane plane[VIDEO_MAX_PLANES] = { {0} };
if (!binfo) {
- dprintk(VIDC_ERR, "%s invalid param: %p\n", __func__, binfo);
+ dprintk(VIDC_ERR, "%s invalid param: %pK\n", __func__, binfo);
return -EINVAL;
}
dprintk(VIDC_DBG, "%s fd[0] = %d\n", __func__, binfo->fd[0]);
@@ -664,7 +664,7 @@
int rc = 0;
if (!inst) {
- dprintk(VIDC_ERR, "%s: invalid inst: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s: invalid inst: %pK\n", __func__, inst);
return -EINVAL;
}
@@ -672,7 +672,7 @@
return 0;
if (!binfo) {
- dprintk(VIDC_ERR, "%s: invalid buffer info: %p\n",
+ dprintk(VIDC_ERR, "%s: invalid buffer info: %pK\n",
__func__, inst);
return -EINVAL;
}
@@ -753,7 +753,7 @@
rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
if (rc) {
dprintk(VIDC_ERR,
- "Failed to move inst: %p to release res done\n",
+ "Failed to move inst: %pK to release res done\n",
inst);
}
}
@@ -1034,7 +1034,7 @@
struct msm_vidc_core_capability *capability = NULL;
if (!inst || !fsize) {
- dprintk(VIDC_ERR, "%s: invalid parameter: %p %p\n",
+ dprintk(VIDC_ERR, "%s: invalid parameter: %pK %pK\n",
__func__, inst, fsize);
return -EINVAL;
}
@@ -1095,7 +1095,7 @@
struct msm_vidc_inst *inst = instance;
if (!inst || !inst->mem_client) {
- dprintk(VIDC_ERR, "%s: invalid instance or client = %p %p\n",
+ dprintk(VIDC_ERR, "%s: invalid instance or client = %p %pK\n",
__func__, inst, inst->mem_client);
return NULL;
}
@@ -1216,7 +1216,7 @@
goto err_invalid_core;
}
- pr_info(VIDC_DBG_TAG "Opening video instance: %p, %d\n",
+ pr_info(VIDC_DBG_TAG "Opening video instance: %pK, %d\n",
VIDC_INFO, inst, session_type);
mutex_init(&inst->sync_lock);
mutex_init(&inst->bufq[CAPTURE_PORT].lock);
@@ -1407,7 +1407,7 @@
"Failed to move video instance to uninit state\n");
msm_smem_delete_client(inst->mem_client);
- pr_info(VIDC_DBG_TAG "Closed video instance: %p\n", VIDC_INFO, inst);
+ pr_info(VIDC_DBG_TAG "Closed video instance: %pK\n", VIDC_INFO, inst);
kfree(inst);
return 0;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c
index c0b3531..9ab3f1b 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c
@@ -120,7 +120,7 @@
struct msm_vidc_inst *inst = NULL;
int num_mbs_per_sec = 0;
if (!core) {
- dprintk(VIDC_ERR, "Invalid args: %p\n", core);
+ dprintk(VIDC_ERR, "Invalid args: %pK\n", core);
return -EINVAL;
}
mutex_lock(&core->lock);
@@ -224,7 +224,7 @@
{
int i, k = 0;
if (!fmt || index < 0) {
- dprintk(VIDC_ERR, "Invalid inputs, fmt = %p, index = %d\n",
+ dprintk(VIDC_ERR, "Invalid inputs, fmt = %pK, index = %d\n",
fmt, index);
return NULL;
}
@@ -246,7 +246,7 @@
{
int i;
if (!fmt) {
- dprintk(VIDC_ERR, "Invalid inputs, fmt = %p\n", fmt);
+ dprintk(VIDC_ERR, "Invalid inputs, fmt = %pK\n", fmt);
return NULL;
}
for (i = 0; i < size; i++) {
@@ -369,11 +369,11 @@
mutex_lock(&inst->lock);
if (inst->state == MSM_VIDC_CORE_INVALID) {
dprintk(VIDC_DBG,
- "Inst: %p is in bad state can't change state to %d\n",
+ "Inst: %pK is in bad state can't change state to %d\n",
inst, state);
goto exit;
}
- dprintk(VIDC_DBG, "Moved inst: %p from state: %d to state: %d\n",
+ dprintk(VIDC_DBG, "Moved inst: %pK from state: %d to state: %d\n",
inst, inst->state, state);
inst->state = state;
exit:
@@ -384,7 +384,7 @@
struct msm_vidc_inst *inst)
{
if (!inst) {
- dprintk(VIDC_ERR, "Invalid(%p) instance id\n", inst);
+ dprintk(VIDC_ERR, "Invalid(%pK) instance id\n", inst);
return -EINVAL;
}
complete(&inst->completions[SESSION_MSG_INDEX(cmd)]);
@@ -417,7 +417,7 @@
{
int rc = 0;
if (IS_ALREADY_IN_STATE(flipped_state, desired_state)) {
- dprintk(VIDC_INFO, "inst: %p is already in state: %d\n",
+ dprintk(VIDC_INFO, "inst: %pK is already in state: %d\n",
inst, inst->state);
goto err_same_state;
}
@@ -535,7 +535,7 @@
u32 *ptr = NULL;
dprintk(VIDC_DBG,
- "%s - inst: %p buffer: %p extra: %p\n",
+ "%s - inst: %pK buffer: %p extra: %p\n",
__func__, inst,
event_notify->packet_buffer,
event_notify->exra_data_buffer);
@@ -838,24 +838,24 @@
if (!inst || !inst->session || !inst->core->device) {
dprintk(VIDC_ERR,
- "Session (%p) not in a stable enough state to handle session error\n",
+ "Session (%pK) not in a stable enough state to handle session error\n",
inst);
return;
}
hdev = inst->core->device;
- dprintk(VIDC_WARN, "Session error received for session %p\n", inst);
+ dprintk(VIDC_WARN, "Session error received for session %pK\n", inst);
change_inst_state(inst, MSM_VIDC_CORE_INVALID);
if (response->status == VIDC_ERR_MAX_CLIENTS) {
dprintk(VIDC_WARN,
- "send max clients reached error to client: %p\n",
+ "send max clients reached error to client: %pK\n",
inst);
msm_vidc_queue_v4l2_event(inst,
V4L2_EVENT_MSM_VIDC_MAX_CLIENTS);
} else {
dprintk(VIDC_ERR,
- "send session error to client: %p\n",
+ "send session error to client: %pK\n",
inst);
msm_vidc_queue_v4l2_event(inst,
V4L2_EVENT_MSM_VIDC_SYS_ERROR);
@@ -933,7 +933,7 @@
return;
}
- dprintk(VIDC_WARN, "SYS_ERROR %d received for core %p\n", cmd, core);
+ dprintk(VIDC_WARN, "SYS_ERROR %d received for core %pK\n", cmd, core);
mutex_lock(&core->lock);
core->state = VIDC_CORE_INVALID;
@@ -1368,7 +1368,7 @@
if (extra_idx && (extra_idx < VIDEO_MAX_PLANES)) {
dprintk(VIDC_DBG,
- "extradata: userptr = %p; bytesused = %d; length = %d\n",
+ "extradata: userptr = %pK; bytesused = %d; length = %d\n",
(u8 *)vb->v4l2_planes[extra_idx].m.userptr,
vb->v4l2_planes[extra_idx].bytesused,
vb->v4l2_planes[extra_idx].length);
@@ -1806,7 +1806,7 @@
hdev = inst->core->device;
if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_OPEN)) {
- dprintk(VIDC_INFO, "inst: %p is already in state: %d\n",
+ dprintk(VIDC_INFO, "inst: %pK is already in state: %d\n",
inst, inst->state);
goto exit;
}
@@ -1898,7 +1898,7 @@
hdev = inst->core->device;
if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_LOAD_RESOURCES)) {
- dprintk(VIDC_INFO, "inst: %p is already in state: %d\n",
+ dprintk(VIDC_INFO, "inst: %pK is already in state: %d\n",
inst, inst->state);
goto exit;
}
@@ -1934,7 +1934,7 @@
if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_START)) {
dprintk(VIDC_INFO,
- "inst: %p is already in state: %d\n",
+ "inst: %pK is already in state: %d\n",
inst, inst->state);
goto exit;
}
@@ -1964,7 +1964,7 @@
if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_STOP)) {
dprintk(VIDC_INFO,
- "inst: %p is already in state: %d\n",
+ "inst: %pK is already in state: %d\n",
inst, inst->state);
goto exit;
}
@@ -1994,7 +1994,7 @@
if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_RELEASE_RESOURCES)) {
dprintk(VIDC_INFO,
- "inst: %p is already in state: %d\n",
+ "inst: %pK is already in state: %d\n",
inst, inst->state);
goto exit;
}
@@ -2026,7 +2026,7 @@
hdev = inst->core->device;
if (IS_ALREADY_IN_STATE(flipped_state, MSM_VIDC_CLOSE)) {
dprintk(VIDC_INFO,
- "inst: %p is already in state: %d\n",
+ "inst: %pK is already in state: %d\n",
inst, inst->state);
goto exit;
}
@@ -2387,16 +2387,16 @@
struct msm_vidc_core *core;
if (!inst) {
dprintk(VIDC_ERR,
- "Invalid instance pointer = %p\n", inst);
+ "Invalid instance pointer = %pK\n", inst);
return -EINVAL;
}
dprintk(VIDC_DBG,
- "Trying to move inst: %p from: 0x%x to 0x%x\n",
+ "Trying to move inst: %pK from: 0x%x to 0x%x\n",
inst, inst->state, state);
core = inst->core;
if (!core) {
dprintk(VIDC_ERR,
- "Invalid core pointer = %p\n", inst);
+ "Invalid core pointer = %pK\n", inst);
return -EINVAL;
}
mutex_lock(&inst->sync_lock);
@@ -2515,18 +2515,18 @@
q = vb->vb2_queue;
inst = q->drv_priv;
if (!inst || !vb) {
- dprintk(VIDC_ERR, "Invalid input: %p, %p\n", inst, vb);
+ dprintk(VIDC_ERR, "Invalid input: %p, %pK\n", inst, vb);
return -EINVAL;
}
core = inst->core;
if (!core) {
dprintk(VIDC_ERR,
- "Invalid input: %p, %p, %p\n", inst, core, vb);
+ "Invalid input: %pK, %pK, %pK\n", inst, core, vb);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "Invalid input: %p", hdev);
+ dprintk(VIDC_ERR, "Invalid input: %pK", hdev);
return -EINVAL;
}
@@ -2712,18 +2712,18 @@
struct hfi_device *hdev;
if (!inst) {
dprintk(VIDC_ERR,
- "Invalid instance pointer = %p\n", inst);
+ "Invalid instance pointer = %pK\n", inst);
return -EINVAL;
}
core = inst->core;
if (!core) {
dprintk(VIDC_ERR,
- "Invalid core pointer = %p\n", core);
+ "Invalid core pointer = %pK\n", core);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "Invalid device pointer = %p\n", hdev);
+ dprintk(VIDC_ERR, "Invalid device pointer = %pK\n", hdev);
return -EINVAL;
}
mutex_lock(&inst->lock);
@@ -2769,18 +2769,18 @@
struct hfi_device *hdev;
if (!inst) {
dprintk(VIDC_ERR,
- "Invalid instance pointer = %p\n", inst);
+ "Invalid instance pointer = %pK\n", inst);
return -EINVAL;
}
core = inst->core;
if (!core) {
dprintk(VIDC_ERR,
- "Invalid core pointer = %p\n", core);
+ "Invalid core pointer = %pK\n", core);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "Invalid device pointer = %p\n", hdev);
+ dprintk(VIDC_ERR, "Invalid device pointer = %pK\n", hdev);
return -EINVAL;
}
mutex_lock(&inst->lock);
@@ -2838,18 +2838,18 @@
struct hfi_device *hdev;
if (!inst) {
dprintk(VIDC_ERR,
- "Invalid instance pointer = %p\n", inst);
+ "Invalid instance pointer = %pK\n", inst);
return -EINVAL;
}
core = inst->core;
if (!core) {
dprintk(VIDC_ERR,
- "Invalid core pointer = %p\n", core);
+ "Invalid core pointer = %pK\n", core);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "Invalid device pointer = %p\n", hdev);
+ dprintk(VIDC_ERR, "Invalid device pointer = %pK\n", hdev);
return -EINVAL;
}
mutex_lock(&inst->lock);
@@ -2902,7 +2902,7 @@
int rc = 0;
struct hfi_device *hdev;
if (!inst) {
- dprintk(VIDC_ERR, "Invalid input: %p\n", inst);
+ dprintk(VIDC_ERR, "Invalid input: %pK\n", inst);
return -EINVAL;
}
@@ -3127,7 +3127,7 @@
if (binfo && binfo->type ==
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
dprintk(VIDC_DBG,
- "%s: binfo = %p device_addr = 0x%pa\n",
+ "%s: binfo = %pK device_addr = 0x%pa\n",
__func__, binfo, &binfo->device_addr[0]);
buf_ref_put(inst, binfo);
}
@@ -3146,18 +3146,18 @@
struct hfi_device *hdev;
if (!inst) {
dprintk(VIDC_ERR,
- "Invalid instance pointer = %p\n", inst);
+ "Invalid instance pointer = %pK\n", inst);
return -EINVAL;
}
core = inst->core;
if (!core) {
dprintk(VIDC_ERR,
- "Invalid core pointer = %p\n", core);
+ "Invalid core pointer = %pK\n", core);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "Invalid device pointer = %p", hdev);
+ dprintk(VIDC_ERR, "Invalid device pointer = %pK\n", hdev);
return -EINVAL;
}
@@ -3174,7 +3174,7 @@
if (inst->state == MSM_VIDC_CORE_INVALID ||
core->state == VIDC_CORE_INVALID) {
dprintk(VIDC_ERR,
- "Core %p and inst %p are in bad state\n",
+ "Core %pK and inst %pK are in bad state\n",
core, inst);
msm_comm_flush_in_invalid_state(inst);
return 0;
@@ -3344,7 +3344,7 @@
int rc = 0;
struct hfi_device *hdev;
if (!core || !core->device) {
- dprintk(VIDC_WARN, "Invalid parameters: %p\n", core);
+ dprintk(VIDC_WARN, "Invalid parameters: %pK\n", core);
return -EINVAL;
}
hdev = core->device;
@@ -3571,7 +3571,7 @@
}
} else {
dprintk(VIDC_WARN,
- "Inactive session %p, triggering an internal session error\n",
+ "Inactive session %pK, triggering an internal session error\n",
inst);
msm_comm_generate_session_error(inst);
@@ -3601,7 +3601,7 @@
enum hal_buffer buffer_type, int map_kernel)
{
if (!inst) {
- dprintk(VIDC_ERR, "%s: invalid inst: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s: invalid inst: %pK\n", __func__, inst);
return NULL;
}
if (power_on_for_smem(inst))
@@ -3615,7 +3615,7 @@
{
if (!inst || !mem) {
dprintk(VIDC_ERR,
- "%s: invalid params: %p %p\n", __func__, inst, mem);
+ "%s: invalid params: %pK %pK\n", __func__, inst, mem);
return;
}
if (power_on_for_smem(inst))
@@ -3629,7 +3629,7 @@
{
if (!inst || !mem) {
dprintk(VIDC_ERR,
- "%s: invalid params: %p %p\n", __func__, inst, mem);
+ "%s: invalid params: %pK %pK\n", __func__, inst, mem);
return -EINVAL;
}
return msm_smem_cache_operations(inst->mem_client, mem, cache_ops);
@@ -3639,7 +3639,7 @@
int fd, u32 offset, enum hal_buffer buffer_type)
{
if (!inst) {
- dprintk(VIDC_ERR, "%s: invalid inst: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s: invalid inst: %pK\n", __func__, inst);
return NULL;
}
if (power_on_for_smem(inst))
@@ -3654,7 +3654,7 @@
int *domain_num, int *partition_num)
{
if (!inst || !domain_num || !partition_num) {
- dprintk(VIDC_ERR, "%s: invalid params: %p %p %p\n",
+ dprintk(VIDC_ERR, "%s: invalid params: %pK %pK %pK\n",
__func__, inst, domain_num, partition_num);
return -EINVAL;
}
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_debug.c b/drivers/media/platform/msm/vidc/msm_vidc_debug.c
index ee91513..b69df41 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_debug.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_debug.c
@@ -65,13 +65,13 @@
struct hfi_device *hdev;
int i = 0;
if (!core || !core->device) {
- dprintk(VIDC_ERR, "Invalid params, core: %p\n", core);
+ dprintk(VIDC_ERR, "Invalid params, core: %pK\n", core);
return 0;
}
hdev = core->device;
INIT_DBG_BUF(dbg_buf);
write_str(&dbg_buf, "===============================\n");
- write_str(&dbg_buf, "CORE %d: 0x%p\n", core->id, core);
+ write_str(&dbg_buf, "CORE %d: 0x%pK\n", core->id, core);
write_str(&dbg_buf, "===============================\n");
write_str(&dbg_buf, "state: %d\n", core->state);
write_str(&dbg_buf, "base addr: 0x%x\n",
@@ -145,7 +145,7 @@
struct dentry *dir = NULL;
char debugfs_name[MAX_DEBUGFS_NAME];
if (!core) {
- dprintk(VIDC_ERR, "Invalid params, core: %p\n", core);
+ dprintk(VIDC_ERR, "Invalid params, core: %pK\n", core);
goto failed_create_dir;
}
@@ -247,15 +247,15 @@
struct msm_vidc_inst *inst = file->private_data;
int i, j;
if (!inst) {
- dprintk(VIDC_ERR, "Invalid params, core: %p\n", inst);
+ dprintk(VIDC_ERR, "Invalid params, core: %pK\n", inst);
return 0;
}
INIT_DBG_BUF(dbg_buf);
write_str(&dbg_buf, "===============================\n");
- write_str(&dbg_buf, "INSTANCE: 0x%p (%s)\n", inst,
+ write_str(&dbg_buf, "INSTANCE: 0x%pK (%s)\n", inst,
inst->session_type == MSM_VIDC_ENCODER ? "Encoder" : "Decoder");
write_str(&dbg_buf, "===============================\n");
- write_str(&dbg_buf, "core: 0x%p\n", inst->core);
+ write_str(&dbg_buf, "core: 0x%pK\n", inst->core);
write_str(&dbg_buf, "height: %d\n", inst->prop.height[CAPTURE_PORT]);
write_str(&dbg_buf, "width: %d\n", inst->prop.width[CAPTURE_PORT]);
write_str(&dbg_buf, "fps: %d\n", inst->prop.fps);
@@ -313,10 +313,10 @@
struct dentry *dir = NULL;
char debugfs_name[MAX_DEBUGFS_NAME];
if (!inst) {
- dprintk(VIDC_ERR, "Invalid params, inst: %p\n", inst);
+ dprintk(VIDC_ERR, "Invalid params, inst: %pK\n", inst);
goto failed_create_dir;
}
- snprintf(debugfs_name, MAX_DEBUGFS_NAME, "inst_%p", inst);
+ snprintf(debugfs_name, MAX_DEBUGFS_NAME, "inst_%pK", inst);
dir = debugfs_create_dir(debugfs_name, parent);
if (!dir) {
dprintk(VIDC_ERR, "Failed to create debugfs for msm_vidc\n");
diff --git a/drivers/media/platform/msm/vidc/q6_hfi.c b/drivers/media/platform/msm/vidc/q6_hfi.c
index 4bc534c..232e88f 100644
--- a/drivers/media/platform/msm/vidc/q6_hfi.c
+++ b/drivers/media/platform/msm/vidc/q6_hfi.c
@@ -200,7 +200,7 @@
struct iommu_info *iommu_map;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK", device);
return -EINVAL;
}
@@ -218,7 +218,7 @@
domain = iommu_group_get_iommudata(iommu_map->group);
if (IS_ERR_OR_NULL(domain)) {
dprintk(VIDC_ERR,
- "Failed to get domain data for group %p",
+ "Failed to get domain data for group %pK",
iommu_map->group);
rc = -EINVAL;
goto fail_group;
@@ -226,7 +226,7 @@
iommu_map->domain = msm_find_domain_no(domain);
if (iommu_map->domain < 0) {
dprintk(VIDC_ERR,
- "Failed to get domain index for domain %p",
+ "Failed to get domain index for domain %pK",
domain);
rc = -EINVAL;
goto fail_group;
@@ -252,7 +252,7 @@
int i = 0;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK", device);
return;
}
@@ -345,7 +345,7 @@
int rc = 0;
if (!callback) {
- dprintk(VIDC_ERR, "%s Invalid params: %p\n",
+ dprintk(VIDC_ERR, "%s Invalid params: %pK\n",
__func__, callback);
return NULL;
}
@@ -1206,7 +1206,7 @@
struct iommu_info *iommu_map;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK", device);
return -EINVAL;
}
@@ -1221,7 +1221,7 @@
rc = IS_ERR(domain) ? PTR_ERR(domain) : -EINVAL;
break;
}
- dprintk(VIDC_DBG, "Attaching domain(id:%d) %p to group %p",
+ dprintk(VIDC_DBG, "Attaching domain(id:%d) %pK to group %pK",
iommu_map->domain, domain, group);
rc = iommu_attach_group(domain, group);
if (rc) {
@@ -1252,7 +1252,7 @@
int i;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK", device);
return;
}
@@ -1380,7 +1380,7 @@
int rc = 0;
if (!hdev || !res || !callback) {
- dprintk(VIDC_ERR, "Invalid params: %p %p %p",
+ dprintk(VIDC_ERR, "Invalid params: %pk %pK %pK",
hdev, res, callback);
rc = -EINVAL;
goto err_hfi_init;
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c
index 2371f3b..d66e218 100644
--- a/drivers/media/platform/msm/vidc/venus_hfi.c
+++ b/drivers/media/platform/msm/vidc/venus_hfi.c
@@ -241,7 +241,7 @@
venus_hfi_sim_modify_cmd_packet(packet);
if (msm_vidc_debug & VIDC_PKT) {
- dprintk(VIDC_PKT, "%s: %p\n", __func__, qinfo);
+ dprintk(VIDC_PKT, "%s: %pK\n", __func__, qinfo);
venus_hfi_dump_packet(packet);
}
@@ -425,7 +425,7 @@
*pb_tx_req_is_set = (1 == queue->qhdr_tx_req) ? 1 : 0;
venus_hfi_hal_sim_modify_msg_packet(packet);
if (msm_vidc_debug & VIDC_PKT) {
- dprintk(VIDC_PKT, "%s: %p\n", __func__, qinfo);
+ dprintk(VIDC_PKT, "%s: %pK\n", __func__, qinfo);
venus_hfi_dump_packet(packet);
}
dprintk(VIDC_DBG, "Out : ");
@@ -456,7 +456,7 @@
rc = -ENOMEM;
goto fail_smem_alloc;
}
- dprintk(VIDC_DBG, "venus_hfi_alloc:ptr=%p,size=%d",
+ dprintk(VIDC_DBG, "venus_hfi_alloc:ptr=%pK,size=%d",
alloc->kvaddr, size);
rc = msm_smem_cache_operations(dev->hal_client, alloc,
SMEM_CACHE_CLEAN);
@@ -476,7 +476,7 @@
static void venus_hfi_free(struct venus_hfi_device *dev, struct msm_smem *mem)
{
if (!dev || !mem) {
- dprintk(VIDC_ERR, "invalid param %p %p\n", dev, mem);
+ dprintk(VIDC_ERR, "invalid param %pK %pK\n", dev, mem);
return;
}
venus_hfi_power_enable(dev);
@@ -489,7 +489,7 @@
u32 hwiosymaddr = reg;
u8 *base_addr;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return;
}
@@ -529,7 +529,7 @@
int rc ;
u8 *base_addr;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
@@ -640,7 +640,7 @@
int i;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid paramter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid paramter: %pK\n", device);
return;
}
@@ -914,7 +914,7 @@
unsigned long size;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "%s Invalid param, device: 0x%p\n",
+ dprintk(VIDC_ERR, "%s Invalid param, device: 0x%pK\n",
__func__, device);
return -EINVAL;
}
@@ -949,7 +949,7 @@
int rc = 0;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "%s Invalid param, device: 0x%p\n",
+ dprintk(VIDC_ERR, "%s Invalid param, device: 0x%pK\n",
__func__, device);
return -EINVAL;
}
@@ -973,14 +973,14 @@
struct on_chip_mem *ocmem;
if (!device) {
- dprintk(VIDC_ERR, "%s Invalid param, device: 0x%p\n",
+ dprintk(VIDC_ERR, "%s Invalid param, device: 0x%pK\n",
__func__, device);
return -EINVAL;
}
ocmem = &device->resources.ocmem;
if (!ocmem->buf) {
- dprintk(VIDC_ERR, "Invalid params, ocmem_buffer: 0x%p\n",
+ dprintk(VIDC_ERR, "Invalid params, ocmem_buffer: 0x%pK\n",
ocmem->buf);
return -EINVAL;
}
@@ -1009,7 +1009,7 @@
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "%s Invalid param, device: 0x%p\n",
+ dprintk(VIDC_ERR, "%s Invalid param, device: 0x%pK\n",
__func__, device);
rc = -EINVAL;
goto ocmem_unset_failed;
@@ -1040,7 +1040,7 @@
int rc = 0;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "%s Invalid param, device: 0x%p\n",
+ dprintk(VIDC_ERR, "%s Invalid param, device: 0x%pK\n",
__func__, device);
return -EINVAL;
}
@@ -1069,7 +1069,7 @@
{
int rc = 0;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "%s Invalid param, device: 0x%p\n",
+ dprintk(VIDC_ERR, "%s Invalid param, device: 0x%pK\n",
__func__, device);
return -EINVAL;
}
@@ -1231,7 +1231,7 @@
u32 reg;
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "Invalid input: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid input: %pK\n", device);
return -EINVAL;
}
mutex_lock(&device->clk_pwr_lock);
@@ -1262,7 +1262,7 @@
{
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
if (!device->power_enabled) {
@@ -1412,7 +1412,7 @@
int rc = 0;
struct venus_hfi_device *device = dev;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
@@ -1491,7 +1491,7 @@
int rc = 0;
struct venus_hfi_device *device = dev;
if (!device) {
- dprintk(VIDC_ERR, "Invalid args: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid args: %pK\n", device);
return -EINVAL;
}
device->clk_load = load;
@@ -2473,7 +2473,7 @@
return -EINVAL;
}
sess_close = session;
- dprintk(VIDC_DBG, "deleted the session: 0x%p",
+ dprintk(VIDC_DBG, "deleted the session: 0x%pK",
sess_close);
mutex_lock(&((struct venus_hfi_device *)
sess_close->device)->session_lock);
@@ -3083,7 +3083,7 @@
dprintk(VIDC_INFO, " GOT INTERRUPT () ");
if (!device->callback) {
- dprintk(VIDC_ERR, "No interrupt callback function: %p\n",
+ dprintk(VIDC_ERR, "No interrupt callback function: %pK\n",
device);
return;
}
@@ -3169,7 +3169,7 @@
int rc = 0;
struct venus_core_clock *clock;
if (!res || !device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
clock = device->resources.clock;
@@ -3250,7 +3250,7 @@
int i;
struct venus_core_clock *cl;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return;
}
@@ -3306,7 +3306,7 @@
struct venus_core_clock *cl;
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
WARN_ON(!mutex_is_locked(&device->clk_pwr_lock));
@@ -3371,7 +3371,7 @@
domain = iommu_group_get_iommudata(iommu_map->group);
if (!domain) {
dprintk(VIDC_ERR,
- "Failed to get domain data for group %p",
+ "Failed to get domain data for group %pK",
iommu_map->group);
rc = -EINVAL;
goto fail_group;
@@ -3379,7 +3379,7 @@
iommu_map->domain = msm_find_domain_no(domain);
if (iommu_map->domain < 0) {
dprintk(VIDC_ERR,
- "Failed to get domain index for domain %p",
+ "Failed to get domain index for domain %pK",
domain);
rc = -EINVAL;
goto fail_group;
@@ -3499,7 +3499,7 @@
device->res = res;
if (!res) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", res);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", res);
return -ENODEV;
}
device->gdsc = devm_regulator_get(&res->pdev->dev, "vdd");
@@ -3554,7 +3554,7 @@
struct venus_hfi_device *device = dev;
if (!device) {
- dprintk(VIDC_ERR, "%s: Invalid param device: %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid param device: %pK\n",
__func__, device);
return -EINVAL;
}
@@ -3637,7 +3637,7 @@
struct venus_hfi_device *device = dev;
if (!device || !device->gdsc) {
- dprintk(VIDC_ERR, "%s Invalid paramter: %p\n",
+ dprintk(VIDC_ERR, "%s Invalid paramter: %pK\n",
__func__, device);
return -EINVAL;
}
@@ -3702,7 +3702,7 @@
{
struct venus_hfi_device *device = dev;
if (!device) {
- dprintk(VIDC_ERR, "%s Invalid paramter: %p\n",
+ dprintk(VIDC_ERR, "%s Invalid paramter: %pK\n",
__func__, device);
return;
}
@@ -3774,7 +3774,7 @@
struct venus_hfi_device *device = dev;
if (!device) {
- dprintk(VIDC_ERR, "%s Invalid paramter: %p\n",
+ dprintk(VIDC_ERR, "%s Invalid paramter: %pK\n",
__func__, device);
return -EINVAL;
}
@@ -3928,7 +3928,7 @@
int rc = 0;
if (!res || !callback) {
- dprintk(VIDC_ERR, "Invalid params: %p %p\n", res, callback);
+ dprintk(VIDC_ERR, "Invalid params: %pK %pK\n", res, callback);
return NULL;
}
@@ -4023,7 +4023,7 @@
int rc = 0;
if (!hdev || !res || !callback) {
- dprintk(VIDC_ERR, "Invalid params: %p %p %p\n",
+ dprintk(VIDC_ERR, "Invalid params: %pK %pK %pK\n",
hdev, res, callback);
rc = -EINVAL;
goto err_venus_hfi_init;
diff --git a/drivers/media/platform/msm/vidc/vidc_hfi.c b/drivers/media/platform/msm/vidc/vidc_hfi.c
index ef0de37..a9e87a0 100644
--- a/drivers/media/platform/msm/vidc/vidc_hfi.c
+++ b/drivers/media/platform/msm/vidc/vidc_hfi.c
@@ -61,7 +61,7 @@
struct hfi_device *hdev)
{
if (!hdev) {
- dprintk(VIDC_ERR, "%s invalid device %p", __func__, hdev);
+ dprintk(VIDC_ERR, "%s invalid device %pK", __func__, hdev);
return;
}