lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1513323522-15021-14-git-send-email-sagar.a.kamble@intel.com>
Date:   Fri, 15 Dec 2017 13:08:28 +0530
From:   Sagar Arun Kamble <sagar.a.kamble@...el.com>
To:     linux-kernel@...r.kernel.org
Cc:     Sagar Arun Kamble <sagar.a.kamble@...el.com>,
        Richard Cochran <richardcochran@...il.com>,
        Ariel Elior <Ariel.Elior@...ium.com>,
        everest-linux-l2@...ium.com, netdev@...r.kernel.org
Subject: [PATCH 13/27] qede: Use timecounter_initialize interface

With new interface timecounter_initialize we can initialize timecounter
fields and underlying cyclecounter together. Update qede timecounter
init with this new function.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@...el.com>
Cc: Richard Cochran <richardcochran@...il.com>
Cc: Ariel Elior <Ariel.Elior@...ium.com>
Cc: everest-linux-l2@...ium.com
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/net/ethernet/qlogic/qede/qede_ptp.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ptp.c b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
index 95bb8a8..0d054dc 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ptp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
@@ -427,13 +427,12 @@ static int qede_ptp_init(struct qede_dev *edev, bool init_tc)
 	 * unload / load (e.g. MTU change) while it is running.
 	 */
 	if (init_tc) {
-		memset(&ptp->tc.cc, 0, sizeof(ptp->tc.cc));
-		ptp->tc.cc.read = qede_ptp_read_cc;
-		ptp->tc.cc.mask = CYCLECOUNTER_MASK(64);
-		ptp->tc.cc.shift = 0;
-		ptp->tc.cc.mult = 1;
-
-		timecounter_init(&ptp->tc, ktime_to_ns(ktime_get_real()));
+		timecounter_initialize(&ptp->tc,
+				       qede_ptp_read_cc,
+				       CYCLECOUNTER_MASK(64),
+				       1,
+				       0,
+				       ktime_to_ns(ktime_get_real()));
 	}
 
 	return rc;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ