diff options
author | Vinson Lee <vlee@freedesktop.org> | 2019-01-02 19:39:17 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2019-02-13 10:40:24 +0100 |
commit | 6469d596a8b3c4e0eba1495a74788d5e80751da8 (patch) | |
tree | 1cc29e99a552a864add5c62cd3c7db146e2aa75d | |
parent | ae94d494a63f834a3937d94b7be6a16be296e47c (diff) | |
download | pciutils-6469d596a8b3c4e0eba1495a74788d5e80751da8.tar.gz |
lspci: Fix extra newline if L1.2 is not supported.
Fixes: fb17077dc378 ("Cleaned up the previous patch")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
-rw-r--r-- | ls-ecaps.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -711,17 +711,19 @@ cap_l1pm(struct device *d, int where) FLAG(val, PCI_L1PM_SUBSTAT_CTL1_ASPM_L11)); if (l1_cap & PCI_L1PM_SUBSTAT_CAP_PM_L12 || l1_cap & PCI_L1PM_SUBSTAT_CAP_ASPM_L12) - printf("\t\t\t T_CommonMode=%dus", BITS(val, 8, 8)); - - if (l1_cap & PCI_L1PM_SUBSTAT_CAP_ASPM_L12) { - scale = BITS(val, 29, 3); - if (scale > 5) - printf(" LTR1.2_Threshold=<error>"); - else - printf(" LTR1.2_Threshold=%lldns", BITS(val, 16, 10) * (unsigned long long) cap_ltr_scale(scale)); + printf("\t\t\t T_CommonMode=%dus", BITS(val, 8, 8)); + + if (l1_cap & PCI_L1PM_SUBSTAT_CAP_ASPM_L12) + { + scale = BITS(val, 29, 3); + if (scale > 5) + printf(" LTR1.2_Threshold=<error>"); + else + printf(" LTR1.2_Threshold=%lldns", BITS(val, 16, 10) * (unsigned long long) cap_ltr_scale(scale)); + } + printf("\n"); } - printf("\n"); val = get_conf_long(d, where + PCI_L1PM_SUBSTAT_CTL2); printf("\t\tL1SubCtl2:"); |