Skip to content

Commit

Permalink
PCI/PTM: Remove error message at boot
Browse files Browse the repository at this point in the history
Since 39850ed ("PCI/PTM: Save/restore Precision Time Measurement
Capability for suspend/resume"), devices that 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: 39850ed ("PCI/PTM: Save/restore Precision Time Measurement Capability for suspend/resume")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: David E. Box <[email protected]>
  • Loading branch information
kuba-moo authored and bjorn-helgaas committed Aug 20, 2021
1 parent 7eb6ea4 commit ff3a52a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/pci/pcie/ptm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff3a52a

Please sign in to comment.