summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdulla Anam <abdullahanam@codeaurora.org>2016-06-03 17:39:42 +0530
committerKarthikeyan Periasamy <kperiasa@codeaurora.org>2016-08-16 16:54:56 -0700
commita0ecb452f4368ef9d69d8a8d84612021a07d17da (patch)
treef42b8c5879989216520a106561de836ee3173e5a
parentc5984ec85c1e095f932f2fdaf5f327a2c1480c9b (diff)
msm: vidc: use %pK instead of %p which respects kptr_restrict sysctl
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. CRs-Fixed: 987018 Change-Id: I4772257a557c6730ecc0624cbc8e5614e893e9fd Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org> Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/vidc/governors/msm_vidc_table_gov.c6
-rw-r--r--drivers/media/platform/msm/vidc/hfi_packetization.c6
-rw-r--r--drivers/media/platform/msm/vidc/hfi_response_handler.c6
-rw-r--r--drivers/media/platform/msm/vidc/msm_smem.c32
-rw-r--r--drivers/media/platform/msm/vidc/msm_v4l2_vidc.c4
-rw-r--r--drivers/media/platform/msm/vidc/msm_vdec.c34
-rw-r--r--drivers/media/platform/msm/vidc/msm_venc.c34
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc.c30
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_common.c122
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_dcvs.c16
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_debug.c19
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_res_parse.c6
-rw-r--r--drivers/media/platform/msm/vidc/venus_boot.c4
-rw-r--r--drivers/media/platform/msm/vidc/venus_hfi.c52
-rw-r--r--drivers/media/platform/msm/vidc/vidc_hfi.c4
-rw-r--r--drivers/media/platform/msm/vidc/vmem/vmem.c4
16 files changed, 190 insertions, 189 deletions
diff --git a/drivers/media/platform/msm/vidc/governors/msm_vidc_table_gov.c b/drivers/media/platform/msm/vidc/governors/msm_vidc_table_gov.c
index f733c08ecd95..dded8a25961a 100644
--- a/drivers/media/platform/msm/vidc/governors/msm_vidc_table_gov.c
+++ b/drivers/media/platform/msm/vidc/governors/msm_vidc_table_gov.c
@@ -90,7 +90,7 @@ static int msm_vidc_table_get_target_freq(struct devfreq *dev,
int i = 0;
if (!dev || !frequency || !flag) {
- dprintk(VIDC_ERR, "%s: Invalid params %p, %p, %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid params %pK, %pK, %pK\n",
__func__, dev, frequency, flag);
return -EINVAL;
}
@@ -173,7 +173,7 @@ static int msm_vidc_free_bus_table(struct platform_device *pdev,
int rc = 0, i = 0;
if (!pdev || !data) {
- dprintk(VIDC_ERR, "%s: invalid args %p %p\n",
+ dprintk(VIDC_ERR, "%s: invalid args %pK %pK\n",
__func__, pdev, data);
return -EINVAL;
}
@@ -197,7 +197,7 @@ static int msm_vidc_load_bus_table(struct platform_device *pdev,
struct device_node *child_node = NULL;
if (!pdev || !data) {
- dprintk(VIDC_ERR, "%s: invalid args %p %p\n",
+ dprintk(VIDC_ERR, "%s: invalid args %pK %pK\n",
__func__, pdev, data);
return -EINVAL;
}
diff --git a/drivers/media/platform/msm/vidc/hfi_packetization.c b/drivers/media/platform/msm/vidc/hfi_packetization.c
index 9b9b74436d88..0b44896bf6b3 100644
--- a/drivers/media/platform/msm/vidc/hfi_packetization.c
+++ b/drivers/media/platform/msm/vidc/hfi_packetization.c
@@ -1465,7 +1465,7 @@ int create_pkt_cmd_session_set_property(
break;
default:
dprintk(VIDC_ERR,
- "Invalid Rate control setting: %p\n",
+ "Invalid Rate control setting: %pK\n",
pdata);
break;
}
@@ -2211,7 +2211,7 @@ int create_pkt_ssr_cmd(enum hal_ssr_trigger_type type,
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);
@@ -2224,7 +2224,7 @@ int create_pkt_cmd_sys_image_version(
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 467e9d90c919..a18840b1a1a4 100644
--- a/drivers/media/platform/msm/vidc/hfi_response_handler.c
+++ b/drivers/media/platform/msm/vidc/hfi_response_handler.c
@@ -955,7 +955,7 @@ static enum vidc_status hfi_parse_init_done_properties(
}
default:
dprintk(VIDC_DBG,
- "%s: default case - data_ptr %p, prop_id 0x%x\n",
+ "%s: default case - data_ptr %pK, prop_id 0x%x\n",
__func__, data_ptr, prop_id);
break;
}
@@ -1055,7 +1055,7 @@ static void hfi_process_sess_get_prop_profile_level(
dprintk(VIDC_DBG, "Entered %s\n", __func__);
if (!prop) {
dprintk(VIDC_ERR,
- "hal_process_sess_get_profile_level: bad_prop: %p\n",
+ "hal_process_sess_get_profile_level: bad_prop: %pK\n",
prop);
return;
}
@@ -1086,7 +1086,7 @@ static void hfi_process_sess_get_prop_buf_req(
if (!prop) {
dprintk(VIDC_ERR,
- "hal_process_sess_get_prop_buf_req: bad_prop: %p\n",
+ "hal_process_sess_get_prop_buf_req: bad_prop: %pK\n",
prop);
return;
}
diff --git a/drivers/media/platform/msm/vidc/msm_smem.c b/drivers/media/platform/msm/vidc/msm_smem.c
index 4ae13944362a..bb2715654f45 100644
--- a/drivers/media/platform/msm/vidc/msm_smem.c
+++ b/drivers/media/platform/msm/vidc/msm_smem.c
@@ -45,7 +45,7 @@ static int get_device_address(struct smem_client *smem_client,
struct context_bank_info *cb = NULL;
if (!iova || !buffer_size || !hndl || !smem_client || !mapping_info) {
- 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;
}
@@ -107,7 +107,7 @@ static int get_device_address(struct smem_client *smem_client,
}
if (table->sgl) {
dprintk(VIDC_DBG,
- "%s: CB : %s, DMA buf: %p, device: %p, attach: %p, table: %p, table sgl: %p, rc: %d, dma_address: %pa\n",
+ "%s: CB : %s, DMA buf: %pK, device: %pK, attach: %pK, table: %pK, table sgl: %pK, rc: %d, dma_address: %pa\n",
__func__, cb->name, buf, cb->dev, attach,
table, table->sgl, rc,
&table->sgl->dma_address);
@@ -137,7 +137,7 @@ static int get_device_address(struct smem_client *smem_client,
}
}
- dprintk(VIDC_DBG, "mapped ion handle %p to %pa\n", hndl, iova);
+ dprintk(VIDC_DBG, "mapped ion handle %pK to %pa\n", hndl, iova);
return 0;
mem_map_sg_failed:
dma_buf_unmap_attachment(attach, table, DMA_BIDIRECTIONAL);
@@ -157,7 +157,7 @@ static void put_device_address(struct smem_client *smem_client,
struct ion_client *clnt = NULL;
if (!hndl || !smem_client || !mapping_info) {
- dprintk(VIDC_WARN, "Invalid params: %p, %p\n",
+ dprintk(VIDC_WARN, "Invalid params: %pK, %pK\n",
smem_client, hndl);
return;
}
@@ -175,7 +175,7 @@ static void put_device_address(struct smem_client *smem_client,
}
if (is_iommu_present(smem_client->res)) {
dprintk(VIDC_DBG,
- "Calling dma_unmap_sg - device: %p, address: %pa, buf: %p, table: %p, attach: %p\n",
+ "Calling dma_unmap_sg - device: %pK, address: %pa, buf: %pK, table: %pK, attach: %pK\n",
mapping_info->dev,
&mapping_info->table->sgl->dma_address,
mapping_info->buf, mapping_info->table,
@@ -204,9 +204,9 @@ static int ion_user_to_kernel(struct smem_client *client, int fd, u32 offset,
unsigned long ion_flags = 0;
hndl = ion_import_dma_buf(client->clnt, fd);
- dprintk(VIDC_DBG, "%s ion handle: %p\n", __func__, hndl);
+ dprintk(VIDC_DBG, "%s ion handle: %pK\n", __func__, hndl);
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;
@@ -242,7 +242,7 @@ static int ion_user_to_kernel(struct smem_client *client, int fd, u32 offset,
goto fail_device_address;
}
dprintk(VIDC_DBG,
- "%s: ion_handle = %p, fd = %d, device_addr = %pa, size = %zx, kvaddr = %p, buffer_type = %d, flags = %#lx\n",
+ "%s: ion_handle = %pK, fd = %d, device_addr = %pa, size = %zx, kvaddr = %pK, buffer_type = %d, flags = %#lx\n",
__func__, mem->smem_priv, fd, &mem->device_addr, mem->size,
mem->kvaddr, mem->buffer_type, mem->flags);
return rc;
@@ -339,7 +339,7 @@ static int alloc_ion_mem(struct smem_client *client, size_t size, u32 align,
hndl = ion_alloc(client->clnt, size, align, heap_mask, ion_flags);
if (IS_ERR_OR_NULL(hndl)) {
dprintk(VIDC_ERR,
- "Failed to allocate shared memory = %p, %zx, %d, %#x\n",
+ "Failed to allocate shared memory = %pK, %zx, %d, %#x\n",
client, size, align, flags);
rc = -ENOMEM;
goto fail_shared_mem_alloc;
@@ -377,7 +377,7 @@ static int alloc_ion_mem(struct smem_client *client, size_t size, u32 align,
}
mem->size = size;
dprintk(VIDC_DBG,
- "%s: ion_handle = %p, device_addr = %pa, size = %#zx, kvaddr = %p, buffer_type = %#x, flags = %#lx\n",
+ "%s: ion_handle = %pK, device_addr = %pa, size = %#zx, kvaddr = %pK, buffer_type = %#x, flags = %#lx\n",
__func__, mem->smem_priv, &mem->device_addr,
mem->size, mem->kvaddr, mem->buffer_type, mem->flags);
return rc;
@@ -393,7 +393,7 @@ fail_shared_mem_alloc:
static void free_ion_mem(struct smem_client *client, struct msm_smem *mem)
{
dprintk(VIDC_DBG,
- "%s: ion_handle = %p, device_addr = %pa, size = %#zx, kvaddr = %p, buffer_type = %#x\n",
+ "%s: ion_handle = %pK, device_addr = %pa, size = %#zx, kvaddr = %pK, buffer_type = %#x\n",
__func__, mem->smem_priv, &mem->device_addr,
mem->size, mem->kvaddr, mem->buffer_type);
@@ -408,7 +408,7 @@ static void free_ion_mem(struct smem_client *client, struct msm_smem *mem)
(u32)mem->buffer_type, -1, mem->size, -1,
mem->flags, -1);
dprintk(VIDC_DBG,
- "%s: Freeing handle %p, client: %p\n",
+ "%s: Freeing handle %pK, client: %pK\n",
__func__, mem->smem_priv, client->clnt);
ion_free(client->clnt, mem->smem_priv);
trace_msm_smem_buffer_ion_op_end("FREE", (u32)mem->buffer_type,
@@ -469,7 +469,7 @@ bool msm_smem_compare_buffers(void *clt, int fd, void *priv)
bool ret = false;
if (!clt || !priv) {
- dprintk(VIDC_ERR, "Invalid params: %p, %p\n",
+ dprintk(VIDC_ERR, "Invalid params: %pK, %pK\n",
clt, priv);
return false;
}
@@ -486,7 +486,7 @@ static int ion_cache_operations(struct smem_client *client,
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;
}
@@ -533,7 +533,7 @@ int msm_smem_cache_operations(void *clt, struct msm_smem *mem,
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;
}
@@ -684,7 +684,7 @@ struct context_bank_info *msm_smem_get_context_bank(void *clt,
cb->buffer_type & buffer_type) {
match = cb;
dprintk(VIDC_DBG,
- "context bank found for CB : %s, device: %p mapping: %p\n",
+ "context bank found for CB : %s, device: %pK mapping: %pK\n",
match->name, match->dev, match->mapping);
break;
}
diff --git a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
index 58a7d0d0577a..b293eb06ede8 100644
--- a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
@@ -280,7 +280,7 @@ static int read_platform_resources(struct msm_vidc_core *core,
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;
}
@@ -657,7 +657,7 @@ static int msm_vidc_remove(struct platform_device *pdev)
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;
}
diff --git a/drivers/media/platform/msm/vidc/msm_vdec.c b/drivers/media/platform/msm/vidc/msm_vdec.c
index 96fefea39241..7a78c00d3387 100644
--- a/drivers/media/platform/msm/vidc/msm_vdec.c
+++ b/drivers/media/platform/msm/vidc/msm_vdec.c
@@ -878,7 +878,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst,
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;
}
@@ -957,7 +957,7 @@ int msm_vdec_release_buf(struct msm_vidc_inst *inst,
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;
}
@@ -1055,7 +1055,7 @@ int msm_vdec_reqbufs(struct msm_vidc_inst *inst, struct v4l2_requestbuffers *b)
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;
}
@@ -1085,7 +1085,7 @@ int msm_vdec_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
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;
}
@@ -1497,7 +1497,7 @@ int msm_vdec_querycap(struct msm_vidc_inst *inst, struct v4l2_capability *cap)
{
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));
@@ -1518,7 +1518,7 @@ int msm_vdec_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f)
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) {
@@ -1576,7 +1576,7 @@ static int msm_vdec_queue_setup(struct vb2_queue *q,
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;
}
@@ -1864,7 +1864,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
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;
}
msm_dcvs_init_load(inst);
@@ -1888,7 +1888,7 @@ static inline int stop_streaming(struct msm_vidc_inst *inst)
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;
}
@@ -1898,7 +1898,7 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count)
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;
@@ -1907,7 +1907,7 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count)
return -EINVAL;
}
hdev = inst->core->device;
- dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %p\n",
+ dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
q->type, inst);
switch (q->type) {
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
@@ -1925,7 +1925,7 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count)
}
if (rc) {
dprintk(VIDC_ERR,
- "Streamon failed on: %d capability for inst: %p\n",
+ "Streamon failed on: %d capability for inst: %pK\n",
q->type, inst);
goto stream_start_failed;
}
@@ -1947,7 +1947,7 @@ static void msm_vdec_stop_streaming(struct vb2_queue *q)
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;
}
@@ -1973,7 +1973,7 @@ static void msm_vdec_stop_streaming(struct vb2_queue *q)
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);
}
@@ -2000,7 +2000,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
{
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[2];
@@ -2728,7 +2728,7 @@ static int msm_vdec_op_s_ctrl(struct v4l2_ctrl *ctrl)
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;
}
@@ -2757,7 +2757,7 @@ static int msm_vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
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;
}
for (c = 0; c < master->ncontrols; ++c) {
diff --git a/drivers/media/platform/msm/vidc/msm_venc.c b/drivers/media/platform/msm/vidc/msm_venc.c
index c08084a54e86..4592a436e7c1 100644
--- a/drivers/media/platform/msm/vidc/msm_venc.c
+++ b/drivers/media/platform/msm/vidc/msm_venc.c
@@ -1660,13 +1660,13 @@ static inline int msm_venc_power_save_mode_enable(struct msm_vidc_inst *inst)
(void *)inst->session, prop_id, pdata);
if (rc) {
dprintk(VIDC_ERR,
- "%s: Failed to set power save mode for inst: %p\n",
+ "%s: Failed to set power save mode for inst: %pK\n",
__func__, inst);
goto fail_power_mode_set;
}
inst->flags |= VIDC_LOW_POWER;
msm_dcvs_enc_set_power_save_mode(inst, true);
- dprintk(VIDC_INFO, "Power Save Mode set for inst: %p\n", inst);
+ dprintk(VIDC_INFO, "Power Save Mode set for inst: %pK\n", inst);
}
fail_power_mode_set:
@@ -1711,7 +1711,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
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;
}
msm_dcvs_init_load(inst);
@@ -1725,11 +1725,11 @@ static int msm_venc_start_streaming(struct vb2_queue *q, unsigned int count)
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;
- dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %p\n",
+ dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
q->type, inst);
switch (q->type) {
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
@@ -1747,7 +1747,7 @@ static int msm_venc_start_streaming(struct vb2_queue *q, unsigned int count)
}
if (rc) {
dprintk(VIDC_ERR,
- "Streamon failed on: %d capability for inst: %p\n",
+ "Streamon failed on: %d capability for inst: %pK\n",
q->type, inst);
goto stream_start_failed;
}
@@ -1769,7 +1769,7 @@ static void msm_venc_stop_streaming(struct vb2_queue *q)
struct msm_vidc_inst *inst;
int rc = 0;
if (!q || !q->drv_priv) {
- dprintk(VIDC_ERR, "%s - Invalid input, q = %p\n", __func__, q);
+ dprintk(VIDC_ERR, "%s - Invalid input, q = %pK\n", __func__, q);
return;
}
@@ -1791,7 +1791,7 @@ static void msm_venc_stop_streaming(struct vb2_queue *q)
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);
}
@@ -3439,7 +3439,7 @@ static int msm_venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
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;
}
@@ -3483,7 +3483,7 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst)
{
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[4];
@@ -3527,7 +3527,7 @@ int msm_venc_querycap(struct msm_vidc_inst *inst, struct v4l2_capability *cap)
{
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));
@@ -3548,7 +3548,7 @@ int msm_venc_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f)
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) {
@@ -3605,7 +3605,7 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
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;
}
@@ -3748,7 +3748,7 @@ int msm_venc_g_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
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;
}
@@ -3821,7 +3821,7 @@ int msm_venc_reqbufs(struct msm_vidc_inst *inst, struct v4l2_requestbuffers *b)
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);
@@ -3858,7 +3858,7 @@ int msm_venc_prepare_buf(struct msm_vidc_inst *inst,
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;
}
@@ -3929,7 +3929,7 @@ int msm_venc_release_buf(struct msm_vidc_inst *inst,
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 2dab1f98f30a..84ce75c28bf8 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc.c
@@ -288,7 +288,7 @@ struct buffer_info *device_to_uvaddr(struct msm_vidc_list *buf_list,
if (!buf_list || !device_addr) {
dprintk(VIDC_ERR,
- "Invalid input- device_addr: %pa buf_list: %p\n",
+ "Invalid input- device_addr: %pa buf_list: %pK\n",
&device_addr, buf_list);
goto err_invalid_input;
}
@@ -428,7 +428,7 @@ int map_and_register_buf(struct msm_vidc_inst *inst, struct v4l2_buffer *b)
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) {
@@ -518,7 +518,7 @@ int map_and_register_buf(struct msm_vidc_inst *inst, struct v4l2_buffer *b)
goto exit;
}
dprintk(VIDC_DBG,
- "%s: [MAP] binfo = %p, handle[%d] = %p, device_addr = %pa, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [MAP] binfo = %pK, handle[%d] = %pK, device_addr = %pa, 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]);
@@ -541,7 +541,7 @@ int unmap_and_deregister_buf(struct msm_vidc_inst *inst,
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;
}
@@ -571,7 +571,7 @@ int unmap_and_deregister_buf(struct msm_vidc_inst *inst,
for (i = 0; i < temp->num_planes; i++) {
dprintk(VIDC_DBG,
- "%s: [UNMAP] binfo = %p, handle[%d] = %p, device_addr = %pa, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [UNMAP] binfo = %pK, handle[%d] = %pK, device_addr = %pa, 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]);
@@ -600,12 +600,12 @@ int unmap_and_deregister_buf(struct msm_vidc_inst *inst,
}
}
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:
return 0;
@@ -619,7 +619,7 @@ int qbuf_dynamic_buf(struct msm_vidc_inst *inst,
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]);
@@ -642,12 +642,12 @@ int output_buffer_cache_invalidate(struct msm_vidc_inst *inst,
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;
}
if (!binfo) {
- dprintk(VIDC_ERR, "%s: invalid buffer info: %p\n",
+ dprintk(VIDC_ERR, "%s: invalid buffer info: %pK\n",
__func__, inst);
return -EINVAL;
}
@@ -723,7 +723,7 @@ int msm_vidc_release_buffers(void *instance, int buffer_type)
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);
}
}
@@ -787,7 +787,7 @@ free_and_unmap:
for (i = 0; i < bi->num_planes; i++) {
if (bi->handle[i] && bi->mapped[i]) {
dprintk(VIDC_DBG,
- "%s: [UNMAP] binfo = %p, handle[%d] = %p, device_addr = %pa, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [UNMAP] binfo = %pK, handle[%d] = %pK, device_addr = %pa, fd = %d, offset = %d, mapped = %d\n",
__func__, bi, i, bi->handle[i],
&bi->device_addr[i], bi->fd[i],
bi->buff_off[i], bi->mapped[i]);
@@ -988,7 +988,7 @@ int msm_vidc_enum_framesizes(void *instance, struct v4l2_frmsizeenum *fsize)
struct msm_vidc_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;
}
@@ -1150,7 +1150,7 @@ void *msm_vidc_open(int core_id, int session_type)
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_MSG_PRIO2STRING(VIDC_INFO), inst, session_type);
mutex_init(&inst->sync_lock);
mutex_init(&inst->bufq[CAPTURE_PORT].lock);
@@ -1341,7 +1341,7 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)
for (i = 0; i < MAX_PORT_NUM; i++)
vb2_queue_release(&inst->bufq[i].vb2_bufq);
- pr_info(VIDC_DBG_TAG "Closed video instance: %p\n",
+ pr_info(VIDC_DBG_TAG "Closed video instance: %pK\n",
VIDC_MSG_PRIO2STRING(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 1f071ba36ec1..9053b9f2e2ac 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c
@@ -337,7 +337,7 @@ int msm_comm_get_inst_load(struct msm_vidc_inst *inst,
if (is_non_realtime_session(inst) &&
(quirks & LOAD_CALC_IGNORE_NON_REALTIME_LOAD)) {
if (!inst->prop.fps) {
- dprintk(VIDC_INFO, "instance:%p fps = 0\n", inst);
+ dprintk(VIDC_INFO, "instance:%pK fps = 0\n", inst);
load = 0;
} else {
load = msm_comm_get_mbs_per_sec(inst) / inst->prop.fps;
@@ -356,7 +356,7 @@ int msm_comm_get_load(struct msm_vidc_core *core,
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;
}
@@ -485,13 +485,13 @@ static int msm_comm_vote_bus(struct msm_vidc_core *core)
unsigned long core_freq = 0;
if (!core) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, core);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, core);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "%s Invalid device handle: %p\n",
+ dprintk(VIDC_ERR, "%s Invalid device handle: %pK\n",
__func__, hdev);
return -EINVAL;
}
@@ -603,7 +603,7 @@ const struct msm_vidc_format *msm_comm_get_pixel_fmt_index(
{
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;
}
@@ -625,7 +625,7 @@ struct msm_vidc_format *msm_comm_get_pixel_fmt_fourcc(
{
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++) {
@@ -853,11 +853,11 @@ static void change_inst_state(struct msm_vidc_inst *inst,
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:
@@ -868,7 +868,7 @@ static int signal_session_msg_receipt(enum hal_command_response cmd,
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;
}
if (IS_HAL_SESSION_CMD(cmd)) {
@@ -917,7 +917,7 @@ static int wait_for_state(struct msm_vidc_inst *inst,
{
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;
}
@@ -1123,7 +1123,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data)
struct buffer_info *binfo = NULL, *temp = NULL;
u32 *ptr = NULL;
- dprintk(VIDC_DBG, "%s - inst: %p buffer: %pa extra: %pa\n",
+ dprintk(VIDC_DBG, "%s - inst: %pK buffer: %pa extra: %pa\n",
__func__, inst, &event_notify->packet_buffer,
&event_notify->extra_data_buffer);
@@ -1544,11 +1544,11 @@ static void handle_session_error(enum hal_command_response cmd, void *data)
}
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, "Too many clients, rejecting %p", inst);
+ dprintk(VIDC_WARN, "Too many clients, rejecting %pK", inst);
event = V4L2_EVENT_MSM_VIDC_MAX_CLIENTS;
/*
@@ -1560,10 +1560,10 @@ static void handle_session_error(enum hal_command_response cmd, void *data)
msm_comm_session_clean(inst);
} else if (response->status == VIDC_ERR_NOT_SUPPORTED) {
- dprintk(VIDC_WARN, "Unsupported bitstream in %p", inst);
+ dprintk(VIDC_WARN, "Unsupported bitstream in %pK", inst);
event = V4L2_EVENT_MSM_VIDC_HW_UNSUPPORTED;
} else {
- dprintk(VIDC_WARN, "Unknown session error (%d) for %p\n",
+ dprintk(VIDC_WARN, "Unknown session error (%d) for %pK\n",
response->status, inst);
event = V4L2_EVENT_MSM_VIDC_SYS_ERROR;
}
@@ -1580,7 +1580,7 @@ static void msm_comm_clean_notify_client(struct msm_vidc_core *core)
return;
}
- dprintk(VIDC_WARN, "%s: Core %p\n", __func__, core);
+ dprintk(VIDC_WARN, "%s: Core %pK\n", __func__, core);
mutex_lock(&core->lock);
core->state = VIDC_CORE_INVALID;
@@ -1589,7 +1589,7 @@ static void msm_comm_clean_notify_client(struct msm_vidc_core *core)
inst->state = MSM_VIDC_CORE_INVALID;
mutex_unlock(&inst->lock);
dprintk(VIDC_WARN,
- "%s Send sys error for inst %p\n", __func__, inst);
+ "%s Send sys error for inst %pK\n", __func__, inst);
msm_vidc_queue_v4l2_event(inst,
V4L2_EVENT_MSM_VIDC_SYS_ERROR);
}
@@ -1617,7 +1617,7 @@ static void handle_sys_error(enum hal_command_response cmd, void *data)
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);
msm_comm_clean_notify_client(core);
hdev = core->device;
@@ -1656,12 +1656,12 @@ void msm_comm_session_clean(struct msm_vidc_inst *inst)
hdev = inst->core->device;
mutex_lock(&inst->lock);
if (hdev && inst->session) {
- dprintk(VIDC_DBG, "cleaning up instance: %p\n", inst);
+ dprintk(VIDC_DBG, "cleaning up instance: %pK\n", inst);
rc = call_hfi_op(hdev, session_clean,
(void *)inst->session);
if (rc) {
dprintk(VIDC_ERR,
- "Session clean failed :%p\n", inst);
+ "Session clean failed :%pK\n", inst);
}
inst->session = NULL;
}
@@ -2086,7 +2086,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data)
if (extra_idx && extra_idx < VIDEO_MAX_PLANES) {
dprintk(VIDC_DBG,
- "extradata: userptr = %p;"
+ "extradata: userptr = %pK;"
" bytesused = %d; length = %d\n",
(u8 *)vb->planes[extra_idx].m.userptr,
vb->planes[extra_idx].bytesused,
@@ -2245,13 +2245,13 @@ int msm_comm_scale_clocks_load(struct msm_vidc_core *core,
int codec = 0;
if (!core) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, core);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, core);
return -EINVAL;
}
hdev = core->device;
if (!hdev) {
- dprintk(VIDC_ERR, "%s Invalid device handle: %p\n",
+ dprintk(VIDC_ERR, "%s Invalid device handle: %pK\n",
__func__, hdev);
return -EINVAL;
}
@@ -2425,7 +2425,7 @@ static int msm_comm_session_abort(struct msm_vidc_inst *inst)
msecs_to_jiffies(msm_vidc_hw_rsp_timeout));
if (!rc) {
dprintk(VIDC_ERR,
- "%s: Wait interrupted or timed out [%p]: %d\n",
+ "%s: Wait interrupted or timed out [%pK]: %d\n",
__func__, inst, abort_completion);
call_hfi_op(hdev, flush_debug_queue, hdev->hfi_device_data);
dprintk(VIDC_ERR,
@@ -2457,7 +2457,7 @@ static void handle_thermal_event(struct msm_vidc_core *core)
mutex_unlock(&core->lock);
if (inst->state >= MSM_VIDC_OPEN_DONE &&
inst->state < MSM_VIDC_CLOSE_DONE) {
- dprintk(VIDC_WARN, "%s: abort inst %p\n",
+ dprintk(VIDC_WARN, "%s: abort inst %pK\n",
__func__, inst);
rc = msm_comm_session_abort(inst);
if (rc) {
@@ -2468,7 +2468,7 @@ static void handle_thermal_event(struct msm_vidc_core *core)
}
change_inst_state(inst, MSM_VIDC_CORE_INVALID);
dprintk(VIDC_WARN,
- "%s Send sys error for inst %p\n",
+ "%s Send sys error for inst %pK\n",
__func__, inst);
msm_vidc_queue_v4l2_event(inst,
V4L2_EVENT_MSM_VIDC_SYS_ERROR);
@@ -2674,7 +2674,7 @@ static int msm_comm_session_init(int flipped_state,
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;
}
@@ -2696,7 +2696,7 @@ static int msm_comm_session_init(int flipped_state,
if (rc || !inst->session) {
dprintk(VIDC_ERR,
- "Failed to call session init for: %p, %p, %d, %d\n",
+ "Failed to call session init for: %pK, %pK, %d, %d\n",
inst->core->device, inst,
inst->session_type, fourcc);
rc = -EINVAL;
@@ -2785,7 +2785,7 @@ static int msm_vidc_load_resources(int flipped_state,
hdev = 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;
}
@@ -2821,7 +2821,7 @@ static int msm_vidc_start(int flipped_state, struct msm_vidc_inst *inst)
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;
}
@@ -2851,7 +2851,7 @@ static int msm_vidc_stop(int flipped_state, struct msm_vidc_inst *inst)
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;
}
@@ -2881,7 +2881,7 @@ static int msm_vidc_release_res(int flipped_state, struct msm_vidc_inst *inst)
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;
}
@@ -2913,7 +2913,7 @@ static int msm_comm_session_close(int flipped_state,
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;
}
@@ -3317,16 +3317,16 @@ int msm_comm_try_state(struct msm_vidc_inst *inst, int state)
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: %#x to %#x\n",
+ "Trying to move inst: %pK from: %#x to %#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);
@@ -3740,7 +3740,7 @@ int msm_comm_qbuf(struct msm_vidc_inst *inst, struct vb2_buffer *vb)
defer = defer ?: batch_mode && (!output_count || !capture_count);
if (defer) {
- dprintk(VIDC_DBG, "Deferring queue of %p\n", vb);
+ dprintk(VIDC_DBG, "Deferring queue of %pK\n", vb);
return 0;
}
@@ -3948,7 +3948,7 @@ int msm_comm_try_get_prop(struct msm_vidc_inst *inst, enum hal_property ptype,
*/
dprintk(VIDC_ERR,
- "In Wrong state to call Buf Req: Inst %p or Core %p\n",
+ "In Wrong state to call Buf Req: Inst %pK or Core %pK\n",
inst, inst->core);
rc = -EAGAIN;
mutex_unlock(&inst->sync_lock);
@@ -3983,7 +3983,7 @@ int msm_comm_try_get_prop(struct msm_vidc_inst *inst, enum hal_property ptype,
msecs_to_jiffies(msm_vidc_hw_rsp_timeout));
if (!rc) {
dprintk(VIDC_ERR,
- "%s: Wait interrupted or timed out [%p]: %d\n",
+ "%s: Wait interrupted or timed out [%pK]: %d\n",
__func__, inst,
SESSION_MSG_INDEX(HAL_SESSION_PROPERTY_INFO));
inst->state = MSM_VIDC_CORE_INVALID;
@@ -4027,7 +4027,7 @@ int msm_comm_release_output_buffers(struct msm_vidc_inst *inst)
struct hfi_device *hdev;
if (!inst) {
dprintk(VIDC_ERR,
- "Invalid instance pointer = %p\n", inst);
+ "Invalid instance pointer = %pK\n", inst);
return -EINVAL;
}
mutex_lock(&inst->outputbufs.lock);
@@ -4042,12 +4042,12 @@ int msm_comm_release_output_buffers(struct msm_vidc_inst *inst)
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->outputbufs.lock);
@@ -4143,18 +4143,18 @@ int msm_comm_release_scratch_buffers(struct msm_vidc_inst *inst,
enum hal_buffer sufficiency = HAL_BUFFER_NONE;
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;
}
@@ -4231,18 +4231,18 @@ int msm_comm_release_persist_buffers(struct msm_vidc_inst *inst)
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;
}
@@ -4291,7 +4291,7 @@ int msm_comm_try_set_prop(struct msm_vidc_inst *inst,
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;
}
@@ -4503,7 +4503,7 @@ void msm_comm_flush_pending_dynamic_buffers(struct msm_vidc_inst *inst)
list_for_each_entry(binfo, &inst->registeredbufs.list, list) {
if (binfo->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
dprintk(VIDC_DBG,
- "%s: binfo = %p device_addr = %pa\n",
+ "%s: binfo = %pK device_addr = %pa\n",
__func__, binfo, &binfo->device_addr[0]);
buf_ref_put(inst, binfo);
}
@@ -4522,18 +4522,18 @@ int msm_comm_flush(struct msm_vidc_inst *inst, u32 flags)
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;
}
@@ -4551,7 +4551,7 @@ int msm_comm_flush(struct msm_vidc_inst *inst, u32 flags)
core->state == VIDC_CORE_INVALID ||
core->state == VIDC_CORE_UNINIT) {
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;
@@ -4748,7 +4748,7 @@ int msm_vidc_trigger_ssr(struct msm_vidc_core *core,
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;
@@ -4989,7 +4989,7 @@ int msm_comm_kill_session(struct msm_vidc_inst *inst)
msm_comm_generate_session_error(inst);
} 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);
@@ -5005,7 +5005,7 @@ struct msm_smem *msm_comm_smem_alloc(struct msm_vidc_inst *inst,
struct msm_smem *m = NULL;
if (!inst || !inst->core) {
- dprintk(VIDC_ERR, "%s: invalid inst: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s: invalid inst: %pK\n", __func__, inst);
return NULL;
}
m = msm_smem_alloc(inst->mem_client, size, align,
@@ -5017,7 +5017,7 @@ void msm_comm_smem_free(struct msm_vidc_inst *inst, struct msm_smem *mem)
{
if (!inst || !inst->core || !mem) {
dprintk(VIDC_ERR,
- "%s: invalid params: %p %p\n", __func__, inst, mem);
+ "%s: invalid params: %pK %pK\n", __func__, inst, mem);
return;
}
msm_smem_free(inst->mem_client, mem);
@@ -5028,7 +5028,7 @@ int msm_comm_smem_cache_operations(struct msm_vidc_inst *inst,
{
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);
@@ -5040,7 +5040,7 @@ struct msm_smem *msm_comm_smem_user_to_kernel(struct msm_vidc_inst *inst,
struct msm_smem *m = NULL;
if (!inst || !inst->core) {
- dprintk(VIDC_ERR, "%s: invalid inst: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s: invalid inst: %pK\n", __func__, inst);
return NULL;
}
@@ -5181,7 +5181,7 @@ int msm_vidc_comm_s_parm(struct msm_vidc_inst *inst, struct v4l2_streamparm *a)
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 * BIT(16);
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c b/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c
index fd93f7831777..c03f887be6f6 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -47,7 +47,7 @@ static inline int msm_dcvs_count_active_instances(struct msm_vidc_core *core)
struct msm_vidc_inst *inst = NULL;
if (!core) {
- dprintk(VIDC_ERR, "%s: Invalid args: %p\n", __func__, core);
+ dprintk(VIDC_ERR, "%s: Invalid args: %pK\n", __func__, core);
return -EINVAL;
}
@@ -95,7 +95,7 @@ static void msm_dcvs_update_dcvs_params(int idx, struct msm_vidc_inst *inst)
struct dcvs_table *table = NULL;
if (!inst || !inst->core) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, inst);
return;
}
@@ -160,7 +160,7 @@ static void msm_dcvs_dec_check_and_scale_clocks(struct msm_vidc_inst *inst)
void msm_dcvs_check_and_scale_clocks(struct msm_vidc_inst *inst, bool is_etb)
{
if (!inst) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, inst);
return;
}
@@ -216,7 +216,7 @@ void msm_dcvs_init_load(struct msm_vidc_inst *inst)
dprintk(VIDC_DBG, "Init DCVS Load\n");
if (!inst || !inst->core) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, inst);
return;
}
@@ -289,7 +289,7 @@ void msm_dcvs_init(struct msm_vidc_inst *inst)
dprintk(VIDC_DBG, "Init DCVS Struct\n");
if (!inst) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, inst);
return;
}
@@ -306,7 +306,7 @@ void msm_dcvs_monitor_buffer(struct msm_vidc_inst *inst)
struct hal_buffer_requirements *output_buf_req;
if (!inst) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, inst);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, inst);
return;
}
dcvs = &inst->dcvs;
@@ -315,7 +315,7 @@ void msm_dcvs_monitor_buffer(struct msm_vidc_inst *inst)
output_buf_req = get_buff_req_buffer(inst,
msm_comm_get_hal_output_buffer(inst));
if (!output_buf_req) {
- dprintk(VIDC_ERR, "%s : Get output buffer req failed %p\n",
+ dprintk(VIDC_ERR, "%s : Get output buffer req failed %pK\n",
__func__, inst);
mutex_unlock(&inst->lock);
return;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_debug.c b/drivers/media/platform/msm/vidc/msm_vidc_debug.c
index 1928327b60db..d3027c08d24e 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_debug.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_debug.c
@@ -81,13 +81,13 @@ static ssize_t core_info_read(struct file *file, char __user *buf,
int i = 0, rc = 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: %p\n", core->id, core);
+ write_str(&dbg_buf, "CORE %d: %pK\n", core->id, core);
write_str(&dbg_buf, "===============================\n");
write_str(&dbg_buf, "Core state: %d\n", core->state);
rc = call_hfi_op(hdev, get_fw_info, hdev->hfi_device_data, &fw_info);
@@ -157,7 +157,7 @@ struct dentry *msm_vidc_debugfs_init_drv(void)
struct dentry *f = debugfs_create_##__type(__name, S_IRUGO | S_IWUSR, \
dir, __value); \
if (IS_ERR_OR_NULL(f)) { \
- dprintk(VIDC_ERR, "Failed creating debugfs file '%pd/%s'\n", \
+ dprintk(VIDC_ERR, "Failed creating debugfs file '%pKd/%s'\n", \
dir, __name); \
f = NULL; \
} \
@@ -206,7 +206,7 @@ struct dentry *msm_vidc_debugfs_init_core(struct msm_vidc_core *core,
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;
}
@@ -269,16 +269,17 @@ static ssize_t inst_info_read(struct file *file, char __user *buf,
{
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, inst %pK\n", inst);
return 0;
}
INIT_DBG_BUF(dbg_buf);
write_str(&dbg_buf, "===============================\n");
- write_str(&dbg_buf, "INSTANCE: %p (%s)\n", inst,
+ write_str(&dbg_buf, "INSTANCE: %pK (%s)\n", inst,
inst->session_type == MSM_VIDC_ENCODER ? "Encoder" : "Decoder");
write_str(&dbg_buf, "===============================\n");
- write_str(&dbg_buf, "core: %p\n", inst->core);
+ write_str(&dbg_buf, "core: %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);
@@ -345,10 +346,10 @@ struct dentry *msm_vidc_debugfs_init_inst(struct msm_vidc_inst *inst,
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/msm_vidc_res_parse.c b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
index 240dc0caf94d..1bdc5bf2c93d 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
@@ -1221,7 +1221,7 @@ static int msm_vidc_setup_context_bank(struct context_bank_info *cb,
dprintk(VIDC_DBG, "Attached %s and created mapping\n", dev_name(dev));
dprintk(VIDC_DBG,
- "Context bank name:%s, buffer_type: %#x, is_secure: %d, address range start: %#x, size: %#x, dev: %p, mapping: %p",
+ "Context bank name:%s, buffer_type: %#x, is_secure: %d, address range start: %#x, size: %#x, dev: %pK, mapping: %pK",
cb->name, cb->buffer_type, cb->is_secure, cb->addr_range.start,
cb->addr_range.size, cb->dev, cb->mapping);
@@ -1245,7 +1245,7 @@ int msm_vidc_smmu_fault_handler(struct iommu_domain *domain,
enum vidc_ports port;
if (!domain || !core) {
- dprintk(VIDC_ERR, "%s - invalid param %p %p\n",
+ dprintk(VIDC_ERR, "%s - invalid param %pK %pK\n",
__func__, domain, core);
return -EINVAL;
}
@@ -1267,7 +1267,7 @@ int msm_vidc_smmu_fault_handler(struct iommu_domain *domain,
!inst->bit_depth ? "8" : "10");
dprintk(VIDC_ERR,
- "---Buffer details for inst: %p of type: %d---\n",
+ "---Buffer details for inst: %pK of type: %d---\n",
inst, inst->session_type);
mutex_lock(&inst->registeredbufs.lock);
dprintk(VIDC_ERR, "registered buffer list:\n");
diff --git a/drivers/media/platform/msm/vidc/venus_boot.c b/drivers/media/platform/msm/vidc/venus_boot.c
index 6e881ab10275..925c97a5b6e8 100644
--- a/drivers/media/platform/msm/vidc/venus_boot.c
+++ b/drivers/media/platform/msm/vidc/venus_boot.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -161,7 +161,7 @@ static int venus_setup_cb(struct device *dev,
return -ENODEV;
}
dprintk(VIDC_DBG,
- "%s Attached device %p and created mapping %p for %s\n",
+ "%s Attached device %pK and created mapping %pK for %s\n",
__func__, dev, venus_data->mapping, dev_name(dev));
return 0;
}
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c
index 217d6a48d17a..5a51fbcf9318 100644
--- a/drivers/media/platform/msm/vidc/venus_hfi.c
+++ b/drivers/media/platform/msm/vidc/venus_hfi.c
@@ -341,7 +341,7 @@ static int __write_queue(struct vidc_iface_q_info *qinfo, u8 *packet,
}
if (msm_vidc_debug & VIDC_PKT) {
- dprintk(VIDC_PKT, "%s: %p\n", __func__, qinfo);
+ dprintk(VIDC_PKT, "%s: %pK\n", __func__, qinfo);
__dump_packet(packet);
}
@@ -547,7 +547,7 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet,
*pb_tx_req_is_set = (1 == queue->qhdr_tx_req) ? 1 : 0;
if (msm_vidc_debug & VIDC_PKT) {
- dprintk(VIDC_PKT, "%s: %p\n", __func__, qinfo);
+ dprintk(VIDC_PKT, "%s: %pK\n", __func__, qinfo);
__dump_packet(packet);
}
@@ -574,7 +574,7 @@ static int __smem_alloc(struct venus_hfi_device *dev,
goto fail_smem_alloc;
}
- dprintk(VIDC_DBG, "__smem_alloc: ptr = %p, size = %d\n",
+ dprintk(VIDC_DBG, "__smem_alloc: ptr = %pK, size = %d\n",
alloc->kvaddr, size);
rc = msm_smem_cache_operations(dev->hal_client, alloc,
SMEM_CACHE_CLEAN);
@@ -595,7 +595,7 @@ fail_smem_alloc:
static void __smem_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;
}
@@ -608,7 +608,7 @@ static void __write_register(struct venus_hfi_device *device,
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;
}
@@ -622,7 +622,7 @@ static void __write_register(struct venus_hfi_device *device,
}
base_addr = device->hal_data->register_base;
- dprintk(VIDC_DBG, "Base addr: %p, written to: %#x, Value: %#x...\n",
+ dprintk(VIDC_DBG, "Base addr: %pK, written to: %#x, Value: %#x...\n",
base_addr, hwiosymaddr, value);
base_addr += hwiosymaddr;
writel_relaxed(value, base_addr);
@@ -634,7 +634,7 @@ static int __read_register(struct venus_hfi_device *device, u32 reg)
int rc = 0;
u8 *base_addr;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
@@ -651,7 +651,7 @@ static int __read_register(struct venus_hfi_device *device, u32 reg)
rc = readl_relaxed(base_addr + reg);
rmb();
- dprintk(VIDC_DBG, "Base addr: %p, read from: %#x, value: %#x...\n",
+ dprintk(VIDC_DBG, "Base addr: %pK, read from: %#x, value: %#x...\n",
base_addr, reg, rc);
return rc;
@@ -699,7 +699,7 @@ static void __iommu_detach(struct venus_hfi_device *device)
struct context_bank_info *cb;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid paramter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK\n", device);
return;
}
@@ -1025,7 +1025,7 @@ static int __set_imem(struct venus_hfi_device *device, struct imem *imem)
int rc = 0;
if (!device || !device->res || !imem) {
- dprintk(VIDC_ERR, "Invalid params, core: %p, imem: %p\n",
+ dprintk(VIDC_ERR, "Invalid params, core: %pK, imem: %pK\n",
device, imem);
return -EINVAL;
}
@@ -1271,7 +1271,7 @@ static unsigned long venus_hfi_get_core_clock_rate(void *dev, bool actual_rate)
struct clock_info *vc;
if (!device) {
- dprintk(VIDC_ERR, "%s Invalid args: %p\n", __func__, device);
+ dprintk(VIDC_ERR, "%s Invalid args: %pK\n", __func__, device);
return -EINVAL;
}
@@ -1351,7 +1351,7 @@ static int __halt_axi(struct venus_hfi_device *device)
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;
}
@@ -1549,7 +1549,7 @@ static int venus_hfi_scale_clocks(void *dev, int load,
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;
}
@@ -2201,7 +2201,7 @@ static int venus_hfi_core_init(void *device)
goto err_core_init;
}
- dprintk(VIDC_DBG, "Dev_Virt: %pa, Reg_Virt: %p\n",
+ dprintk(VIDC_DBG, "Dev_Virt: %pa, Reg_Virt: %pK\n",
&dev->hal_data->firmware_base,
dev->hal_data->register_base);
@@ -2327,12 +2327,12 @@ static void __core_clear_interrupt(struct venus_hfi_device *device)
device->intr_status |= intr_status;
device->reg_count++;
dprintk(VIDC_DBG,
- "INTERRUPT for device: %p: times: %d interrupt_status: %d\n",
+ "INTERRUPT for device: %pK: times: %d interrupt_status: %d\n",
device, device->reg_count, intr_status);
} else {
device->spur_count++;
dprintk(VIDC_INFO,
- "SPURIOUS_INTR for device: %p: times: %d interrupt_status: %d\n",
+ "SPURIOUS_INTR for device: %pK: times: %d interrupt_status: %d\n",
device, device->spur_count, intr_status);
}
@@ -2490,7 +2490,7 @@ static void __set_default_sys_properties(struct venus_hfi_device *device)
static void __session_clean(struct hal_session *session)
{
- dprintk(VIDC_DBG, "deleted the session: %p\n", session);
+ dprintk(VIDC_DBG, "deleted the session: %pK\n", session);
list_del(&session->list);
/* Poison the session handle with zeros */
*session = (struct hal_session){ {0} };
@@ -3537,7 +3537,7 @@ static int __response_handler(struct venus_hfi_device *device)
(u32)(uintptr_t)*session_id);
if (!session) {
dprintk(VIDC_ERR,
- "Received a packet (%#x) for an unrecognized session (%p), discarding\n",
+ "Received a packet (%#x) for an unrecognized session (%pK), discarding\n",
info->response_type,
*session_id);
--packet_count;
@@ -3587,7 +3587,7 @@ static void venus_hfi_core_work_handler(struct work_struct *work)
}
if (!device->callback) {
- dprintk(VIDC_ERR, "No interrupt callback function: %p\n",
+ dprintk(VIDC_ERR, "No interrupt callback function: %pK\n",
device);
goto err_no_work;
}
@@ -3713,7 +3713,7 @@ static inline int __init_clocks(struct venus_hfi_device *device)
struct clock_info *cl = NULL;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
@@ -3757,7 +3757,7 @@ static inline void __disable_unprepare_clks(struct venus_hfi_device *device)
struct clock_info *cl;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return;
}
@@ -3774,7 +3774,7 @@ static inline int __prepare_enable_clks(struct venus_hfi_device *device)
struct clock_info *cl = NULL, *cl_fail = NULL;
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
@@ -4257,7 +4257,7 @@ static inline int __suspend(struct venus_hfi_device *device)
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
} else if (!device->power_enabled) {
dprintk(VIDC_DBG, "Power already disabled\n");
@@ -4289,7 +4289,7 @@ static inline int __resume(struct venus_hfi_device *device)
int rc = 0;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
} else if (device->power_enabled) {
dprintk(VIDC_DBG, "Power is already enabled\n");
@@ -4601,7 +4601,7 @@ static struct venus_hfi_device *__get_device(u32 device_id,
hfi_cmd_response_callback callback)
{
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;
}
@@ -4681,7 +4681,7 @@ int venus_hfi_initialize(struct hfi_device *hdev, u32 device_id,
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 16acc477479b..2dc892c7526b 100644
--- a/drivers/media/platform/msm/vidc/vidc_hfi.c
+++ b/drivers/media/platform/msm/vidc/vidc_hfi.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -55,7 +55,7 @@ void vidc_hfi_deinitialize(enum msm_vidc_hfi_type hfi_type,
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;
}
diff --git a/drivers/media/platform/msm/vidc/vmem/vmem.c b/drivers/media/platform/msm/vidc/vmem/vmem.c
index 165c5c0b4e4b..0f423b1ce17f 100644
--- a/drivers/media/platform/msm/vidc/vmem/vmem.c
+++ b/drivers/media/platform/msm/vidc/vmem/vmem.c
@@ -129,7 +129,7 @@ static inline u32 __readl(void * __iomem addr)
{
u32 value = 0;
- pr_debug("read %p ", addr);
+ pr_debug("read %pK ", addr);
value = readl_relaxed(addr);
pr_debug("-> %08x\n", value);
@@ -138,7 +138,7 @@ static inline u32 __readl(void * __iomem addr)
static inline void __writel(u32 val, void * __iomem addr)
{
- pr_debug("write %08x -> %p\n", val, addr);
+ pr_debug("write %08x -> %pK\n", val, addr);
writel_relaxed(val, addr);
/*
* Commit all writes via a mem barrier, as subsequent __readl()