DivestOS/Patches/Linux_CVEs/CVE-2016-6748/ANY/1.patch
2017-10-29 22:14:37 -04:00

2159 lines
79 KiB
Diff

From be651d020b122a1ba9410d23ca4ebbe9f5598df6 Mon Sep 17 00:00:00 2001
From: Sanjay Singh <sisanj@codeaurora.org>
Date: Wed, 10 Aug 2016 12:40:58 +0530
Subject: 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: Sanjay Singh <sisanj@codeaurora.org>
---
.../media/platform/msm/vidc/hfi_packetization.c | 8 +-
.../media/platform/msm/vidc/hfi_response_handler.c | 48 +++----
drivers/media/platform/msm/vidc/msm_smem.c | 20 +--
drivers/media/platform/msm/vidc/msm_v4l2_vidc.c | 6 +-
drivers/media/platform/msm/vidc/msm_vdec.c | 40 +++---
drivers/media/platform/msm/vidc/msm_venc.c | 32 ++---
drivers/media/platform/msm/vidc/msm_vidc.c | 36 +++---
drivers/media/platform/msm/vidc/msm_vidc_common.c | 138 ++++++++++-----------
drivers/media/platform/msm/vidc/msm_vidc_dcvs.c | 14 +--
drivers/media/platform/msm/vidc/msm_vidc_debug.c | 18 +--
drivers/media/platform/msm/vidc/q6_hfi.c | 22 ++--
drivers/media/platform/msm/vidc/venus_hfi.c | 96 +++++++-------
drivers/media/platform/msm/vidc/vidc_hfi.c | 4 +-
drivers/media/platform/msm/vidc/vmem/vmem.c | 6 +-
14 files changed, 244 insertions(+), 244 deletions(-)
diff --git a/drivers/media/platform/msm/vidc/hfi_packetization.c b/drivers/media/platform/msm/vidc/hfi_packetization.c
index 06ac913..86239e2 100644
--- a/drivers/media/platform/msm/vidc/hfi_packetization.c
+++ b/drivers/media/platform/msm/vidc/hfi_packetization.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
@@ -1402,7 +1402,7 @@ int create_pkt_cmd_session_set_property(
break;
default:
dprintk(VIDC_ERR,
- "Invalid Rate control setting: 0x%p\n",
+ "Invalid Rate control setting: 0x%pK\n",
pdata);
break;
}
@@ -2084,7 +2084,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);
@@ -2097,7 +2097,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 e148f04..c315b6d 100644
--- a/drivers/media/platform/msm/vidc/hfi_response_handler.c
+++ b/drivers/media/platform/msm/vidc/hfi_response_handler.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
@@ -255,7 +255,7 @@ static void hfi_process_event_notify(msm_vidc_callback callback, u32 device_id,
hfi_process_sys_error(callback, device_id);
break;
case HFI_EVENT_SESSION_PROPERTY_CHANGED:
- dprintk(VIDC_INFO, "HFI_EVENT_SESSION_PROPERTY_CHANGED[%p]\n",
+ dprintk(VIDC_INFO, "HFI_EVENT_SESSION_PROPERTY_CHANGED[%pK]\n",
session);
break;
}
@@ -267,24 +267,24 @@ static void hfi_process_event_notify(msm_vidc_callback callback, u32 device_id,
switch (pkt->event_id) {
case HFI_EVENT_SESSION_ERROR:
- dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR[%p]\n", session);
+ dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR[%pK]\n", session);
hfi_process_session_error(callback, device_id, session, pkt);
break;
case HFI_EVENT_SESSION_SEQUENCE_CHANGED:
- dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED[%p]\n",
+ dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED[%pK]\n",
session);
hfi_process_sess_evt_seq_changed(callback, device_id,
session, pkt);
break;
case HFI_EVENT_RELEASE_BUFFER_REFERENCE:
- dprintk(VIDC_INFO, "HFI_EVENT_RELEASE_BUFFER_REFERENCE[%p]\n",
+ dprintk(VIDC_INFO, "HFI_EVENT_RELEASE_BUFFER_REFERENCE[%pK]\n",
session);
hfi_process_evt_release_buffer_ref(callback, device_id,
session, pkt);
break;
default:
dprintk(VIDC_WARN,
- "hal_process_event_notify: unknown_event_id[%p]\n",
+ "hal_process_event_notify: unknown_event_id[%pK]\n",
session);
break;
}
@@ -887,7 +887,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;
}
@@ -925,7 +925,7 @@ enum vidc_status hfi_process_sys_init_done_prop_read(
data_ptr = (u8 *) &pkt->rg_property_data[0];
num_properties = pkt->num_properties;
dprintk(VIDC_DBG,
- "%s: data_start %p, num_properties %#x\n",
+ "%s: data_start %pK, num_properties %#x\n",
__func__, data_ptr, num_properties);
bytes_read = hfi_fill_codec_info(data_ptr, sys_init_done);
@@ -955,7 +955,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;
}
@@ -986,7 +986,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;
}
@@ -1105,7 +1105,7 @@ static void hfi_process_session_prop_info(msm_vidc_callback callback,
struct buffer_requirements buff_req;
memset(&buff_req, 0, sizeof(struct buffer_requirements));
- dprintk(VIDC_DBG, "Received SESSION_PROPERTY_INFO[%p]\n", session);
+ dprintk(VIDC_DBG, "Received SESSION_PROPERTY_INFO[%pK]\n", session);
if (pkt->size < sizeof(struct hfi_msg_session_property_info_packet)) {
dprintk(VIDC_ERR,
@@ -1161,7 +1161,7 @@ static void hfi_process_session_init_done(
memset(&session_init_done, 0, sizeof(struct
vidc_hal_session_init_done));
- dprintk(VIDC_DBG, "RECEIVED: SESSION_INIT_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_INIT_DONE[%pK]\n", session);
if (sizeof(struct hfi_msg_sys_session_init_done_packet)
> pkt->size) {
@@ -1181,7 +1181,7 @@ static void hfi_process_session_init_done(
pkt, &session_init_done);
} else {
dprintk(VIDC_WARN,
- "Sess init failed: 0x%p, 0x%p\n",
+ "Sess init failed: 0x%pK, 0x%pK\n",
session->session_id, session);
}
cmd_done.size = sizeof(struct vidc_hal_session_init_done);
@@ -1193,7 +1193,7 @@ static void hfi_process_session_load_res_done(msm_vidc_callback callback,
struct hfi_msg_session_load_resources_done_packet *pkt)
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_LOAD_RESOURCES_DONE[%p]\n",
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_LOAD_RESOURCES_DONE[%pK]\n",
session);
if (sizeof(struct hfi_msg_session_load_resources_done_packet) !=
@@ -1218,7 +1218,7 @@ static void hfi_process_session_flush_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_FLUSH_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_FLUSH_DONE[%pK]\n", session);
if (sizeof(struct hfi_msg_session_flush_done_packet) != pkt->size) {
dprintk(VIDC_ERR,
@@ -1241,7 +1241,7 @@ static void hfi_process_session_etb_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_data_done data_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_ETB_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_ETB_DONE[%pK]\n", session);
if (!pkt || pkt->size <
sizeof(struct hfi_msg_session_empty_buffer_done_packet)) {
@@ -1282,7 +1282,7 @@ static void hfi_process_session_ftb_done(msm_vidc_callback callback,
return;
}
- dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE[%pK]\n", session);
if (is_decoder == 0) {
struct hfi_msg_session_fill_buffer_done_compressed_packet *pkt =
@@ -1382,7 +1382,7 @@ static void hfi_process_session_start_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_START_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_START_DONE[%pK]\n", session);
if (!pkt || pkt->size !=
sizeof(struct hfi_msg_session_start_done_packet)) {
@@ -1405,7 +1405,7 @@ static void hfi_process_session_stop_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_STOP_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_STOP_DONE[%pK]\n", session);
if (!pkt || pkt->size !=
sizeof(struct hfi_msg_session_stop_done_packet)) {
@@ -1428,7 +1428,7 @@ static void hfi_process_session_rel_res_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE[%p]\n",
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE[%pK]\n",
session);
if (!pkt || pkt->size !=
@@ -1459,7 +1459,7 @@ static void hfi_process_session_rel_buf_done(msm_vidc_callback callback,
pkt ? pkt->size : 0);
return;
}
- dprintk(VIDC_DBG, "RECEIVED:SESSION_RELEASE_BUFFER_DONE[%p]\n",
+ dprintk(VIDC_DBG, "RECEIVED:SESSION_RELEASE_BUFFER_DONE[%pK]\n",
session);
cmd_done.device_id = device_id;
@@ -1481,7 +1481,7 @@ static void hfi_process_session_end_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_END_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_END_DONE[%pK]\n", session);
if (!pkt || pkt->size !=
sizeof(struct hfi_msg_sys_session_end_done_packet)) {
@@ -1503,7 +1503,7 @@ static void hfi_process_session_abort_done(msm_vidc_callback callback,
{
struct msm_vidc_cb_cmd_done cmd_done = {0};
- dprintk(VIDC_DBG, "RECEIVED: SESSION_ABORT_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED: SESSION_ABORT_DONE[%pK]\n", session);
if (!pkt || pkt->size !=
sizeof(struct hfi_msg_sys_session_abort_done_packet)) {
@@ -1540,7 +1540,7 @@ static void hfi_process_session_get_seq_hdr_done(msm_vidc_callback callback,
__func__);
return;
}
- dprintk(VIDC_DBG, "RECEIVED:SESSION_GET_SEQ_HDR_DONE[%p]\n", session);
+ dprintk(VIDC_DBG, "RECEIVED:SESSION_GET_SEQ_HDR_DONE[%pK]\n", session);
data_done.device_id = device_id;
data_done.size = sizeof(struct msm_vidc_cb_data_done);
diff --git a/drivers/media/platform/msm/vidc/msm_smem.c b/drivers/media/platform/msm/vidc/msm_smem.c
index 47d3ca5..8ab44a1 100644
--- a/drivers/media/platform/msm/vidc/msm_smem.c
+++ b/drivers/media/platform/msm/vidc/msm_smem.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, 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
@@ -34,7 +34,7 @@ static int get_device_address(struct smem_client *smem_client,
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;
}
@@ -86,7 +86,7 @@ static void put_device_address(struct smem_client *smem_client,
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;
}
@@ -120,7 +120,7 @@ static int ion_user_to_kernel(struct smem_client *client, int fd, u32 offset,
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;
@@ -153,7 +153,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 = 0x%p, fd = %d, device_addr = 0x%pa, size = %zx, kvaddr = 0x%p, buffer_type = %d, flags = 0x%lx\n",
+ "%s: ion_handle = 0x%pK, fd = %d, device_addr = 0x%pa, size = %zx, kvaddr = 0x%pK, buffer_type = %d, flags = 0x%lx\n",
__func__, mem->smem_priv, fd, &mem->device_addr, mem->size,
mem->kvaddr, mem->buffer_type, mem->flags);
return rc;
@@ -199,7 +199,7 @@ static int alloc_ion_mem(struct smem_client *client, size_t size, u32 align,
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, %zx, %d, 0x%x\n",
+ "Failed to allocate shared memory = %pK, %zx, %d, 0x%x\n",
client, size, align, flags);
rc = -ENOMEM;
goto fail_shared_mem_alloc;
@@ -237,7 +237,7 @@ static int alloc_ion_mem(struct smem_client *client, size_t size, u32 align,
}
mem->size = size;
dprintk(VIDC_DBG,
- "%s: ion_handle = 0x%p, device_addr = 0x%pa, size = 0x%zx, kvaddr = 0x%p, buffer_type = 0x%x, flags = 0x%lx\n",
+ "%s: ion_handle = 0x%pK, device_addr = 0x%pa, size = 0x%zx, kvaddr = 0x%pK, buffer_type = 0x%x, flags = 0x%lx\n",
__func__, mem->smem_priv, &mem->device_addr,
mem->size, mem->kvaddr,
mem->buffer_type, mem->flags);
@@ -255,7 +255,7 @@ static void free_ion_mem(struct smem_client *client, struct msm_smem *mem)
int domain, partition, rc;
dprintk(VIDC_DBG,
- "%s: ion_handle = 0x%p, device_addr = 0x%pa, size = 0x%zx, kvaddr = 0x%p, buffer_type = 0x%x\n",
+ "%s: ion_handle = 0x%pK, device_addr = 0x%pa, size = 0x%zx, kvaddr = 0x%pK, buffer_type = 0x%x\n",
__func__, mem->smem_priv, &mem->device_addr,
mem->size, mem->kvaddr, mem->buffer_type);
rc = msm_smem_get_domain_partition((void *)client, mem->flags,
@@ -333,7 +333,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;
}
@@ -380,7 +380,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;
}
diff --git a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
index 309979c..c43c64c 100644
--- a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.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
@@ -307,7 +307,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;
}
@@ -696,7 +696,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;
}
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 c92d655..dd512ad 100644
--- a/drivers/media/platform/msm/vidc/msm_vdec.c
+++ b/drivers/media/platform/msm/vidc/msm_vdec.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
@@ -835,7 +835,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;
}
@@ -914,7 +914,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;
}
@@ -1007,7 +1007,7 @@ int msm_vdec_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);
@@ -1038,7 +1038,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;
}
@@ -1215,7 +1215,7 @@ int msm_vdec_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;
msm_dcvs_init_load(inst);
@@ -1381,7 +1381,7 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
if (!f || !inst || !inst->core || !inst->core->device) {
dprintk(VIDC_ERR,
- "%s: invalid parameters, format %p, inst %p\n",
+ "%s: invalid parameters, format %pK, inst %pK\n",
__func__, f, inst);
return -EINVAL;
}
@@ -1562,7 +1562,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));
@@ -1582,7 +1582,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) {
@@ -1640,7 +1640,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;
}
@@ -1829,7 +1829,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);
@@ -1866,7 +1866,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;
}
@@ -1876,7 +1876,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;
@@ -1909,7 +1909,7 @@ static int 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 -EINVAL;
}
inst = q->drv_priv;
@@ -1934,7 +1934,7 @@ static int 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);
return rc;
}
@@ -1992,7 +1992,7 @@ int msm_vdec_cmd(struct msm_vidc_inst *inst, struct v4l2_decoder_cmd *dec)
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);
@@ -2034,7 +2034,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[1];
@@ -2575,7 +2575,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE:
property_id = 0;
inst->operating_rate = ctrl->val;
- dprintk(VIDC_DBG, "inst(%p) operating rate changed to %d",
+ dprintk(VIDC_DBG, "inst(%pK) operating rate changed to %d",
inst, inst->operating_rate >> 16);
msm_comm_scale_clocks_and_bus(inst);
break;
@@ -2607,7 +2607,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;
}
@@ -2639,7 +2639,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 932c980..d3f176d 100644
--- a/drivers/media/platform/msm/vidc/msm_venc.c
+++ b/drivers/media/platform/msm/vidc/msm_venc.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
@@ -1520,7 +1520,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);
@@ -1547,7 +1547,7 @@ 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;
@@ -1574,7 +1574,7 @@ static int msm_venc_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 -EINVAL;
}
inst = q->drv_priv;
@@ -1595,7 +1595,7 @@ static int 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);
return rc;
}
@@ -2835,7 +2835,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE:
property_id = 0;
inst->operating_rate = ctrl->val;
- dprintk(VIDC_DBG, "inst(%p) operating rate changed to %d",
+ dprintk(VIDC_DBG, "inst(%pK) operating rate changed to %d",
inst, inst->operating_rate >> 16);
msm_comm_scale_clocks_and_bus(inst);
break;
@@ -3054,7 +3054,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;
}
@@ -3098,7 +3098,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[1];
@@ -3181,7 +3181,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));
@@ -3201,7 +3201,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) {
@@ -3275,7 +3275,7 @@ int msm_venc_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 * (0x1<<16);
@@ -3329,7 +3329,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;
}
@@ -3512,7 +3512,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;
}
@@ -3577,7 +3577,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);
@@ -3614,7 +3614,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;
}
@@ -3685,7 +3685,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 38ccaa3..8f4b6b6 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc.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
@@ -331,7 +331,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: 0x%pa buf_list: %p\n",
+ "Invalid input- device_addr: 0x%pa buf_list: %pK\n",
&device_addr, buf_list);
goto err_invalid_input;
}
@@ -487,7 +487,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) {
@@ -570,7 +570,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 = 0x%pa, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [MAP] binfo = %pK, handle[%d] = %pK, device_addr = 0x%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]);
@@ -593,7 +593,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;
}
@@ -623,7 +623,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 = 0x%pa, fd = %d, offset = %d, mapped = %d\n",
+ "%s: [UNMAP] binfo = %pK, handle[%d] = %pK, device_addr = 0x%pKa, 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]);
@@ -652,12 +652,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;
@@ -671,7 +671,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]);
@@ -694,7 +694,7 @@ 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;
}
@@ -702,7 +702,7 @@ int output_buffer_cache_invalidate(struct msm_vidc_inst *inst,
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;
}
@@ -780,7 +780,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);
}
}
@@ -862,7 +862,7 @@ int msm_vidc_free_buffers(void *instance, int buffer_type)
for (i = 0; i < bi->num_planes; i++) {
if (bi->handle[i] && bi->mapped[i]) {
dprintk(VIDC_DBG,
- "%s: binfo = 0x%p, handle[%d] = %p, device_addr = %pa, fd = %d, offset = %d, buffer_type 0x%x, mapped = %d\n",
+ "%s: binfo = 0x%pK, handle[%d] = %pK, device_addr = %pa, fd = %d, offset = %d, buffer_type 0x%x, mapped = %d\n",
__func__, bi, i, bi->handle[i],
&bi->device_addr[i], bi->fd[i],
bi->buff_off[i], bi->type,
@@ -1089,7 +1089,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;
}
@@ -1156,7 +1156,7 @@ void *msm_vidc_smem_get_client(void *instance)
struct msm_vidc_inst *inst = instance;
if (!inst || !inst->mem_client) {
- dprintk(VIDC_ERR, "%s: invalid instance or client = %p\n",
+ dprintk(VIDC_ERR, "%s: invalid instance or client = %pK\n",
__func__, inst);
return NULL;
}
@@ -1214,7 +1214,7 @@ static int setup_event_queue(void *inst,
struct msm_vidc_inst *vidc_inst = (struct msm_vidc_inst *)inst;
if (!inst || !pvdev) {
- dprintk(VIDC_ERR, "%s Invalid params inst %p pvdev %p\n",
+ dprintk(VIDC_ERR, "%s Invalid params inst %pK pvdev %pK\n",
__func__, inst, pvdev);
return -EINVAL;
}
@@ -1290,7 +1290,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);
@@ -1493,7 +1493,7 @@ int msm_vidc_close(void *instance)
msm_smem_delete_client(inst->mem_client);
- 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);
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c
index f001290..48192b3 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.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
@@ -159,7 +159,7 @@ int msm_comm_get_inst_load(struct msm_vidc_inst *inst,
if (!is_thumbnail_session(inst) && !is_realtime_session(inst) &&
(quirks & LOAD_CALC_IGNORE_NON_REALTIME_LOAD)) {
if (!inst->prop.fps) {
- dprintk(VIDC_INFO, "%s: instance:%p prop->fps is set 0\n", __func__, inst);
+ dprintk(VIDC_INFO, "%s: instance:%pK prop->fps is set 0\n", __func__, inst);
load = 0;
} else {
load = msm_comm_get_mbs_per_sec(inst) / inst->prop.fps;
@@ -167,7 +167,7 @@ int msm_comm_get_inst_load(struct msm_vidc_inst *inst,
}
dprintk(VIDC_DBG,
- "inst[%p]: load %d, wxh %dx%d, fps %d, operating_rate %d, flags 0x%x, quirks 0x%x\n",
+ "inst[%pK]: load %d, wxh %dx%d, fps %d, operating_rate %d, flags 0x%x, quirks 0x%x\n",
inst, load, inst->prop.width[OUTPUT_PORT],
inst->prop.height[OUTPUT_PORT], inst->prop.fps,
inst->operating_rate >> 16, inst->flags, quirks);
@@ -182,7 +182,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;
}
@@ -280,13 +280,13 @@ static int msm_comm_vote_bus(struct msm_vidc_core *core)
struct vidc_bus_vote_data *vote_data = 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;
}
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;
}
@@ -387,7 +387,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;
}
@@ -409,7 +409,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++) {
@@ -572,11 +572,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:
@@ -587,7 +587,7 @@ static int signal_session_msg_receipt(enum 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_SESSION_CMD_VALID(cmd)) {
@@ -628,7 +628,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;
}
@@ -689,7 +689,7 @@ static void handle_session_init_done(enum command_response cmd, void *data)
inst = response->session_id;
if (!inst || !inst->core || !inst->core->device) {
dprintk(VIDC_ERR,
- "%s: invalid parameters, inst %p\n", __func__, inst);
+ "%s: invalid parameters, inst %pK\n", __func__, inst);
return;
}
core = inst->core;
@@ -813,7 +813,7 @@ static void handle_event_change(enum command_response cmd, void *data)
struct buffer_info *binfo = NULL, *temp = NULL;
u32 *ptr = NULL;
- dprintk(VIDC_DBG, "%s - inst: %p buffer: 0x%pa extra: 0x%pa\n",
+ dprintk(VIDC_DBG, "%s - inst: %pK buffer: 0x%pa extra: 0x%pa\n",
__func__, inst, &event_notify->packet_buffer,
&event_notify->extra_data_buffer);
@@ -1149,7 +1149,7 @@ static void handle_sys_idle(enum command_response cmd, void *data)
goto exit;
}
- dprintk(VIDC_DBG, "SYS_IDLE received for core %p\n", core);
+ dprintk(VIDC_DBG, "SYS_IDLE received for core %pK\n", core);
if (core->resources.dynamic_bw_update) {
mutex_lock(&core->lock);
core->idle_stats.start_time = ktime_get();
@@ -1182,23 +1182,23 @@ static void handle_session_error(enum command_response cmd, void *data)
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, "Too many clients, rejecting %p", inst);
+ dprintk(VIDC_WARN, "Too many clients, rejecting %pK", inst);
event = V4L2_EVENT_MSM_VIDC_MAX_CLIENTS;
} else if (response->status == VIDC_ERR_NOT_SUPPORTED) {
- dprintk(VIDC_WARN, "Unsupported error for %p", inst);
+ dprintk(VIDC_WARN, "Unsupported error for %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;
}
@@ -1213,7 +1213,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;
@@ -1222,7 +1222,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);
}
@@ -1255,7 +1255,7 @@ static void handle_sys_error(enum 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;
mutex_lock(&core->lock);
@@ -1290,12 +1290,12 @@ void msm_comm_session_clean(struct msm_vidc_inst *inst)
hdev = inst->core->device;
if (hdev && inst->session) {
- dprintk(VIDC_DBG, "cleaning up instance: 0x%p\n", inst);
+ dprintk(VIDC_DBG, "cleaning up instance: 0x%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;
}
@@ -1696,7 +1696,7 @@ static void handle_fbd(enum 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->v4l2_planes[extra_idx].m.userptr,
vb->v4l2_planes[extra_idx].bytesused,
@@ -1838,13 +1838,13 @@ int msm_comm_scale_clocks_load(struct msm_vidc_core *core, int num_mbs_per_sec)
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;
}
@@ -1996,7 +1996,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);
rc = -EBUSY;
} else {
@@ -2023,7 +2023,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);
change_inst_state(inst, MSM_VIDC_CORE_INVALID);
@@ -2035,7 +2035,7 @@ static void handle_thermal_event(struct msm_vidc_core *core)
goto err_sess_abort;
}
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);
@@ -2290,7 +2290,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;
}
@@ -2311,7 +2311,7 @@ static int msm_comm_session_init(int flipped_state,
if (!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;
@@ -2405,7 +2405,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;
}
@@ -2441,7 +2441,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;
}
@@ -2471,7 +2471,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;
}
@@ -2501,7 +2501,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;
}
@@ -2533,7 +2533,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;
}
@@ -2939,16 +2939,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: 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);
@@ -3117,7 +3117,7 @@ int msm_comm_qbuf(struct vb2_buffer *vb)
int extra_idx = 0;
if (!vb || !vb->vb2_queue) {
- dprintk(VIDC_ERR, "%s: Invalid input: %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid input: %pK\n",
__func__, vb);
return -EINVAL;
}
@@ -3125,7 +3125,7 @@ int msm_comm_qbuf(struct vb2_buffer *vb)
q = vb->vb2_queue;
inst = q->drv_priv;
if (!inst) {
- dprintk(VIDC_ERR, "%s: Invalid input: %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid input: %pK\n",
__func__, vb);
return -EINVAL;
}
@@ -3133,12 +3133,12 @@ int msm_comm_qbuf(struct vb2_buffer *vb)
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, "%s: Invalid input: %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid input: %pK\n",
__func__, hdev);
return -EINVAL;
}
@@ -3292,7 +3292,7 @@ int msm_comm_qbuf(struct vb2_buffer *vb)
(void *) inst->session, &seq_hdr);
if (!rc) {
inst->vb2_seq_hdr = vb;
- dprintk(VIDC_DBG, "Seq_hdr: %p\n",
+ dprintk(VIDC_DBG, "Seq_hdr: %pK\n",
inst->vb2_seq_hdr);
}
atomic_dec(&inst->seq_hdr_reqs);
@@ -3406,7 +3406,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(SESSION_PROPERTY_INFO));
inst->state = MSM_VIDC_CORE_INVALID;
@@ -3444,18 +3444,18 @@ 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;
}
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);
@@ -3551,18 +3551,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;
}
@@ -3639,18 +3639,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;
}
@@ -3699,7 +3699,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;
}
@@ -3913,7 +3913,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 = 0x%pa\n",
+ "%s: binfo = %pK device_addr = 0x%pa\n",
__func__, binfo, &binfo->device_addr[0]);
buf_ref_put(inst, binfo);
}
@@ -3933,18 +3933,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;
}
@@ -3961,7 +3961,7 @@ int msm_comm_flush(struct msm_vidc_inst *inst, u32 flags)
core->state == VIDC_CORE_UNINIT ||
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;
@@ -4153,7 +4153,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;
@@ -4389,7 +4389,7 @@ int msm_comm_kill_session(struct msm_vidc_inst *inst)
change_inst_state(inst, MSM_VIDC_CLOSE_DONE);
} 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);
@@ -4421,7 +4421,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;
}
mutex_lock(&inst->core->lock);
@@ -4439,7 +4439,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;
}
@@ -4458,7 +4458,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);
@@ -4470,7 +4470,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;
}
@@ -4496,7 +4496,7 @@ int msm_comm_smem_get_domain_partition(struct msm_vidc_inst *inst,
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_dcvs.c b/drivers/media/platform/msm/vidc/msm_vidc_dcvs.c
index 708b44a..231ec66 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 - 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
@@ -40,7 +40,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;
}
@@ -116,7 +116,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;
}
@@ -168,7 +168,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;
}
@@ -217,7 +217,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;
}
@@ -234,7 +234,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;
@@ -243,7 +243,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 c422ed7..5cf5e81 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_debug.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_debug.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
@@ -76,13 +76,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: 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, "Core state: %d\n", core->state);
rc = call_hfi_op(hdev, get_fw_info, hdev->hfi_device_data, &fw_info);
@@ -242,7 +242,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;
}
@@ -306,15 +306,15 @@ 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, 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);
@@ -381,10 +381,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/q6_hfi.c b/drivers/media/platform/msm/vidc/q6_hfi.c
index 10f4baa..31f6263 100644
--- a/drivers/media/platform/msm/vidc/q6_hfi.c
+++ b/drivers/media/platform/msm/vidc/q6_hfi.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-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
@@ -202,7 +202,7 @@ static int q6_hfi_register_iommu_domains(struct q6_hfi_device *device)
struct iommu_info *iommu_map;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK\n", device);
return -EINVAL;
}
@@ -220,7 +220,7 @@ static int q6_hfi_register_iommu_domains(struct q6_hfi_device *device)
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\n",
+ "Failed to get domain data for group %pK\n",
iommu_map->group);
rc = -EINVAL;
goto fail_group;
@@ -228,7 +228,7 @@ static int q6_hfi_register_iommu_domains(struct q6_hfi_device *device)
iommu_map->domain = msm_find_domain_no(domain);
if (iommu_map->domain < 0) {
dprintk(VIDC_ERR,
- "Failed to get domain index for domain %p\n",
+ "Failed to get domain index for domain %pK\n",
domain);
rc = -EINVAL;
goto fail_group;
@@ -254,7 +254,7 @@ static void q6_hfi_deregister_iommu_domains(struct q6_hfi_device *device)
int i = 0;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK\n", device);
return;
}
@@ -347,7 +347,7 @@ static void *q6_hfi_get_device(u32 device_id,
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;
}
@@ -663,7 +663,7 @@ static int q6_hfi_session_clean(void *session)
return -EINVAL;
}
sess_close = session;
- dprintk(VIDC_DBG, "deleted the session: 0x%p\n",
+ dprintk(VIDC_DBG, "deleted the session: 0x%pK\n",
sess_close->session_id);
mutex_lock(&((struct q6_hfi_device *)
sess_close->device)->session_lock);
@@ -1207,7 +1207,7 @@ static int q6_hfi_iommu_attach(struct q6_hfi_device *device)
struct iommu_info *iommu_map;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK\n", device);
return -EINVAL;
}
@@ -1222,7 +1222,7 @@ static int q6_hfi_iommu_attach(struct q6_hfi_device *device)
rc = PTR_ERR(domain) ?: -EINVAL;
break;
}
- dprintk(VIDC_DBG, "Attaching domain(id:%d) %p to group %p\n",
+ dprintk(VIDC_DBG, "Attaching domain(id:%d) %pK to group %pK\n",
iommu_map->domain, domain, group);
rc = iommu_attach_group(domain, group);
if (rc) {
@@ -1253,7 +1253,7 @@ static void q6_hfi_iommu_detach(struct q6_hfi_device *device)
int i;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid parameter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid parameter: %pK\n", device);
return;
}
@@ -1382,7 +1382,7 @@ int q6_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_hfi_init;
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c
index 76ad1bc..0015c84 100644
--- a/drivers/media/platform/msm/vidc/venus_hfi.c
+++ b/drivers/media/platform/msm/vidc/venus_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
@@ -370,7 +370,7 @@ static int venus_hfi_write_queue(void *info, u8 *packet, u32 *rx_req_is_set)
}
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);
}
@@ -580,7 +580,7 @@ static int venus_hfi_read_queue(void *info, u8 *packet, u32 *pb_tx_req_is_set)
if ((msm_vidc_debug & VIDC_PKT) &&
(queue->qhdr_type & HFI_Q_ID_CTRL_TO_HOST_MSG_Q)) {
- dprintk(VIDC_PKT, "%s: %p\n", __func__, qinfo);
+ dprintk(VIDC_PKT, "%s: %pK\n", __func__, qinfo);
venus_hfi_dump_packet(packet);
}
@@ -611,7 +611,7 @@ static int venus_hfi_alloc(struct venus_hfi_device *dev, void *mem,
rc = -ENOMEM;
goto fail_smem_alloc;
}
- dprintk(VIDC_DBG, "venus_hfi_alloc: ptr = %p, size = %d\n",
+ dprintk(VIDC_DBG, "venus_hfi_alloc: ptr = %pK, size = %d\n",
alloc->kvaddr, size);
rc = msm_smem_cache_operations(dev->hal_client, alloc,
SMEM_CACHE_CLEAN);
@@ -631,7 +631,7 @@ fail_smem_alloc:
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;
}
@@ -647,7 +647,7 @@ static void venus_hfi_write_register(
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;
}
if (device->clk_state != ENABLED_PREPARED) {
@@ -657,7 +657,7 @@ static void venus_hfi_write_register(
}
base_addr = device->hal_data->register_base;
- dprintk(VIDC_DBG, "Base addr: 0x%p, written to: 0x%x, Value: 0x%x...\n",
+ dprintk(VIDC_DBG, "Base addr: 0x%pK, written to: 0x%x, Value: 0x%x...\n",
base_addr, hwiosymaddr, value);
base_addr += hwiosymaddr;
writel_relaxed(value, base_addr);
@@ -669,7 +669,7 @@ static int venus_hfi_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;
}
if (device->clk_state != ENABLED_PREPARED) {
@@ -681,7 +681,7 @@ static int venus_hfi_read_register(struct venus_hfi_device *device, u32 reg)
rc = readl_relaxed(base_addr + reg);
rmb();
- dprintk(VIDC_DBG, "Base addr: 0x%p, read from: 0x%x, value: 0x%x...\n",
+ dprintk(VIDC_DBG, "Base addr: 0x%pK, read from: 0x%x, value: 0x%x...\n",
base_addr, reg, rc);
return rc;
@@ -783,7 +783,7 @@ static void venus_hfi_iommu_detach(struct venus_hfi_device *device)
int i;
if (!device || !device->res) {
- dprintk(VIDC_ERR, "Invalid paramter: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid paramter: %pK\n", device);
return;
}
@@ -1209,7 +1209,7 @@ static int __alloc_ocmem(struct venus_hfi_device *device)
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;
}
@@ -1244,7 +1244,7 @@ static int __free_ocmem(struct venus_hfi_device *device)
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;
}
@@ -1268,14 +1268,14 @@ static int __set_ocmem(struct venus_hfi_device *device, bool locked)
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;
}
@@ -1304,7 +1304,7 @@ static int __unset_ocmem(struct venus_hfi_device *device)
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;
@@ -1335,7 +1335,7 @@ static int __alloc_set_ocmem(struct venus_hfi_device *device, bool locked)
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;
}
@@ -1375,7 +1375,7 @@ static int __unset_free_ocmem(struct venus_hfi_device *device)
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;
}
@@ -1551,7 +1551,7 @@ static unsigned long venus_hfi_get_core_clock_rate(void *dev)
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;
}
@@ -1607,7 +1607,7 @@ static int venus_hfi_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;
}
/*
@@ -1642,7 +1642,7 @@ static inline int venus_hfi_power_off(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;
}
if (!device->power_enabled) {
@@ -1709,7 +1709,7 @@ static inline int venus_hfi_power_on(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;
}
if (device->power_enabled)
@@ -1825,7 +1825,7 @@ static int venus_hfi_power_enable(void *dev)
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;
}
mutex_lock(&device->write_lock);
@@ -1845,7 +1845,7 @@ static int venus_hfi_regulator_set_voltage(
struct regulator_info *rinfo = NULL;
if (!device || !cv_info) {
- dprintk(VIDC_WARN, "%s: invalid args %p %p\n",
+ dprintk(VIDC_WARN, "%s: invalid args %pK %pK\n",
__func__, device, cv_info);
return -EINVAL;
}
@@ -1893,7 +1893,7 @@ static int venus_hfi_scale_regulators(struct venus_hfi_device *device,
bool matches = false;
if (!device || !data) {
- dprintk(VIDC_ERR, "%s: Invalid args %p, %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid args %pK, %pK\n",
__func__, device, data);
return -EINVAL;
}
@@ -1968,7 +1968,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;
}
@@ -2566,7 +2566,7 @@ static int venus_hfi_core_init(void *device)
goto err_core_init;
}
- dprintk(VIDC_DBG, "Dev_Virt: 0x%pa, Reg_Virt: 0x%p\n",
+ dprintk(VIDC_DBG, "Dev_Virt: 0x%pa, Reg_Virt: 0x%pK\n",
&dev->hal_data->firmware_base,
dev->hal_data->register_base);
@@ -2718,12 +2718,12 @@ static void venus_hfi_core_clear_interrupt(struct venus_hfi_device *device)
device->intr_status |= intr_status;
device->reg_count++;
dprintk(VIDC_DBG,
- "INTERRUPT for device: 0x%p: times: %d interrupt_status: %d\n",
+ "INTERRUPT for device: 0x%pK: times: %d interrupt_status: %d\n",
device, device->reg_count, intr_status);
} else {
device->spur_count++;
dprintk(VIDC_INFO,
- "SPURIOUS_INTR for device: 0x%p: times: %d interrupt_status: %d\n",
+ "SPURIOUS_INTR for device: 0x%pK: times: %d interrupt_status: %d\n",
device, device->spur_count, intr_status);
}
@@ -2876,7 +2876,7 @@ static int venus_hfi_session_clean(void *session)
sess_close = session;
device = sess_close->device;
venus_hfi_flush_debug_queue(sess_close->device, NULL);
- dprintk(VIDC_DBG, "deleted the session: 0x%p\n",
+ dprintk(VIDC_DBG, "deleted the session: 0x%pK\n",
sess_close);
mutex_lock(&device->session_lock);
list_del(&sess_close->list);
@@ -2914,7 +2914,7 @@ static void *venus_hfi_session_init(void *device, void *session_id,
new_session->codec = codec_type;
new_session->domain = session_type;
dprintk(VIDC_DBG,
- "%s: inst %p, session %p, codec 0x%x, domain 0x%x\n",
+ "%s: inst %pK, session %pK, codec 0x%x, domain 0x%x\n",
__func__, session_id, new_session,
new_session->codec, new_session->domain);
@@ -2992,7 +2992,7 @@ static int venus_hfi_session_abort(void *sess)
struct hal_session *session;
session = sess;
if (!session || !session->device) {
- dprintk(VIDC_ERR, "%s: Invalid Params %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid Params %pK\n",
__func__, session);
return -EINVAL;
}
@@ -3012,7 +3012,7 @@ static int venus_hfi_session_set_buffers(void *sess,
struct venus_hfi_device *device;
if (!session || !session->device || !buffer_info) {
- dprintk(VIDC_ERR, "%s: Invalid Params, %p %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid Params, %pK %pK\n",
__func__, session, buffer_info);
return -EINVAL;
}
@@ -3047,7 +3047,7 @@ static int venus_hfi_session_release_buffers(void *sess,
struct venus_hfi_device *device;
if (!session || !session->device || !buffer_info) {
- dprintk(VIDC_ERR, "%s: Invalid Params %p, %p\n",
+ dprintk(VIDC_ERR, "%s: Invalid Params %pK, %pK\n",
__func__, session, buffer_info);
return -EINVAL;
}
@@ -3738,7 +3738,7 @@ static void venus_hfi_response_handler(struct venus_hfi_device *device)
}
venus_hfi_flush_debug_queue(device, packet);
} else {
- dprintk(VIDC_DBG, "device (%p) is in deinit state\n", device);
+ dprintk(VIDC_DBG, "device (%pK) is in deinit state\n", device);
}
kfree(packet);
}
@@ -3750,7 +3750,7 @@ static void venus_hfi_core_work_handler(struct work_struct *work)
dprintk(VIDC_INFO, "GOT INTERRUPT\n");
if (!device->callback) {
- dprintk(VIDC_ERR, "No interrupt callback function: %p\n",
+ dprintk(VIDC_ERR, "No interrupt callback function: %pK\n",
device);
return;
}
@@ -3850,7 +3850,7 @@ static inline int venus_hfi_init_clocks(struct msm_vidc_platform_resources *res,
struct clock_info *cl = NULL;
if (!res || !device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return -EINVAL;
}
@@ -3921,7 +3921,7 @@ static inline void venus_hfi_disable_unprepare_clks(
struct clock_info *cl;
if (!device) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", device);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", device);
return;
}
@@ -3957,7 +3957,7 @@ static inline int venus_hfi_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;
}
@@ -4026,7 +4026,7 @@ static int venus_hfi_register_iommu_domains(struct venus_hfi_device *device,
domain = iommu_group_get_iommudata(iommu_map->group);
if (!domain) {
dprintk(VIDC_ERR,
- "Failed to get domain data for group %p\n",
+ "Failed to get domain data for group %pK\n",
iommu_map->group);
rc = -EINVAL;
goto fail_group;
@@ -4034,7 +4034,7 @@ static int venus_hfi_register_iommu_domains(struct venus_hfi_device *device,
iommu_map->domain = msm_find_domain_no(domain);
if (iommu_map->domain < 0) {
dprintk(VIDC_ERR,
- "Failed to get domain index for domain %p\n",
+ "Failed to get domain index for domain %pK\n",
domain);
rc = -EINVAL;
goto fail_group;
@@ -4180,7 +4180,7 @@ static int venus_hfi_init_resources(struct venus_hfi_device *device,
device->res = res;
if (!res) {
- dprintk(VIDC_ERR, "Invalid params: %p\n", res);
+ dprintk(VIDC_ERR, "Invalid params: %pK\n", res);
return -ENODEV;
}
@@ -4237,7 +4237,7 @@ static int venus_hfi_iommu_get_domain_partition(void *dev, u32 flags,
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;
}
@@ -4262,7 +4262,7 @@ static int protect_cp_mem(struct venus_hfi_device *device)
iommu_group_set = &device->res->iommu_group_set;
if (!iommu_group_set) {
- dprintk(VIDC_ERR, "invalid params: %p\n", iommu_group_set);
+ dprintk(VIDC_ERR, "invalid params: %pK\n", iommu_group_set);
return -EINVAL;
}
@@ -4430,7 +4430,7 @@ static int venus_hfi_load_fw(void *dev)
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;
}
@@ -4520,7 +4520,7 @@ static void venus_hfi_unload_fw(void *dev)
{
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;
}
@@ -4556,7 +4556,7 @@ static int venus_hfi_get_fw_info(void *dev, struct hal_fw_info *fw_info)
if (!device || !fw_info) {
dprintk(VIDC_ERR,
- "%s Invalid paramter: device = %p fw_info = %p\n",
+ "%s Invalid paramter: device = %pK fw_info = %pK\n",
__func__, device, fw_info);
return -EINVAL;
}
@@ -4745,7 +4745,7 @@ static void *venus_hfi_get_device(u32 device_id,
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;
}
@@ -4845,7 +4845,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 ef0de37..193b42f 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-2013, 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
@@ -61,7 +61,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 81e5b08..fb733fb 100644
--- a/drivers/media/platform/msm/vidc/vmem/vmem.c
+++ b/drivers/media/platform/msm/vidc/vmem/vmem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 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
@@ -115,7 +115,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);
@@ -124,7 +124,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()
--
cgit v1.1