]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: BUG2138 - 32bit hosts can't devide 64bit variables
authorEldad Zinger <eldadz@mellanox.co.il>
Tue, 21 Sep 2010 17:21:50 +0000 (19:21 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:22 +0000 (05:05 -0700)
Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_main.c

index 66853898da3cdf4e9e0bc555eda8fecec4be2592..aefd386a8c35663f7fbfe7028623bbda5e03c235 100644 (file)
@@ -1373,7 +1373,7 @@ static inline cycles_t sdp_usec_to_cycles(int usecs)
 #endif
 }
 
-static inline unsigned sdp_cycles_to_usecs(cycles_t c)
+static inline unsigned sdp_cycles_to_usecs(unsigned long c)
 {
 #ifdef CONFIG_PPC
        return c / tb_ticks_per_usec;
@@ -1398,7 +1398,7 @@ static inline int poll_recv_cq(struct sock *sk)
                if (sdp_poll_rx_cq(sdp_sk(sk))) {
                        SDPSTATS_COUNTER_INC(rx_poll_hit);
                        SDPSTATS_HIST(poll_hit_usec, sdp_cycles_to_usecs(
-                                       (get_cycles() - start)));
+                                       (unsigned long)(get_cycles() - start)));
                        return 0;
                }
        } while (cycles_before(get_cycles(), end));