]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
lspci: Fix extra newline if L1.2 is not supported.
authorVinson Lee <vlee@freedesktop.org>
Wed, 2 Jan 2019 19:39:17 +0000 (19:39 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 13 Feb 2019 09:40:24 +0000 (10:40 +0100)
Fixes: fb17077dc378 ("Cleaned up the previous patch")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
ls-ecaps.c

index db99ed0098d7bc5b2206fabffbeedbbdc1bc15f5..4417cd9e1824bd552d4948214f5b289686b2a60c 100644 (file)
@@ -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:");