diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2023-04-15 11:35:38 +0900 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-06-23 15:03:10 -0500 |
commit | 1754dfd2e7931f60d199a9cb044991ab80cdfe0b (patch) | |
tree | c4f38f1530d2b33c65a92d7a23233d3811cecdf0 /tools/power | |
parent | 2566cbea69ab8dad4996ab4b4840fd952e62e5b4 (diff) |
PCI: epf-test: Simplify transfers result print
In pci_epf_test_print_rate(), instead of open coding a reduction loop to
allow for a division by a 32-bits ns value, simply use div64_u64() to
calculate the transfer rate. To match the printed unit of KB/s, this
calculation divides the rate by 1000 instead of 1024 (that would be KiB/s
unit).
Change the format of the results printed by pci_epf_test_print_rate() to be
more compact without the double new line. Also use dev_info() instead of
pr_info().
Link: https://lore.kernel.org/r/20230415023542.77601-14-dlemoal@kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Diffstat (limited to 'tools/power')
0 files changed, 0 insertions, 0 deletions