Skip to content

Commit

Permalink
iw_cxgb4: fix for 64-bit integer division
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hariprasad Shenai authored and David S. Miller committed Jul 17, 2014
1 parent 8ccf380 commit da38897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/cxgb4/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/moduleparam.h>
#include <linux/debugfs.h>
#include <linux/vmalloc.h>
#include <linux/math64.h>

#include <rdma/ib_verbs.h>

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit da38897

Please sign in to comment.