greybus: loopback_test: fix warning about signed/unsigned comparison
authorGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Dec 2015 21:55:05 +0000 (13:55 -0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 18 Dec 2015 02:17:07 +0000 (18:17 -0800)
We read an int, don't treat it as a unsigned value, especially when
comparing it to a signed value.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/tools/loopback_test.c

index 55b3102d5a6ed5d437815000e0e671d581e4a1c7..5c2a9fcbd68b28fbf17ec88063a98a5a250b3f68 100644 (file)
@@ -689,7 +689,7 @@ static int unregister_for_notification(struct loopback_test *t)
 
 static int is_complete(struct loopback_test *t)
 {
-       uint32_t iteration_count = 0;
+       int iteration_count;
        int i;
 
        for (i = 0; i < t->device_count; i++) {