Skip to contentSkip to conversation

PCI / PM: Clean up outdated comments in pci_target_state()

PATCH In review Rafael J. Wysocki 3 participants 3 messages May 21, 2018 – May 22, 2018 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI / PM: Clean up outdated comments in pci_target_state()

From: Rafael J. Wysocki <[email protected]>

Two comments in pci_target_state() are outdated, as the function doesn't set the target power state for the device any more, only finds one for it, so fix them accordingly.

---
 drivers/pci/pci.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/pci/pci.c +2 -4
Index: linux-pm/drivers/pci/pci.c
===================================================================
@@ -2025,8 +2025,7 @@ static pci_power_t pci_target_state(stru
 
 	if (platform_pci_power_manageable(dev)) {
 		/*
-		 * Call the platform to choose the target state of the device
-		 * and enable wake-up from this state if supported.
+		 * Call the platform to find the target state for the device.
 		 */
 		pci_power_t state = platform_pci_choose_state(dev);
 
@@ -2059,8 +2058,7 @@ static pci_power_t pci_target_state(stru
 	if (wakeup) {
 		/*
 		 * Find the deepest state from which the device can generate
-		 * wake-up events, make it the target state and enable device
-		 * to generate PME#.
+		 * PME#.
 		 */
 		if (dev->pme_support) {
 			while (target_state
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Two comments in pci_target_state() are outdated, as the function doesn't set the target power state for the device any more, only finds one for it, so fix them accordingly.

I assume you'll merge this; let me know if you'd rather that I take it.

Quoted 29 lines
---
 drivers/pci/pci.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: linux-pm/drivers/pci/pci.c
===================================================================

drivers/pci/pci.c +2 -4
@@ -2025,8 +2025,7 @@ static pci_power_t pci_target_state(stru
 
 	if (platform_pci_power_manageable(dev)) {
 		/*
-		 * Call the platform to choose the target state of the device
-		 * and enable wake-up from this state if supported.
+		 * Call the platform to find the target state for the device.
 		 */
 		pci_power_t state = platform_pci_choose_state(dev);
 
@@ -2059,8 +2058,7 @@ static pci_power_t pci_target_state(stru
 	if (wakeup) {
 		/*
 		 * Find the deepest state from which the device can generate
-		 * wake-up events, make it the target state and enable device
-		 * to generate PME#.
+		 * PME#.
 		 */
 		if (dev->pme_support) {
 			while (target_state
#2 lore raw
Quoted 7 lines · Bjorn Helgaas
Quoted 6 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

Two comments in pci_target_state() are outdated, as the function doesn't set the target power state for the device any more, only finds one for it, so fix them accordingly.

Quoted 6 lines
Quoted 2 lines

I assume you'll merge this; let me know if you'd rather that I take it.

I will take it, thanks!

Can you have a look at https://patchwork.kernel.org/patch/10408977/
too, please, while at it?