[Intel-gfx] [PATCH i-g-t 6/8] Fix comparison of unsigned integers
Thomas Wood
thomas.wood at intel.com
Mon Nov 2 03:48:42 PST 2015
Signed-off-by: Thomas Wood <thomas.wood at intel.com>
---
benchmarks/gem_exec_reloc.c | 2 --
overlay/gem-interrupts.c | 7 +++++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/benchmarks/gem_exec_reloc.c b/benchmarks/gem_exec_reloc.c
index 5be482a..2ef6df5 100644
--- a/benchmarks/gem_exec_reloc.c
+++ b/benchmarks/gem_exec_reloc.c
@@ -249,8 +249,6 @@ int main(int argc, char **argv)
case 'r':
num_relocs = atoi(optarg);
- if (num_relocs < 0)
- num_relocs = 0;
break;
}
}
diff --git a/overlay/gem-interrupts.c b/overlay/gem-interrupts.c
index 48a36b8..0150a1d 100644
--- a/overlay/gem-interrupts.c
+++ b/overlay/gem-interrupts.c
@@ -142,9 +142,12 @@ int gem_interrupts_update(struct gem_interrupts *irqs)
return irqs->error;
if (irqs->fd < 0) {
- val = interrupts_read();
- if (val < 0)
+ long long ret;
+ ret = interrupts_read();
+ if (ret < 0)
return irqs->error = ENODEV;
+ else
+ val = ret;
} else {
if (read(irqs->fd, &val, sizeof(val)) < 0)
return irqs->error = errno;
--
1.9.1
More information about the Intel-gfx
mailing list