diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-07-05 05:45:39 -0400 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2018-07-26 06:46:46 -0400 |
commit | 014562071c96524b518d4d3513fcde072c8e63b5 (patch) | |
tree | 83b00d2596c6bba80b7c90fec06de4c4de1e916d | |
parent | ce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff) |
PCI: mobiveil: Integer overflow in IB_WIN_SIZE
IB_WIN_SIZE is larger than INT_MAX so we need to cast it to u64.
Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
-rw-r--r-- | drivers/pci/controller/pcie-mobiveil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 4d6c20e47bed..cf0aa7cee5b0 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c | |||
@@ -107,7 +107,7 @@ | |||
107 | #define CFG_WINDOW_TYPE 0 | 107 | #define CFG_WINDOW_TYPE 0 |
108 | #define IO_WINDOW_TYPE 1 | 108 | #define IO_WINDOW_TYPE 1 |
109 | #define MEM_WINDOW_TYPE 2 | 109 | #define MEM_WINDOW_TYPE 2 |
110 | #define IB_WIN_SIZE (256 * 1024 * 1024 * 1024) | 110 | #define IB_WIN_SIZE ((u64)256 * 1024 * 1024 * 1024) |
111 | #define MAX_PIO_WINDOWS 8 | 111 | #define MAX_PIO_WINDOWS 8 |
112 | 112 | ||
113 | /* Parameters for the waiting for link up routine */ | 113 | /* Parameters for the waiting for link up routine */ |