summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/goya/goyaP.h
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-02-24 11:55:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-26 12:44:25 +0100
commite99f1683bbce050dd19f988d1f5490aea75417a4 (patch)
treefc8e4572e563be60242ee0b101fac3984a6ef7fd /drivers/misc/habanalabs/goya/goyaP.h
parentb5958faa34e2f99f3475ad89c52d98dfea079d33 (diff)
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>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goyaP.h')
-rw-r--r--drivers/misc/habanalabs/goya/goyaP.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/goya/goyaP.h b/drivers/misc/habanalabs/goya/goyaP.h
index 7dc324e4e268..fd1476039226 100644
--- a/drivers/misc/habanalabs/goya/goyaP.h
+++ b/drivers/misc/habanalabs/goya/goyaP.h
@@ -122,7 +122,7 @@
#define VA_DDR_SPACE_SIZE (VA_DDR_SPACE_END - \
VA_DDR_SPACE_START) /* 128GB */
-#define DMA_MAX_TRANSFER_SIZE 0xFFFFFFFF
+#define DMA_MAX_TRANSFER_SIZE U32_MAX
#define HW_CAP_PLL 0x00000001
#define HW_CAP_DDR_0 0x00000002