Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d3f4807 authored by Satya Durga Srinivasu Prabhala's avatar Satya Durga Srinivasu Prabhala Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 30af7d05
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -204,9 +204,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);
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2011, 2013, 2016 The Linux Foundation. All rights reserved.
/* Copyright (c) 2011, 2013, 2016-2017, 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
@@ -195,7 +195,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 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
+15 −12
Original line number Diff line number Diff line
@@ -601,10 +601,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);
@@ -616,7 +617,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;
}

@@ -631,13 +633,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);

@@ -645,8 +648,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, CRASH_STATUS_NO_CRASH);
@@ -955,8 +958,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);
@@ -977,8 +980,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);