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

Commit 1729b4b0 authored by Yan He's avatar Yan He
Browse files

msm: ep_pcie: fix duplicated counter increment



The logging macro has multiple outputs. If we increase the counter
as a parameter to the logging macro, the counter will be increased
for multiple times. The change here fixes this bug.

Change-Id: I321e281b506e35770e222def86f5b04ae0bfdce2
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent 7cfa5245
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1632,9 +1632,10 @@ int ep_pcie_core_trigger_msi(u32 idx)
	data = readl_relaxed(ep_pcie_dev.dm_core + PCIE20_MSI_DATA);

	if (addr && data) {
		ep_pcie_dev.msi_counter++;
		EP_PCIE_DUMP(&ep_pcie_dev,
			"PCIe V%d: No. %ld MSI fired for IRQ %d; index from client:%d\n",
			ep_pcie_dev.rev, ep_pcie_dev.msi_counter++,
			ep_pcie_dev.rev, ep_pcie_dev.msi_counter,
			data + idx, idx);
		ep_pcie_write_reg(ep_pcie_dev.msi, addr & 0xfff, data + idx);
		return 0;
@@ -1656,9 +1657,10 @@ int ep_pcie_core_wakeup_host(void)
			dev->rev);
		return EP_PCIE_ERROR;
	} else {
		dev->wake_counter++;
		EP_PCIE_DBG(dev,
			"PCIe V%d: No. %ld to assert PCIe WAKE#; perst is %s de-asserted; D3hot is %s received.\n",
			dev->rev, ++dev->wake_counter,
			dev->rev, dev->wake_counter,
			dev->perst_deast ? "" : "not",
			dev->l23_ready ? "" : "not");
		gpio_set_value(dev->gpio[EP_PCIE_GPIO_WAKE].num,