greybus: loopback: use U64_MAX for initialization
authorAlex Elder <elder@linaro.org>
Mon, 3 Aug 2015 17:57:12 +0000 (12:57 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 4 Aug 2015 03:11:49 +0000 (20:11 -0700)
Use the largest representable value when initializing the "min"
field when resetting loopback statistics.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c

index 66059a96bb177598cddd5792a1053e2206184208..cdefaffc2184958dc433af80118deee08760b21f 100644 (file)
@@ -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)
 {
        struct gb_loopback_stats reset = {
-               .min = 0xffffffff,
+               .min = U64_MAX,
        };
        memcpy(&gb->latency, &reset, sizeof(struct gb_loopback_stats));
        memcpy(&gb->throughput, &reset, sizeof(struct gb_loopback_stats));