habanalabs: use u64 when comparing variables' sum to u32_max
authorOded Gabbay <oded.gabbay@gmail.com>
Sun, 24 Feb 2019 09:55:26 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Feb 2019 11:44:25 +0000 (12:44 +0100)
commite99f1683bbce050dd19f988d1f5490aea75417a4
treefc8e4572e563be60242ee0b101fac3984a6ef7fd
parentb5958faa34e2f99f3475ad89c52d98dfea079d33
habanalabs: use u64 when comparing variables' sum to u32_max

This patch fixes two smatch warnings about two if statements that are
always true because of the types of the variables used - u32 when
comparing the sum to u32_max.

The patch changes the types to be u64 so the accumalted sum can be checked
if it is larger than u32_max

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goyaP.h