diff options
author | Pali Rohár <pali@kernel.org> | 2021-12-26 22:11:51 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2022-02-10 12:58:17 +0100 |
commit | 6811edb82791b1cc18889062a226522b7cdd74a8 (patch) | |
tree | 7a3227c143234203a4b330b778651465bca05cd7 /ls-ecaps.c | |
parent | b5bbc1adb18bffb03f76d933ac4ab971e04e385b (diff) | |
download | pciutils-6811edb82791b1cc18889062a226522b7cdd74a8.tar.gz |
lspci: Replace unsigned long long type by u64 and %llx format by PCI_U64_FMT_X
pciutils already provides and uses u64 type together with PCI_U64_FMT_X
format macro for printing hex value of this type. So use u64 and
PCI_U64_FMT_X also on other few remaining places.
This change fixes printing hexadecimal 64-bit numbers by lspci on Window
systems independently of used compiler (MinGW or MSVC).
Diffstat (limited to 'ls-ecaps.c')
-rw-r--r-- | ls-ecaps.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -68,12 +68,12 @@ cap_ltr(struct device *d, int where) snoop = get_conf_word(d, where + PCI_LTR_MAX_SNOOP); scale = cap_ltr_scale((snoop >> PCI_LTR_SCALE_SHIFT) & PCI_LTR_SCALE_MASK); printf("\t\tMax snoop latency: %lldns\n", - ((unsigned long long)snoop & PCI_LTR_VALUE_MASK) * scale); + ((u64)snoop & PCI_LTR_VALUE_MASK) * scale); nosnoop = get_conf_word(d, where + PCI_LTR_MAX_NOSNOOP); scale = cap_ltr_scale((nosnoop >> PCI_LTR_SCALE_SHIFT) & PCI_LTR_SCALE_MASK); printf("\t\tMax no snoop latency: %lldns\n", - ((unsigned long long)nosnoop & PCI_LTR_VALUE_MASK) * scale); + ((u64)nosnoop & PCI_LTR_VALUE_MASK) * scale); } static void @@ -826,7 +826,7 @@ cap_l1pm(struct device *d, int where) 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(" LTR1.2_Threshold=%lldns", BITS(val, 16, 10) * (u64) cap_ltr_scale(scale)); } printf("\n"); } |