From patchwork Thu Dec 6 09:20:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Glauber X-Patchwork-Id: 204188 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5070C2C01C8 for ; Thu, 6 Dec 2012 20:20:55 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754266Ab2LFJUv (ORCPT ); Thu, 6 Dec 2012 04:20:51 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:34554 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627Ab2LFJUu (ORCPT ); Thu, 6 Dec 2012 04:20:50 -0500 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Dec 2012 09:20:44 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 6 Dec 2012 09:20:42 -0000 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qB69KbZT59441246 for ; Thu, 6 Dec 2012 09:20:37 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qB69KiZp013832 for ; Thu, 6 Dec 2012 02:20:44 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qB69KiOA013811; Thu, 6 Dec 2012 02:20:44 -0700 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 45614) id 89A481224434; Thu, 6 Dec 2012 10:20:44 +0100 (CET) From: Jan Glauber To: netdev@vger.kernel.org Cc: Jan Glauber Subject: [PATCH] chelsio: remove get_clock and use ktime_get Date: Thu, 6 Dec 2012 10:20:14 +0100 Message-Id: <1354785614-11468-1-git-send-email-jang@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.12.4 x-cbid: 12120609-4966-0000-0000-0000044EC653 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- drivers/net/ethernet/chelsio/cxgb/sge.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c index 47a8435..31de20a 100644 --- a/drivers/net/ethernet/chelsio/cxgb/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb/sge.c @@ -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;