From patchwork Sat Jan 28 00:59:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 92741 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp498858qgi; Fri, 27 Jan 2017 16:59:38 -0800 (PST) X-Received: by 10.84.171.195 with SMTP id l61mr16104213plb.84.1485565178375; Fri, 27 Jan 2017 16:59:38 -0800 (PST) Return-Path: Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com. [2607:f8b0:400e:c05::230]) by mx.google.com with ESMTPS id z14si3150614pgo.209.2017.01.27.16.59.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jan 2017 16:59:38 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::230 as permitted sender) client-ip=2607:f8b0:400e:c05::230; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::230 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x230.google.com with SMTP id 194so85207640pgd.2 for ; Fri, 27 Jan 2017 16:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vyKeZ4D1I23GO0GOfUliR2ADQhdgZAToSx6UOVM93c4=; b=Bf+2uPFgLgMHi4Z/smT5N8t49bQ5HTJc6ghnoLDFqp49nNlYsfyj1XsAMBWXuI1P5d KI7elimBHc79hgZjKdSqxOBTduZU8H46hhUpI/4t2o55rxpK2y/T3/vfBgMxwZnUtq38 Sw/StC8lDueBJEqo4wCaySbeIZGvzwlu9wCPM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vyKeZ4D1I23GO0GOfUliR2ADQhdgZAToSx6UOVM93c4=; b=gFxrNOiS4fzJUj2buBicDG1aY+QU2MUZewXCKrVLqcJ1/jHaUAjY9oKQ5BYjm7yfbz kgQ3HT+ttjsRE60AWG92zGV0k7i0USxaUifn81qNLM0+CFssxEFXbdy6ftYiZhHNNfr1 YTIMnfvaR5QTOI2IzaJMui8uBjvXm54po3Bxd9APAnkkhy1uYSligv2wnh25AXjvSYd3 QXBS+nouQajodMta1sATGXYYNQRMs39NfurTh0+slhJBWxCVP7Qli49pvjD0mc20Ipxr /JGpy4qZ7M+k1ph8lf3FkMFrjqHHVs39nLxb5VIsVH9GQ06DXKCJkOI+yAuSxmpFTOfJ DPQQ== X-Gm-Message-State: AIkVDXIBt+CVEkd35Hkei/JgJSp4iV+nxBpCNDwD9YfP/AfPnmkImv+3pPR5q6XiIYfaIcE8DzM= X-Received: by 10.98.27.149 with SMTP id b143mr11985611pfb.5.1485565178014; Fri, 27 Jan 2017 16:59:38 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id l25sm14025441pfb.24.2017.01.27.16.59.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 27 Jan 2017 16:59:37 -0800 (PST) From: John Stultz To: lkml Cc: Stephen Boyd , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Ingo Molnar , John Stultz Subject: [PATCH 1/3] timekeeping: Remove unused timekeeping_{get, set}_tai_offset() Date: Fri, 27 Jan 2017 16:59:29 -0800 Message-Id: <1485565171-21223-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1485565171-21223-1-git-send-email-john.stultz@linaro.org> References: <1485565171-21223-1-git-send-email-john.stultz@linaro.org> From: Stephen Boyd The last caller to timekeeping_set_tai_offset() was in commit 0b5154fb9040 (timekeeping: Simplify tai updating from do_adjtimex, 2013-03-22) and the last caller to timekeeping_get_tai_offset() was in commit 76f4108892d9 (hrtimer: Cleanup hrtimer accessors to the timekepeing state, 2014-07-16). Remove these unused functions now that we handle TAI offsets differently. Cc: Thomas Gleixner Cc: Richard Cochran Cc: Prarit Bhargava Cc: Ingo Molnar Signed-off-by: Stephen Boyd Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 39 +-------------------------------------- kernel/time/timekeeping.h | 2 -- 2 files changed, 1 insertion(+), 40 deletions(-) -- 2.7.4 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index db087d7e1..95b258d 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1275,27 +1275,8 @@ int timekeeping_inject_offset(struct timespec *ts) } EXPORT_SYMBOL(timekeeping_inject_offset); - -/** - * timekeeping_get_tai_offset - Returns current TAI offset from UTC - * - */ -s32 timekeeping_get_tai_offset(void) -{ - struct timekeeper *tk = &tk_core.timekeeper; - unsigned int seq; - s32 ret; - - do { - seq = read_seqcount_begin(&tk_core.seq); - ret = tk->tai_offset; - } while (read_seqcount_retry(&tk_core.seq, seq)); - - return ret; -} - /** - * __timekeeping_set_tai_offset - Lock free worker function + * __timekeeping_set_tai_offset - Sets the TAI offset from UTC and monotonic * */ static void __timekeeping_set_tai_offset(struct timekeeper *tk, s32 tai_offset) @@ -1305,24 +1286,6 @@ static void __timekeeping_set_tai_offset(struct timekeeper *tk, s32 tai_offset) } /** - * timekeeping_set_tai_offset - Sets the current TAI offset from UTC - * - */ -void timekeeping_set_tai_offset(s32 tai_offset) -{ - struct timekeeper *tk = &tk_core.timekeeper; - unsigned long flags; - - raw_spin_lock_irqsave(&timekeeper_lock, flags); - write_seqcount_begin(&tk_core.seq); - __timekeeping_set_tai_offset(tk, tai_offset); - timekeeping_update(tk, TK_MIRROR | TK_CLOCK_WAS_SET); - write_seqcount_end(&tk_core.seq); - raw_spin_unlock_irqrestore(&timekeeper_lock, flags); - clock_was_set(); -} - -/** * change_clocksource - Swaps clocksources if a new one is available * * Accumulates current time interval and initializes new clocksource diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h index 704f595..d091467 100644 --- a/kernel/time/timekeeping.h +++ b/kernel/time/timekeeping.h @@ -11,8 +11,6 @@ extern ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq, extern int timekeeping_valid_for_hres(void); extern u64 timekeeping_max_deferment(void); extern int timekeeping_inject_offset(struct timespec *ts); -extern s32 timekeeping_get_tai_offset(void); -extern void timekeeping_set_tai_offset(s32 tai_offset); extern int timekeeping_suspend(void); extern void timekeeping_resume(void);