soc: qcom: pil/ssr: fix issue with logs

The drivers uses %p to print the Kernel pointers.
Replace %p with appropriate format to stop revealing Kernel pointers.

Change-Id: Ic7d77e920ccfe779b979f732d506d59dcdfe885a
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
Satya Durga Srinivasu Prabhala 2016-12-16 10:01:58 -08:00
parent 3162449f7d
commit d8d33ef8da
3 changed files with 20 additions and 17 deletions

View file

@ -198,9 +198,9 @@ void pil_q6v5_halt_axi_port(struct pil_desc *pil, void __iomem *halt_base)
ret = readl_poll_timeout(halt_base + AXI_HALTACK,
status, status != 0, 50, HALT_ACK_TIMEOUT_US);
if (ret)
dev_warn(pil->dev, "Port %p halt timeout\n", halt_base);
dev_warn(pil->dev, "Port %pK halt timeout\n", halt_base);
else if (!readl_relaxed(halt_base + AXI_IDLE))
dev_warn(pil->dev, "Port %p halt failed\n", halt_base);
dev_warn(pil->dev, "Port %pK halt failed\n", halt_base);
/* Clear halt request (port will remain halted until reset) */
writel_relaxed(0, halt_base + AXI_HALTREQ);

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2011, 2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011, 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
@ -196,7 +196,7 @@ static int subsys_notifier_test_call(struct notifier_block *this,
switch (code) {
default:
printk(KERN_WARNING "%s: Notification %s from subsystem %p\n",
pr_warn("%s: Notification %s from subsystem %pK\n",
__func__, notif_to_string(code), data);
break;
@ -212,7 +212,7 @@ static struct notifier_block nb = {
static void subsys_notif_reg_test_notifier(const char *subsys_name)
{
void *handle = subsys_notif_register_notifier(subsys_name, &nb);
printk(KERN_WARNING "%s: Registered test notifier, handle=%p",
pr_warn("%s: Registered test notifier, handle=%pK",
__func__, handle);
}
#endif

View file

@ -598,10 +598,11 @@ static void subsystem_shutdown(struct subsys_device *dev, void *data)
{
const char *name = dev->desc->name;
pr_info("[%p]: Shutting down %s\n", current, name);
pr_info("[%s:%d]: Shutting down %s\n",
current->comm, current->pid, name);
if (dev->desc->shutdown(dev->desc, true) < 0)
panic("subsys-restart: [%p]: Failed to shutdown %s!",
current, name);
panic("subsys-restart: [%s:%d]: Failed to shutdown %s!",
current->comm, current->pid, name);
dev->crash_count++;
subsys_set_state(dev, SUBSYS_OFFLINE);
disable_all_irqs(dev);
@ -613,7 +614,8 @@ static void subsystem_ramdump(struct subsys_device *dev, void *data)
if (dev->desc->ramdump)
if (dev->desc->ramdump(is_ramdump_enabled(dev), dev->desc) < 0)
pr_warn("%s[%p]: Ramdump failed.\n", name, current);
pr_warn("%s[%s:%d]: Ramdump failed.\n",
name, current->comm, current->pid);
dev->do_ramdump_on_put = false;
}
@ -628,13 +630,14 @@ static void subsystem_powerup(struct subsys_device *dev, void *data)
const char *name = dev->desc->name;
int ret;
pr_info("[%p]: Powering up %s\n", current, name);
pr_info("[%s:%d]: Powering up %s\n", current->comm, current->pid, name);
init_completion(&dev->err_ready);
if (dev->desc->powerup(dev->desc) < 0) {
notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE,
NULL);
panic("[%p]: Powerup error: %s!", current, name);
panic("[%s:%d]: Powerup error: %s!",
current->comm, current->pid, name);
}
enable_all_irqs(dev);
@ -642,8 +645,8 @@ static void subsystem_powerup(struct subsys_device *dev, void *data)
if (ret) {
notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE,
NULL);
panic("[%p]: Timed out waiting for error ready: %s!",
current, name);
panic("[%s:%d]: Timed out waiting for error ready: %s!",
current->comm, current->pid, name);
}
subsys_set_state(dev, SUBSYS_ONLINE);
subsys_set_crash_status(dev, false);
@ -952,8 +955,8 @@ static void subsystem_restart_wq_func(struct work_struct *work)
*/
mutex_lock(&soc_order_reg_lock);
pr_debug("[%p]: Starting restart sequence for %s\n", current,
desc->name);
pr_debug("[%s:%d]: Starting restart sequence for %s\n",
current->comm, current->pid, desc->name);
notify_each_subsys_device(list, count, SUBSYS_BEFORE_SHUTDOWN, NULL);
for_each_subsys_device(list, count, NULL, subsystem_shutdown);
notify_each_subsys_device(list, count, SUBSYS_AFTER_SHUTDOWN, NULL);
@ -974,8 +977,8 @@ static void subsystem_restart_wq_func(struct work_struct *work)
for_each_subsys_device(list, count, NULL, subsystem_powerup);
notify_each_subsys_device(list, count, SUBSYS_AFTER_POWERUP, NULL);
pr_info("[%p]: Restart sequence for %s completed.\n",
current, desc->name);
pr_info("[%s:%d]: Restart sequence for %s completed.\n",
current->comm, current->pid, desc->name);
mutex_unlock(&soc_order_reg_lock);
mutex_unlock(&track->lock);