From patchwork Fri Jul 13 05:21:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 9969 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5F7E723F4C for ; Fri, 13 Jul 2012 05:22:38 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1A1A6A181A0 for ; Fri, 13 Jul 2012 05:22:38 +0000 (UTC) Received: by ghbz12 with SMTP id z12so3494453ghb.11 for ; Thu, 12 Jul 2012 22:22:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=+ApbsymKcnDGT4ksd4/2a+gxeZf3YcHcXg8pg5PC3wg=; b=hFncrlySiEBcW0AemEDdZAj7AvrAOV8CGUqwvVg3vtOWVOdLI5rnBGFR4/kWrlH4wr ZyrEPNr7nTPJCFrckIRSQMhgmIcCzLBGHAeTuPeet62/CL8iHGPY5qwUojYyGcwsANH4 YWYhxXAB8d5dljsSpgB56NLhquwBljWsclfGoWEC4W1vkDPqgoKLHHTyLhTfMaVBqak/ OnPLg1V1KWcNUgGJvlNYbK4Hto/7lpk8fromQzyHw/8V6ryOyHWME61zoQ8j/BjDW+jq /UUocoSQy5fzIHD1Wx4AgM9nr7p0d6YF3WfkJE+Yz34lefPe1GuluQ8DBgLmGHKMBMy3 QPfw== Received: by 10.50.195.234 with SMTP id ih10mr272759igc.0.1342156955038; Thu, 12 Jul 2012 22:22:35 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp11714ibb; Thu, 12 Jul 2012 22:22:33 -0700 (PDT) Received: by 10.68.204.129 with SMTP id ky1mr512314pbc.32.1342156952870; Thu, 12 Jul 2012 22:22:32 -0700 (PDT) Received: from e38.co.us.ibm.com (e38.co.us.ibm.com. [32.97.110.159]) by mx.google.com with ESMTPS id pw3si12400216pbb.331.2012.07.12.22.22.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jul 2012 22:22:32 -0700 (PDT) Received-SPF: neutral (google.com: 32.97.110.159 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=32.97.110.159; Authentication-Results: mx.google.com; spf=neutral (google.com: 32.97.110.159 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) smtp.mail=john.stultz@linaro.org Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Jul 2012 23:22:29 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 12 Jul 2012 23:22:22 -0600 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 5A01619D804C; Fri, 13 Jul 2012 05:22:20 +0000 (WET) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6D5MLLM204316; Thu, 12 Jul 2012 23:22:21 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6D5MK7K017768; Thu, 12 Jul 2012 23:22:21 -0600 Received: from kernel.stglabs.ibm.com (kernel.stglabs.ibm.com [9.114.214.19]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6D5MIiN017604; Thu, 12 Jul 2012 23:22:19 -0600 From: John Stultz To: Linux Kernel Cc: John Stultz , Ingo Molnar , Peter Zijlstra , Richard Cochran , Prarit Bhargava , Thomas Gleixner Subject: [PATCH 2/8] time: Whitespace cleanups per Ingo's requests Date: Fri, 13 Jul 2012 01:21:51 -0400 Message-Id: <1342156917-25092-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1342156917-25092-1-git-send-email-john.stultz@linaro.org> References: <1342156917-25092-1-git-send-email-john.stultz@linaro.org> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12071305-5518-0000-0000-000006004008 X-Gm-Message-State: ALoCoQmQFjZ8HoNAoCwhKnx4o++ZSGPrQfNNQq8WfM+wsprsMVX1CPStR533H8MKI9VdAK9Chtga Ingo noted a number of places where there is inconsistent use of whitespace. This patch tries to address the main culprits. CC: Ingo Molnar CC: Peter Zijlstra CC: Richard Cochran CC: Prarit Bhargava CC: Thomas Gleixner Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 269b1fe..c2f12aa 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -24,32 +24,31 @@ /* Structure holding internal timekeeping values. */ struct timekeeper { /* Current clocksource used for timekeeping. */ - struct clocksource *clock; + struct clocksource *clock; /* NTP adjusted clock multiplier */ - u32 mult; + u32 mult; /* The shift value of the current clocksource. */ - int shift; - + int shift; /* Number of clock cycles in one NTP interval. */ - cycle_t cycle_interval; + cycle_t cycle_interval; /* Number of clock shifted nano seconds in one NTP interval. */ - u64 xtime_interval; + u64 xtime_interval; /* shifted nano seconds left over when rounding cycle_interval */ - s64 xtime_remainder; + s64 xtime_remainder; /* Raw nano seconds accumulated per NTP interval. */ - u32 raw_interval; + u32 raw_interval; /* Clock shifted nano seconds remainder not stored in xtime.tv_nsec. */ - u64 xtime_nsec; + u64 xtime_nsec; /* Difference between accumulated time and NTP time in ntp * shifted nano seconds. */ - s64 ntp_error; + s64 ntp_error; /* Shift conversion between clock shifted nano seconds and * ntp shifted nano seconds. */ - int ntp_error_shift; + int ntp_error_shift; /* The current time */ - struct timespec xtime; + struct timespec xtime; /* * wall_to_monotonic is what we need to add to xtime (or xtime corrected * for sub jiffie times) to get to monotonic time. Monotonic is pegged @@ -64,20 +63,17 @@ struct timekeeper { * - wall_to_monotonic is no longer the boot time, getboottime must be * used instead. */ - struct timespec wall_to_monotonic; + struct timespec wall_to_monotonic; /* time spent in suspend */ - struct timespec total_sleep_time; + struct timespec total_sleep_time; /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */ - struct timespec raw_time; - + struct timespec raw_time; /* Offset clock monotonic -> clock realtime */ - ktime_t offs_real; - + ktime_t offs_real; /* Offset clock monotonic -> clock boottime */ - ktime_t offs_boot; - + ktime_t offs_boot; /* Seqlock for all timekeeper values */ - seqlock_t lock; + seqlock_t lock; }; static struct timekeeper timekeeper; @@ -547,6 +543,7 @@ u64 timekeeping_max_deferment(void) { unsigned long seq; u64 ret; + do { seq = read_seqbegin(&timekeeper.lock);