Commit 3320e784 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: loopback: use U64_MAX for initialization

Use the largest representable value when initializing the "min"
field when resetting loopback statistics.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 3f12c3ed
...@@ -340,7 +340,7 @@ static int gb_loopback_request_recv(u8 type, struct gb_operation *operation) ...@@ -340,7 +340,7 @@ static int gb_loopback_request_recv(u8 type, struct gb_operation *operation)
static void gb_loopback_reset_stats(struct gb_loopback *gb) static void gb_loopback_reset_stats(struct gb_loopback *gb)
{ {
struct gb_loopback_stats reset = { struct gb_loopback_stats reset = {
.min = 0xffffffff, .min = U64_MAX,
}; };
memcpy(&gb->latency, &reset, sizeof(struct gb_loopback_stats)); memcpy(&gb->latency, &reset, sizeof(struct gb_loopback_stats));
memcpy(&gb->throughput, &reset, sizeof(struct gb_loopback_stats)); memcpy(&gb->throughput, &reset, sizeof(struct gb_loopback_stats));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment