Skip to content

Commit

Permalink
chelsio: remove get_clock and use ktime_get
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Glauber authored and David S. Miller committed Dec 7, 2012
1 parent c63da99 commit fd3065b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/net/ethernet/chelsio/cxgb/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit fd3065b

Please sign in to comment.