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, ret = readl_poll_timeout(halt_base + AXI_HALTACK,
status, status != 0, 50, HALT_ACK_TIMEOUT_US); status, status != 0, 50, HALT_ACK_TIMEOUT_US);
if (ret) 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)) 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) */ /* Clear halt request (port will remain halted until reset) */
writel_relaxed(0, halt_base + AXI_HALTREQ); 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 * 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 * 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) { switch (code) {
default: 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); __func__, notif_to_string(code), data);
break; break;
@ -212,7 +212,7 @@ static struct notifier_block nb = {
static void subsys_notif_reg_test_notifier(const char *subsys_name) static void subsys_notif_reg_test_notifier(const char *subsys_name)
{ {
void *handle = subsys_notif_register_notifier(subsys_name, &nb); 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); __func__, handle);
} }
#endif #endif

View file

@ -598,10 +598,11 @@ static void subsystem_shutdown(struct subsys_device *dev, void *data)
{ {
const char *name = dev->desc->name; 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) if (dev->desc->shutdown(dev->desc, true) < 0)
panic("subsys-restart: [%p]: Failed to shutdown %s!", panic("subsys-restart: [%s:%d]: Failed to shutdown %s!",
current, name); current->comm, current->pid, name);
dev->crash_count++; dev->crash_count++;
subsys_set_state(dev, SUBSYS_OFFLINE); subsys_set_state(dev, SUBSYS_OFFLINE);
disable_all_irqs(dev); 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)
if (dev->desc->ramdump(is_ramdump_enabled(dev), dev->desc) < 0) 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; 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; const char *name = dev->desc->name;
int ret; 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); init_completion(&dev->err_ready);
if (dev->desc->powerup(dev->desc) < 0) { if (dev->desc->powerup(dev->desc) < 0) {
notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE, notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE,
NULL); NULL);
panic("[%p]: Powerup error: %s!", current, name); panic("[%s:%d]: Powerup error: %s!",
current->comm, current->pid, name);
} }
enable_all_irqs(dev); enable_all_irqs(dev);
@ -642,8 +645,8 @@ static void subsystem_powerup(struct subsys_device *dev, void *data)
if (ret) { if (ret) {
notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE, notify_each_subsys_device(&dev, 1, SUBSYS_POWERUP_FAILURE,
NULL); NULL);
panic("[%p]: Timed out waiting for error ready: %s!", panic("[%s:%d]: Timed out waiting for error ready: %s!",
current, name); current->comm, current->pid, name);
} }
subsys_set_state(dev, SUBSYS_ONLINE); subsys_set_state(dev, SUBSYS_ONLINE);
subsys_set_crash_status(dev, false); 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); mutex_lock(&soc_order_reg_lock);
pr_debug("[%p]: Starting restart sequence for %s\n", current, pr_debug("[%s:%d]: Starting restart sequence for %s\n",
desc->name); current->comm, current->pid, desc->name);
notify_each_subsys_device(list, count, SUBSYS_BEFORE_SHUTDOWN, NULL); notify_each_subsys_device(list, count, SUBSYS_BEFORE_SHUTDOWN, NULL);
for_each_subsys_device(list, count, NULL, subsystem_shutdown); for_each_subsys_device(list, count, NULL, subsystem_shutdown);
notify_each_subsys_device(list, count, SUBSYS_AFTER_SHUTDOWN, NULL); 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); for_each_subsys_device(list, count, NULL, subsystem_powerup);
notify_each_subsys_device(list, count, SUBSYS_AFTER_POWERUP, NULL); notify_each_subsys_device(list, count, SUBSYS_AFTER_POWERUP, NULL);
pr_info("[%p]: Restart sequence for %s completed.\n", pr_info("[%s:%d]: Restart sequence for %s completed.\n",
current, desc->name); current->comm, current->pid, desc->name);
mutex_unlock(&soc_order_reg_lock); mutex_unlock(&soc_order_reg_lock);
mutex_unlock(&track->lock); mutex_unlock(&track->lock);