BNX2X: spatch ktime_ functions
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 9 Feb 2015 19:41:00 +0000 (14:41 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 2 Mar 2015 16:59:09 +0000 (11:59 -0500)
Even though I'll probably remove the function these are called by.

kern/drivers/net/bnx2x/bnx2x_main.c
scripts/spatch/linux/funcs.cocci

index 493f453..156eb02 100644 (file)
@@ -14830,7 +14830,7 @@ void bnx2x_init_ptp(struct bnx2x *bp)
        if (!bp->timecounter_init_done) {
                bnx2x_init_cyclecounter(bp);
                timecounter_init(&bp->timecounter, &bp->cyclecounter,
-                                ktime_to_ns(ktime_get_real()));
+                                epoch_nsec());
                bp->timecounter_init_done = 1;
        }
 
index 7a5519f..ee56f62 100644 (file)
@@ -145,3 +145,15 @@ expression LEN;
 @@
 -copy_to_user(DST, SRC, LEN)
 +memcpy_to_user(current, DST, SRC, LEN)
+
+@@
+@@
+-ktime_get_real()
++epoch_nsec()
+
+@@
+expression E;
+@@
+-ktime_to_ns(E)
++E
+