Skip to content

Commit fd3065b

Browse files
Jan Glauberdavem330
authored andcommitted
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. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c63da99 commit fd3065b

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

  • drivers/net/ethernet/chelsio/cxgb

‎drivers/net/ethernet/chelsio/cxgb/sge.c‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -367,18 +367,6 @@ void t1_sched_set_drain_bits_per_us(struct sge *sge, unsigned int port,
367367

368368
#endif /* 0 */
369369

370-
371-
/*
372-
* get_clock() implements a ns clock (see ktime_get)
373-
*/
374-
static inline ktime_t get_clock(void)
375-
{
376-
struct timespec ts;
377-
378-
ktime_get_ts(&ts);
379-
return timespec_to_ktime(ts);
380-
}
381-
382370
/*
383371
* tx_sched_init() allocates resources and does basic initialization.
384372
*/
@@ -411,7 +399,7 @@ static int tx_sched_init(struct sge *sge)
411399
static inline int sched_update_avail(struct sge *sge)
412400
{
413401
struct sched *s = sge->tx_sched;
414-
ktime_t now = get_clock();
402+
ktime_t now = ktime_get();
415403
unsigned int i;
416404
long long delta_time_ns;
417405

0 commit comments

Comments
 (0)