diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2014-07-17 13:01:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-17 19:52:08 -0400 |
commit | da388973d4a15e71cada1219d625b5393c90e5ae (patch) | |
tree | ca2e3b2d9149d37dcac7c24b5fa67ab3cf3b03d4 | |
parent | 8ccf3800dbdeaf26bcdefa471c9c8e0da7e6ec7a (diff) |
iw_cxgb4: fix for 64-bit integer division
Fixed error introduced in commit id 7730b4c (" cxgb4/iw_cxgb4: work request
logging feature") while compiling on 32 bit architecture reported by kbuild.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/infiniband/hw/cxgb4/device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index df1f1b52c7ec..03b6fa1291bf 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/moduleparam.h> | 33 | #include <linux/moduleparam.h> |
34 | #include <linux/debugfs.h> | 34 | #include <linux/debugfs.h> |
35 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
36 | #include <linux/math64.h> | ||
36 | 37 | ||
37 | #include <rdma/ib_verbs.h> | 38 | #include <rdma/ib_verbs.h> |
38 | 39 | ||
@@ -150,7 +151,7 @@ static int wr_log_show(struct seq_file *seq, void *v) | |||
150 | int prev_ts_set = 0; | 151 | int prev_ts_set = 0; |
151 | int idx, end; | 152 | int idx, end; |
152 | 153 | ||
153 | #define ts2ns(ts) ((ts) * dev->rdev.lldi.cclk_ps / 1000) | 154 | #define ts2ns(ts) div64_ul((ts) * dev->rdev.lldi.cclk_ps, 1000) |
154 | 155 | ||
155 | idx = atomic_read(&dev->rdev.wr_log_idx) & | 156 | idx = atomic_read(&dev->rdev.wr_log_idx) & |
156 | (dev->rdev.wr_log_size - 1); | 157 | (dev->rdev.wr_log_size - 1); |