habanalabs: use correct define for 32-bit max value
authorOded Gabbay <ogabbay@kernel.org>
Wed, 17 Feb 2021 07:14:55 +0000 (09:14 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 9 Apr 2021 11:09:23 +0000 (14:09 +0300)
Timeout in wait for interrupt is in 32-bit variable so we need to use
the correct maximum value to compare.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c

index 4e6b4cf23181a1756095a9fe7e5c8a97d825c5bd..e1a441e2b2a2bdfbd0eaf8a1fe08054c5ffa978a 100644 (file)
@@ -1924,7 +1924,7 @@ static int _hl_interrupt_wait_ioctl(struct hl_device *hdev, struct hl_ctx *ctx,
        u32 completion_value;
        int rc = 0;
 
-       if (timeout_us == MAX_SCHEDULE_TIMEOUT)
+       if (timeout_us == U32_MAX)
                timeout = timeout_us;
        else
                timeout = usecs_to_jiffies(timeout_us);