From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755905AbcBPSZX (ORCPT ); Tue, 16 Feb 2016 13:25:23 -0500 Received: from mga11.intel.com ([192.55.52.93]:29295 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755574AbcBPSZU (ORCPT ); Tue, 16 Feb 2016 13:25:20 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,456,1449561600"; d="scan'208";a="916192203" Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "Richard Cochran" Cc: tglx@linutronix.de, mingo@redhat.com, john.stultz@linaro.org, hpa@zytor.com, jeffrey.t.kirsher@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, kevin.b.stanton@intel.com, kevin.j.clarke@intel.com Subject: Re: [PATCH v7 3/8] time: Remove duplicated code in ktime_get_raw_and_real() References: <1455308729-6280-1-git-send-email-christopher.s.hall@intel.com> <1455308729-6280-4-git-send-email-christopher.s.hall@intel.com> <20160216075210.GA2461@localhost.localdomain> Date: Tue, 16 Feb 2016 10:23:01 -0800 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Christopher Hall" Organization: Intel Corporation Message-ID: In-Reply-To: <20160216075210.GA2461@localhost.localdomain> User-Agent: Opera Mail/1.0 (Win32) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Feb 2016 23:52:10 -0800, Richard Cochran wrote: >> @@ -888,6 +888,8 @@ void ktime_get_snapshot(struct system_time_snapshot >> *systime_snapshot) >> s64 nsec_real; >> cycle_t now; >> >> + WARN_ON(timekeeping_suspended); > ... >> - WARN_ON_ONCE(timekeeping_suspended); > > Is this change intentional? Yes it is. The code I replaced in pps_kernel.h (pps_get_ts()) has two call paths depending on whether CONFIG_NTP_PPS is set. On one call path (realtime only, config unset) WARN_ON(), from getnstimeofday64, is used, on the other WARN_ON_ONCE(), from ktime_get_raw_and_real_ts64(), is used. I opted for the greater verbosity of the two when I combined the code. Is WARN_ON_ONCE() better here? Thanks, Chris