Skip to contentSkip to conversation

chelsio: remove get_clock and use ktime_get

PATCH Applied Jan Glauber 2 participants 2 messages Dec 6, 2012 – Dec 7, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 chelsio: remove get_clock and use ktime_get

The get_clock() of the chelsio driver clashes with the s390 one. The chelsio helper reads a timespec via ktime just to convert it back to ktime. I can see no different outcome from calling ktime_get directly.

Remove the get_clock and use ktime_get directly.

---
 drivers/net/ethernet/chelsio/cxgb/sge.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/net/ethernet/chelsio/cxgb/sge.c +1 -13
index 47a8435..31de20a 100644
@@ -367,18 +367,6 @@ void t1_sched_set_drain_bits_per_us(struct sge *sge, unsigned int port,
 
 #endif  /*  0  */
 
-
-/*
- * get_clock() implements a ns clock (see ktime_get)
- */
-static inline ktime_t get_clock(void)
-{
-	struct timespec ts;
-
-	ktime_get_ts(&ts);
-	return timespec_to_ktime(ts);
-}
-
 /*
  * tx_sched_init() allocates resources and does basic initialization.
  */
@@ -411,7 +399,7 @@ static int tx_sched_init(struct sge *sge)
 static inline int sched_update_avail(struct sge *sge)
 {
 	struct sched *s = sge->tx_sched;
-	ktime_t now = get_clock();
+	ktime_t now = ktime_get();
 	unsigned int i;
 	long long delta_time_ns;
 
Signature · 1 line
1.7.12.4
maintainer Applied
#1 lore raw

From: Jan Glauber <[email protected]>
Date: Thu, 6 Dec 2012 10:20:14 +0100

Quoted 8 lines

The get_clock() of the chelsio driver clashes with the s390 one. The chelsio helper reads a timespec via ktime just to convert it back to ktime. I can see no different outcome from calling ktime_get directly.

Remove the get_clock and use ktime_get directly.

Applied, thanks.