From patchwork Thu Sep 8 02:41:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 667224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ua0-x23f.google.com (mail-ua0-x23f.google.com [IPv6:2607:f8b0:400c:c08::23f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sV4Ng6Vlkz9s3v for ; Thu, 8 Sep 2016 12:41:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=AqqlhImq; dkim-atps=neutral Received: by mail-ua0-x23f.google.com with SMTP id 31sf15161843uao.1 for ; Wed, 07 Sep 2016 19:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=IRvN/jhYO4Sw01yEJNnp8BVI0A2xnFml5DjHl6IwjFE=; b=AqqlhImq8clsr5BvyAT8UoHX3IhuQb4O1B17ZaCNJ+en8b3KRT7undN3twExuN8rTx vQS5eIz60JAgOo+Ed477HSVyIvOk3gSwyxKE4yINJNf8YInzlLVJ+AeCpZeV3bM0OtR6 mD36EzVoT25nNMY63B5zJr8flaMxjZxU55Q1aecqMvbfc1h8d6sL4+VWcjgzh81otVRK bzCnxxhLMPn09baEM2s3Py480uIlu1i0Xzzad+FZvHfg0eGBO9tNcelzy6sDBqBXf8zf ayAPeZ74QXQdg84ap/5YCDAg5ez8C1//je0fNEpeDUIiLz6CwBVXOWLeQZJ18mCRhuM8 GkvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=IRvN/jhYO4Sw01yEJNnp8BVI0A2xnFml5DjHl6IwjFE=; b=BWy1aKRObdlsqSsjSjFKqVsFHSS5CBLztQ18XlWD8KpBSiTl3ghZPgsJk9MWQlWoWp kV13VyzplVUIJwv2heCLAVidc0SmpFztBjahMouyj6IUJrpe+6Vxd+WZCXy9BjqCHO0H AONgapxFILe1xyQx1Ft/UkCIuIMSiqrytbWjKHn9HXJqd4AT6nA9diw0J9Sr2kIQbUaz F6T41znulUdr7bAfh33u8TYjUzSw8DfuTD/wok69Y4i2H4Pyf/cW25NpWPLtum6qV659 kLnqXhhxVEppzGpp0LZ9R0XfGJAquNkWU1/dmWkCDX/2x8BBkz2vpPKj7r3Df1zghBOn U0yg== Sender: rtc-linux@googlegroups.com X-Gm-Message-State: AE9vXwORwlTMhNaHaKSMiRCLQ4UYdgtD+tX073QZisiMnE92QbcvTHODQjd5EGcnkwgECQ== X-Received: by 10.157.29.252 with SMTP id w57mr3639071otw.16.1473302513238; Wed, 07 Sep 2016 19:41:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.157.10.23 with SMTP id 23ls1646888otg.44.gmail; Wed, 07 Sep 2016 19:41:52 -0700 (PDT) X-Received: by 10.237.49.36 with SMTP id 33mr42515546qtg.15.1473302512912; Wed, 07 Sep 2016 19:41:52 -0700 (PDT) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com. [2607:f8b0:400e:c03::22c]) by gmr-mx.google.com with ESMTPS id 125si508097itw.2.2016.09.07.19.41.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Sep 2016 19:41:52 -0700 (PDT) Received-SPF: pass (google.com: domain of baolin.wang@linaro.org designates 2607:f8b0:400e:c03::22c as permitted sender) client-ip=2607:f8b0:400e:c03::22c; Received: by mail-pa0-x22c.google.com with SMTP id to9so12186927pac.1 for ; Wed, 07 Sep 2016 19:41:52 -0700 (PDT) X-Received: by 10.66.190.200 with SMTP id gs8mr5118176pac.42.1473302512563; Wed, 07 Sep 2016 19:41:52 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id d6sm41360909pfe.37.2016.09.07.19.41.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 19:41:52 -0700 (PDT) From: Baolin Wang To: a.zummo@towertech.it, alexandre.belloni@free-electrons.com Cc: rostedt@goodmis.org, mingo@redhat.com, john.stultz@linaro.org, tglx@linutronix.de, baolin.wang@linaro.org, broonie@kernel.org, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH v2] rtc: Add some dummy static inline functions Date: Thu, 8 Sep 2016 10:41:04 +0800 Message-Id: <1a8cf6da9924b566aef1d00a31414e46e7f7fb71.1473302325.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Original-Sender: baolin.wang@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of baolin.wang@linaro.org designates 2607:f8b0:400e:c03::22c as permitted sender) smtp.mailfrom=baolin.wang@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The patch (commit id: a0a6e06d545a753740c9d8d5ce2c4fdd3ab1c021) 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 dummy static inline functions in case CONFIG_RTC_LIB is not defined. Signed-off-by: Baolin Wang Fixes: a0a6e06d545a ("time: alarmtimer: Add tracepoints for alarmtimers") --- Changes since v1: - Modify the commit log. --- include/linux/rtc.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) 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.