public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mark Salyzyn <salyzyn@android.com>, linux-kernel@vger.kernel.org
Cc: rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz,
	linux-pm@vger.kernel.org, a.zummo@towertech.it,
	alexandre.belloni@free-electrons.com, linux-rtc@vger.kernel.org
Subject: Re: [PATCH 1/4] rtc-lib: Add rtc_show_time(const char *prefix_msg)
Date: Tue, 18 Jul 2017 10:41:35 -0700	[thread overview]
Message-ID: <1500399695.25934.25.camel@perches.com> (raw)
In-Reply-To: <20170718172525.114514-1-salyzyn@android.com>

On Tue, 2017-07-18 at 10:25 -0700, Mark Salyzyn wrote:
> Go directly to the rtc for persistent wall clock time and print.
> Useful if REALTIME is required to be logged in a low level power
> management function or when clock activities are suspended.  An
> aid to permit user space alignment of kernel activities.
[]
> diff --git a/include/linux/rtc.h b/include/linux/rtc.h
[]
> @@ -22,6 +22,11 @@ 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);
> +#ifdef CONFIG_RTC_SHOW_TIME
> +extern void rtc_show_time(const char *prefix_msg);
> +#else
> +#define rtc_show_time(prefix_msg)

It's generally better to use a static inline to avoid
misuses in newly added code in the !CONFIG_RTC_SHOW_TIME
compile path when CONFIG_RTC_SHOW_TIME may not be compiled.

static inline void rtc_show_time(const char *prefix_msg)
{
}

  reply	other threads:[~2017-07-18 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 17:25 [PATCH 1/4] rtc-lib: Add rtc_show_time(const char *prefix_msg) Mark Salyzyn
2017-07-18 17:41 ` Joe Perches [this message]
2017-07-18 17:46 ` Andy Shevchenko
2017-07-18 17:49   ` Andy Shevchenko
2017-07-18 17:52 ` Alexandre Belloni
2017-07-18 20:00   ` Mark Salyzyn
2017-07-18 20:08     ` Mark Salyzyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500399695.25934.25.camel@perches.com \
    --to=joe@perches.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=salyzyn@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox