Skip to contentSkip to conversation

PCI: pciehp: hide ENTRY messages behind ctrl_dbg()

PATCH In review Paul Bolle 3 participants 5 messages Jan 28, 2013 – Feb 1, 2013 PCI

lore
Share & tools
lore

Paul Bolle

author
#0 lore raw

PATCH 1/1 PCI: pciehp: hide ENTRY messages behind ctrl_dbg()

In each suspend and resume cycle my laptop prints these messages at KERN_INFO level:

    pciehp 0000:00:1c.1:pcie04: pciehp_suspend ENTRY
    pciehp 0000:00:1c.0:pcie04: pciehp_suspend ENTRY

and

    pciehp 0000:00:1c.0:pcie04: pciehp_resume ENTRY
    pciehp 0000:00:1c.1:pcie04: pciehp_resume ENTRY

Messages like these are probably only useful while debugging pciehp, so let's hide them behind the ctrl_dbg() macro.

---
0) Compile tested only!

1) Perhaps a better solution is to drop these messages entirely.

 drivers/pci/hotplug/pciehp_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/hotplug/pciehp_core.c +3 -2
index 939bd1d..ed1702d 100644
@@ -293,7 +293,8 @@ static void pciehp_remove(struct pcie_device *dev)
 #ifdef CONFIG_PM
 static int pciehp_suspend (struct pcie_device *dev)
 {
-	dev_info(&dev->device, "%s ENTRY\n", __func__);
+	struct controller *ctrl = get_service_data(dev);
+	ctrl_dbg(ctrl, "%s ENTRY\n", __func__);
 	return 0;
 }
 
@@ -303,8 +304,8 @@ static int pciehp_resume (struct pcie_device *dev)
 	struct slot *slot;
 	u8 status;
 
-	dev_info(&dev->device, "%s ENTRY\n", __func__);
 	ctrl = get_service_data(dev);
+	ctrl_dbg(ctrl, "%s ENTRY\n", __func__);
 
 	/* reinitialize the chipset's event detection logic */
 	pcie_enable_notification(ctrl);
Signature · 1 line
1.7.11.7
maintainer
#1 lore raw

[+cc Rafael]

Quoted 26 lines · Paul Bolle

In each suspend and resume cycle my laptop prints these messages at KERN_INFO level:

    pciehp 0000:00:1c.1:pcie04: pciehp_suspend ENTRY
    pciehp 0000:00:1c.0:pcie04: pciehp_suspend ENTRY

and

    pciehp 0000:00:1c.0:pcie04: pciehp_resume ENTRY
    pciehp 0000:00:1c.1:pcie04: pciehp_resume ENTRY

Messages like these are probably only useful while debugging pciehp, so let's hide them behind the ctrl_dbg() macro.

---
0) Compile tested only!

1) Perhaps a better solution is to drop these messages entirely.

 drivers/pci/hotplug/pciehp_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/hotplug/pciehp_core.c +0 -0
index 939bd1d..ed1702d 100644

drivers/pci/hotplug/pciehp_core.c static void pciehp_remove(struct pcie_device *dev) · line 298

Quoted 7 lines
drivers/pci/hotplug/pciehp_core.c +2 -1
@@ -293,7 +293,8 @@ static void pciehp_remove(struct pcie_device *dev)
 #ifdef CONFIG_PM
 static int pciehp_suspend (struct pcie_device *dev)
 {
-       dev_info(&dev->device, "%s ENTRY\n", __func__);
+       struct controller *ctrl = get_service_data(dev);
+       ctrl_dbg(ctrl, "%s ENTRY\n", __func__);
        return 0;

I'd propose to just drop these messages completely. Rafael, would you have any objection to that?

Quoted 15 lines
drivers/pci/hotplug/pciehp_core.c +1 -2
 }
 
@@ -303,8 +304,8 @@ static int pciehp_resume (struct pcie_device *dev)
        struct slot *slot;
        u8 status;
 
-       dev_info(&dev->device, "%s ENTRY\n", __func__);
        ctrl = get_service_data(dev);
+       ctrl_dbg(ctrl, "%s ENTRY\n", __func__);
 
        /* reinitialize the chipset's event detection logic */
        pcie_enable_notification(ctrl);
--

1.7.11.7

#2 lore raw
Quoted 24 lines · Bjorn Helgaas

[+cc Rafael]

Quoted 21 lines · Paul Bolle

In each suspend and resume cycle my laptop prints these messages at KERN_INFO level:

    pciehp 0000:00:1c.1:pcie04: pciehp_suspend ENTRY
    pciehp 0000:00:1c.0:pcie04: pciehp_suspend ENTRY

and

    pciehp 0000:00:1c.0:pcie04: pciehp_resume ENTRY
    pciehp 0000:00:1c.1:pcie04: pciehp_resume ENTRY

Messages like these are probably only useful while debugging pciehp, so let's hide them behind the ctrl_dbg() macro.

---
0) Compile tested only!

1) Perhaps a better solution is to drop these messages entirely.

 drivers/pci/hotplug/pciehp_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Quoted 15 lines

drivers/pci/hotplug/pciehp_core.c static void pciehp_remove(struct pcie_device *dev) · line 298

Quoted 12 lines
drivers/pci/hotplug/pciehp_core.c +2 -1
index 939bd1d..ed1702d 100644
@@ -293,7 +293,8 @@ static void pciehp_remove(struct pcie_device *dev)
 #ifdef CONFIG_PM
 static int pciehp_suspend (struct pcie_device *dev)
 {
-       dev_info(&dev->device, "%s ENTRY\n", __func__);
+       struct controller *ctrl = get_service_data(dev);
+       ctrl_dbg(ctrl, "%s ENTRY\n", __func__);
        return 0;

I'd propose to just drop these messages completely. Rafael, would you have any objection to that?

No, I wouldn't.

Quoted 7 lines
Quoted 7 lines
drivers/pci/hotplug/pciehp_core.c +0 -0
 }
 
@@ -303,8 +304,8 @@ static int pciehp_resume (struct pcie_device *dev)
        struct slot *slot;
        u8 status;
 
Quoted 7 lines

drivers/pci/hotplug/pciehp_core.c static int pciehp_resume (struct pcie_device *dev)

Quoted 7 lines
drivers/pci/hotplug/pciehp_core.c +1 -2
-       dev_info(&dev->device, "%s ENTRY\n", __func__);
        ctrl = get_service_data(dev);
+       ctrl_dbg(ctrl, "%s ENTRY\n", __func__);
 
        /* reinitialize the chipset's event detection logic */
        pcie_enable_notification(ctrl);
--

Thanks,
Rafael

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
author
#3 lore raw

PATCH v2 1/1 PCI: pciehp: drop ENTRY messages

In each suspend and resume cycle my laptop prints these messages at KERN_INFO level:

    pciehp 0000:00:1c.1:pcie04: pciehp_suspend ENTRY
    pciehp 0000:00:1c.0:pcie04: pciehp_suspend ENTRY

and

    pciehp 0000:00:1c.0:pcie04: pciehp_resume ENTRY
    pciehp 0000:00:1c.1:pcie04: pciehp_resume ENTRY

Drop these messages, that were probably used to debug the suspend and resume code, but now serve no purpose.

---
0) v1 was called "PCI: pciehp: hide ENTRY messages behind ctrl_dbg()". But Bjorn and Rafael prefer to drop these messages completely.

1) Not even compile tested!

 drivers/pci/hotplug/pciehp_core.c | 2 --
 1 file changed, 2 deletions(-)
drivers/pci/hotplug/pciehp_core.c +0 -2
index 939bd1d..7d72c5e 100644
@@ -293,7 +293,6 @@ static void pciehp_remove(struct pcie_device *dev)
 #ifdef CONFIG_PM
 static int pciehp_suspend (struct pcie_device *dev)
 {
-	dev_info(&dev->device, "%s ENTRY\n", __func__);
 	return 0;
 }
 
@@ -303,7 +302,6 @@ static int pciehp_resume (struct pcie_device *dev)
 	struct slot *slot;
 	u8 status;
 
-	dev_info(&dev->device, "%s ENTRY\n", __func__);
 	ctrl = get_service_data(dev);
 
 	/* reinitialize the chipset's event detection logic */
Signature · 1 line
1.7.11.7
maintainer Applied
#4 lore raw

Re: [PATCH v2] PCI: pciehp: drop ENTRY messages

Quoted 5 lines · Paul Bolle

In each suspend and resume cycle my laptop prints these messages at KERN_INFO level:

    pciehp 0000:00:1c.1:pcie04: pciehp_suspend ENTRY
    pciehp 0000:00:1c.0:pcie04: pciehp_suspend ENTRY
Quoted 8 lines

and

    pciehp 0000:00:1c.0:pcie04: pciehp_resume ENTRY
    pciehp 0000:00:1c.1:pcie04: pciehp_resume ENTRY

Drop these messages, that were probably used to debug the suspend and resume code, but now serve no purpose.

I applied this to pci/misc for v3.9. Thanks!

Bjorn

Quoted 32 lines

---
0) v1 was called "PCI: pciehp: hide ENTRY messages behind ctrl_dbg()". But Bjorn and Rafael prefer to drop these messages completely.

1) Not even compile tested!

 drivers/pci/hotplug/pciehp_core.c | 2 --
 1 file changed, 2 deletions(-)
drivers/pci/hotplug/pciehp_core.c +0 -3
index 939bd1d..7d72c5e 100644
@@ -293,7 +293,6 @@ static void pciehp_remove(struct pcie_device *dev)
 #ifdef CONFIG_PM
 static int pciehp_suspend (struct pcie_device *dev)
 {
-       dev_info(&dev->device, "%s ENTRY\n", __func__);
        return 0;
 }
 
@@ -303,7 +302,6 @@ static int pciehp_resume (struct pcie_device *dev)
        struct slot *slot;
        u8 status;
 
-       dev_info(&dev->device, "%s ENTRY\n", __func__);
        ctrl = get_service_data(dev);
 
        /* reinitialize the chipset's event detection logic */
--

1.7.11.7