Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526437

Re: [PATCH 3/4] timekeeping: Ignore the bogus sleep time if pm_trace is enabled

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] timekeeping: Ignore the bogus sleep time if pm_trace is enabled
Date 2016-11-21 09:20 +0100
Message-ID <sFRZv-7a5-13@gated-at.bofh.it> (permalink)
References <sF5UR-78-3@gated-at.bofh.it> <sF5UR-78-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* John Stultz <john.stultz@linaro.org> wrote:

> +static int pm_trace_notify(struct notifier_block *nb,
> +				unsigned long mode, void *_unused)
> +{
> +	switch (mode) {
> +	case PM_POST_HIBERNATION:
> +	case PM_POST_SUSPEND:
> +		if (pm_trace_rtc_abused) {
> +			pm_trace_rtc_abused = false;
> +			pr_warn("Possible incorrect RTC due to pm_trace,"
> +				"please use ntp-date or rdate to reset.\n");

Please don't break user-visible strings just to pacify checkpatch!

The bogus linebreak above hides a type in the user string:

  Possible incorrect RTC due to pm_trace,please use ntp-date or rdate to reset.

(There's a missing space after the comma.)

Best practice is to preserve the continuous nature of the user string in the code. 

In addition to that, please quote suggested command names, i.e. something like:

  Possible incorrect RTC due to pm_trace, please use 'ntp-date' or 'rdate' to reset it.

> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -191,6 +191,13 @@ static inline void cmos_write_bank2(unsigned char val, unsigned char addr)
>  
>  static int cmos_read_time(struct device *dev, struct rtc_time *t)
>  {
> +	/*
> +	 * If pmtrace abused the RTC for storage tell the caller that it is
> +	 * unusable.
> +	 */
> +	if (!pm_trace_rtc_valid())
> +		return -EIO;

Please standardize the spelling of 'pm_trace', as there's 3 variants present in 
this patch alone:

  'pm_trace'
  'pm trace'
  'pmtrace'

(Not to mention pm-trace.h - but that's a pre-existing inconsistency unrelated to 
your patch.)

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL][PATCH 0/4] Timekeeping items for 4.10 John Stultz <john.stultz@linaro.org> - 2016-11-19 06:00 +0100
  [PATCH 3/4] timekeeping: Ignore the bogus sleep time if pm_trace is enabled John Stultz <john.stultz@linaro.org> - 2016-11-19 06:00 +0100
    Re: [PATCH 3/4] timekeeping: Ignore the bogus sleep time if pm_trace  is enabled Ingo Molnar <mingo@kernel.org> - 2016-11-21 09:20 +0100
      RE: [PATCH 3/4] timekeeping: Ignore the bogus sleep time if  pm_trace is enabled "Chen, Yu C" <yu.c.chen@intel.com> - 2016-11-24 11:00 +0100
  [PATCH 1/4] time: alarmtimer: Add the trcepoints for alarmtimer John Stultz <john.stultz@linaro.org> - 2016-11-19 06:00 +0100
    Re: [PATCH 1/4] time: alarmtimer: Add the trcepoints for alarmtimer Ingo Molnar <mingo@kernel.org> - 2016-11-21 09:20 +0100
      Re: [PATCH 1/4] time: alarmtimer: Add the trcepoints for alarmtimer Baolin Wang <baolin.wang@linaro.org> - 2016-11-21 09:50 +0100
        Re: [PATCH 1/4] time: alarmtimer: Add the trcepoints for  alarmtimer Thomas Gleixner <tglx@linutronix.de> - 2016-11-21 10:00 +0100
          Re: [PATCH 1/4] time: alarmtimer: Add the trcepoints for alarmtimer Baolin Wang <baolin.wang@linaro.org> - 2016-11-21 10:10 +0100
  [PATCH 2/4] selftests/timers: Fix spelling mistake "Asyncrhonous" -> "Asynchronous" John Stultz <john.stultz@linaro.org> - 2016-11-19 06:00 +0100

csiph-web