From patchwork Sun Sep 18 06:03:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 76445 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp405828qgf; Sat, 17 Sep 2016 23:05:09 -0700 (PDT) X-Received: by 10.67.7.70 with SMTP id da6mr36500706pad.111.1474178709580; Sat, 17 Sep 2016 23:05:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x184si20599765pfb.210.2016.09.17.23.05.08; Sat, 17 Sep 2016 23:05:09 -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=@linaro.org; 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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755876AbcIRGEr (ORCPT + 27 others); Sun, 18 Sep 2016 02:04:47 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:34837 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753196AbcIRGEq (ORCPT ); Sun, 18 Sep 2016 02:04:46 -0400 Received: by mail-pf0-f181.google.com with SMTP id z123so40112139pfz.2 for ; Sat, 17 Sep 2016 23:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qgz3ECRle6Grc506C6twaqesFQcygYrmQJF8pYucAC0=; b=ixEr73Ho5Xd8kMyBjaBTddZsGwSC0xVVm51EhHds8yCouLkahV32Fcvzo3RgavHRhP xfsuPLVsaG6zTxp3Z5rtqIJ9JLFj1T363pjEiHFJpvyInhnjfDpQR1NQQoVqyri1x8EJ RiWPtj4v6L5rt+hmAMS+/uHCpSoXAHp7vqKJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qgz3ECRle6Grc506C6twaqesFQcygYrmQJF8pYucAC0=; b=O2SjjCmtFoXYcwOugqZgxFVW5B1rgIIA6bdF0Tn0yTXLAYAVDwSpY9CqhppZtc7027 ju5AkDTU5gkCM5U6csKT099mp6Hc5CyqsBu+xEQeYu3DnSccM6aYZ12fT/xB1fjFnVEp 6fcB1NlFVJbWEAMgeqPoGjgqQ3FF5U1nXk1m7qDXtghZ4WSw51vwypLL0deo26HtRSNW 965NKpcFD0V3ciqF3Yr3N4p2/LL0li1gE57a2/f4uOcIqXe3p/7hNKAbejRqVoKrQiG9 Y/0MOnU+oKEb5h93C5QVSDvjZRl1zB5gfrm+bAXBgQD8S25RP6NL9OpAGNVCU/G3eiNQ lyiw== X-Gm-Message-State: AE9vXwPuuvJwTI9QLKfo3D0RrjHLIH32mNkrPlljihp+afJIybBxWm2ntWZ9egBA+Ky4MTGM X-Received: by 10.98.8.13 with SMTP id c13mr36802132pfd.166.1474178685226; Sat, 17 Sep 2016 23:04:45 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id p4sm62398585pfp.60.2016.09.17.23.04.42 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Sep 2016 23:04:44 -0700 (PDT) From: Baolin Wang To: a.zummo@towertech.it, alexandre.belloni@free-electrons.com, rostedt@goodmis.org, mingo@redhat.com, john.stultz@linaro.org, tglx@linutronix.de Cc: baolin.wang@linaro.org, broonie@kernel.org, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: [PATCH 1/2] rtc: Add some dummy static inline functions Date: Sun, 18 Sep 2016 14:03:54 +0800 Message-Id: <8c570c152c95087faa75e397c667b6d5b8d98b3b.1474177609.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch 2 in this patchset adding tracepoints for alarmtimers will build failed on S390 platform, due to S390 defconfig did not define CONFIG_RTC_LIB macro to define the rtc_ktime_to_tm() function which is used in this patch. Thus we should add some ummy static inline functions in case CONFIG_RTC_LIB is not defined. Signed-off-by: Baolin Wang --- include/linux/rtc.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) -- 1.7.9.5 diff --git a/include/linux/rtc.h b/include/linux/rtc.h index b693ada..521f752 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -16,13 +16,60 @@ #include #include +#ifdef CONFIG_RTC_LIB extern int rtc_month_days(unsigned int month, unsigned int year); -extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year); +extern int rtc_year_days(unsigned int day, unsigned int month, + unsigned int year); extern int rtc_valid_tm(struct rtc_time *tm); extern time64_t rtc_tm_to_time64(struct rtc_time *tm); extern void rtc_time64_to_tm(time64_t time, struct rtc_time *tm); ktime_t rtc_tm_to_ktime(struct rtc_time tm); struct rtc_time rtc_ktime_to_tm(ktime_t kt); +#else +static inline int rtc_month_days(unsigned int month, unsigned int year) +{ + return 0; +} + +static inline int rtc_year_days(unsigned int day, unsigned int month, + unsigned int year) +{ + return 0; +} + +static inline int rtc_valid_tm(struct rtc_time *tm) +{ + return 0; +} + +static inline time64_t rtc_tm_to_time64(struct rtc_time *tm) +{ + time64_t ret; + + memset(&ret, 0, sizeof(time64_t)); + return ret; +} + +static inline void rtc_time64_to_tm(time64_t time, struct rtc_time *tm) +{ +} + +static inline ktime_t rtc_tm_to_ktime(struct rtc_time tm) +{ + ktime_t ret; + + memset(&ret, 0, sizeof(ktime_t)); + return ret; +} + +static inline struct rtc_time rtc_ktime_to_tm(ktime_t kt) +{ + struct rtc_time ret; + + memset(&ret, 0, sizeof(struct rtc_time)); + return ret; +} +#endif /* * rtc_tm_sub - Return the difference in seconds.