From: Hariprasad Shenai Date: Thu, 17 Jul 2014 17:01:03 +0000 (+0530) Subject: iw_cxgb4: fix for 64-bit integer division X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da388973d4a15e71cada1219d625b5393c90e5ae;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David S. Miller --- 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 @@ #include #include #include +#include #include @@ -150,7 +151,7 @@ static int wr_log_show(struct seq_file *seq, void *v) int prev_ts_set = 0; int idx, end; -#define ts2ns(ts) ((ts) * dev->rdev.lldi.cclk_ps / 1000) +#define ts2ns(ts) div64_ul((ts) * dev->rdev.lldi.cclk_ps, 1000) idx = atomic_read(&dev->rdev.wr_log_idx) & (dev->rdev.wr_log_size - 1);