From patchwork Fri Jun 21 15:37:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 167399 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp897278ilk; Fri, 21 Jun 2019 08:38:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6F6xojBHyRehD/gANY2ah9GzTrUbv0eqi6omsQ5nKfRRnlelLGQaFSDLCyurlfgMAAkWI X-Received: by 2002:a17:90a:2385:: with SMTP id g5mr7675136pje.12.1561131485107; Fri, 21 Jun 2019 08:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561131485; cv=none; d=google.com; s=arc-20160816; b=to+FYPD9+iJcXGqn9K/ohqMUdnTSQd5JkHx+ltcXFGOQtCXPa0fizHPnkNZpF7ssH8 IyaBv7nQAjZ/8VN66u+2vpaQMHZM7ADMKo8cWHkee131otAyhNRMMa1ARRbGExcU3Cxm vUw1Fo/xOKg1t7w3JCLKlWsPjCKK7Np/yHPdr0jYfkLdc/G3yWY30BJsITTyy4qvxpg6 MZltWXoAZx7EX1RmfLUMPWpCypwHVm8ZWJ6B7+gGyJitNoEw23uB8pF2TP7zw3s7LOVU 3hIzXqUM+FJtGFXIHXvfQR7eKXxjiml8QoxMjFmNSGNJ9VKSTHlXm9+UGY5/5A6lO23y z0Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qu+wBuge9Y16gpnbLxar+BTxAA4mEcW4vlJqeeHQu50=; b=alO/j/SdrODatisL2Hz84lIKhpun4SK2lUdVhEzDZHnddO5AXdfJUIGIUJeWfo7GYF Zb4TaBQXBhMJlGB5KdIXJRpngUgEolbQHTzs1uStnFnr+8bUUc9HIaBPqLpuWd1ghhlq J+FRA3amwxd5g2g7AdmZBo9RWTSt68O9foNpku1Qm2TERc47NGwWmp6xfqvqahqswMGp jigG4+vVMyTBSYl0o+mO7LEE4Q2v3ynbVGF+V/DTh9bdmsiKKuYaxHcVQaLyO7nscx1P 0svaMGAAM8sCrWQ1RYHnNnUMLdBwjmAiJNU6/7THxbRMfCtqVBrjk2L6dXVWLQwF8/9P K+oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=scFEGd1n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m39si2907999plg.155.2019.06.21.08.38.04; Fri, 21 Jun 2019 08:38:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=scFEGd1n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726441AbfFUPiD (ORCPT + 30 others); Fri, 21 Jun 2019 11:38:03 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:55159 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfFUPhz (ORCPT ); Fri, 21 Jun 2019 11:37:55 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 0bec5a0f; Fri, 21 Jun 2019 15:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=mail; bh=BCgOtPxwBhFl9ERxKMkR8S0mK lU=; b=scFEGd1ncq6oir8sEIde021C2HPhWfwq7473ZlhPnucCEzV7ylcKoG4J2 XE9+gwK1qVAWrrlz/9Q0xnkXhq2KJid2412C2qKdL3mnmQwrBG7i4QKUq1cme9z6 1z0lcPkkO12WxDs1jD1+OcCbbnBELzc8YvvzhpLdo2Hkce5b4LhffG5awobUUPYk S9JwTfNTsTQWMEDlTEjsi19IzMYIo0K6XobnNoE4gQ2fMfG2iSWt5LqrivOkRCWt 0GilGlC9DYPqjD5rfxnLFbvTjz3f3ccoGy8graOt1EL9GsQy+2wgWDGqn7FUOAlB sxrYP4S3pcnEfFq4i8oYHlk/3Nvfw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 5c4f79f2 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 21 Jun 2019 15:04:28 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" , Arnd Bergmann , Thomas Gleixner Subject: [PATCH v4 2/4] timekeeping: use proper ktime_add when adding nsecs in coarse offset Date: Fri, 21 Jun 2019 17:37:39 +0200 Message-Id: <20190621153741.20159-2-Jason@zx2c4.com> In-Reply-To: <20190621153741.20159-1-Jason@zx2c4.com> References: <20190621153741.20159-1-Jason@zx2c4.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While this doesn't actually amount to a real difference, since the macro evaluates to the same thing, every place else operates on ktime_t using these functions, so let's not break the pattern. Fixes: e3ff9c3678b4 ("timekeeping: Repair ktime_get_coarse*() granularity") Signed-off-by: Jason A. Donenfeld Cc: Arnd Bergmann Cc: Thomas Gleixner Acked-by: Arnd Bergmann --- kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 4c97c9c8c217..db0081a14b90 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -817,7 +817,7 @@ ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs) } while (read_seqcount_retry(&tk_core.seq, seq)); - return base + nsecs; + return ktime_add_ns(base, nsecs); } EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset);