Skip to contentSkip to conversation

pci: ptm: remove error message at boot

PATCH Applied Jakub Kicinski 3 participants 3 messages Aug 11, 2021 – Aug 20, 2021 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: ptm: remove error message at boot

Since commit 39850ed51062 ("PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume") devices which have PTM capability but don't enable it see this message on calls to pci_save_state():

"no suspend buffer for PTM"

Drop the message, it's perfectly fine not to use a capability.

Fixes 39850ed51062 ("PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume")
---
 drivers/pci/pcie/ptm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/pcie/ptm.c +1 -3
index 95d4eef2c9e8..4810faa67f52 100644
@@ -60,10 +60,8 @@ void pci_save_ptm_state(struct pci_dev *dev)
 		return;
 
 	save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_PTM);
-	if (!save_state) {
-		pci_err(dev, "no suspend buffer for PTM\n");
+	if (!save_state)
 		return;
-	}
 
 	cap = (u16 *)&save_state->cap.data[0];
 	pci_read_config_word(dev, ptm + PCI_PTM_CTRL, cap);
Signature · 1 line
2.31.1
#1 lore raw
Quoted 8 lines · Jakub Kicinski

Since commit 39850ed51062 ("PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume") devices which have PTM capability but don't enable it see this message on calls to pci_save_state():

  "no suspend buffer for PTM"

Drop the message, it's perfectly fine not to use a capability.

Ack. Thanks.

Quoted 24 lines
Fixes 39850ed51062 ("PCI/PTM: Save/restore Precision Time

Measurement Capability for suspend/resume")

---
 drivers/pci/pcie/ptm.c | 4 +---

 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/pcie/ptm.c +0 -0
index 95d4eef2c9e8..4810faa67f52 100644
@@ -60,10 +60,8 @@ void pci_save_ptm_state(struct pci_dev *dev)
                 return;


        save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_PTM); -       if (!save_state) {
-               pci_err(dev, "no suspend buffer for PTM\n"); +       if (!save_state)
                return;
-       }

        cap = (u16 *)&save_state->cap.data[0]; pci_read_config_word(dev, ptm + PCI_PTM_CTRL, cap);

#2 lore raw
In reply to Jakub Kicinski
Quoted 11 lines · Jakub Kicinski

Since commit 39850ed51062 ("PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume") devices which have PTM capability but don't enable it see this message on calls to pci_save_state():

"no suspend buffer for PTM"

Drop the message, it's perfectly fine not to use a capability.

Fixes 39850ed51062 ("PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume")

Applied to pci/misc for v5.15, thanks!

I fixed your subject line to match previous ones and converted David's informal ack to an actual "Acked-by".

Quoted 23 lines
---
 drivers/pci/pcie/ptm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pci/pcie/ptm.c +1 -3
index 95d4eef2c9e8..4810faa67f52 100644
@@ -60,10 +60,8 @@ void pci_save_ptm_state(struct pci_dev *dev)
 		return;
 
 	save_state = pci_find_saved_ext_cap(dev, PCI_EXT_CAP_ID_PTM);
-	if (!save_state) {
-		pci_err(dev, "no suspend buffer for PTM\n");
+	if (!save_state)
 		return;
-	}
 
 	cap = (u16 *)&save_state->cap.data[0];
 	pci_read_config_word(dev, ptm + PCI_PTM_CTRL, cap);
Signature · 1 line
2.31.1