Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661262 > unrolled thread
| Started by | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| First post | 2017-06-08 16:00 +0200 |
| Last post | 2017-06-08 19:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v1 25/25] PM: Switch to use %pt Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-08 16:00 +0200
Re: [PATCH v1 25/25] PM: Switch to use %pt "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-08 19:20 +0200
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-06-08 16:00 +0200 |
| Subject | [PATCH v1 25/25] PM: Switch to use %pt |
| Message-ID | <tQ68G-50i-29@gated-at.bofh.it> |
Use %pt instead of open coded variant to print content of
struct rtc_time in human readable format.
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/base/power/trace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index 1cda505d6a85..5e32a4f28a49 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -118,9 +118,7 @@ static unsigned int read_magic_time(void)
unsigned int val;
mc146818_get_time(&time);
- pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
- time.tm_hour, time.tm_min, time.tm_sec,
- time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
+ pr_info("RTC time: %ptt, date: %ptd\n", &time, &time);
val = time.tm_year; /* 100 years */
if (val > 100)
val -= 100;
--
2.11.0
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2017-06-08 19:20 +0200 |
| Message-ID | <tQ9ge-76r-1@gated-at.bofh.it> |
| In reply to | #1661262 |
On Thu, Jun 8, 2017 at 3:48 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> Use %pt instead of open coded variant to print content of
> struct rtc_time in human readable format.
>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/base/power/trace.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
> index 1cda505d6a85..5e32a4f28a49 100644
> --- a/drivers/base/power/trace.c
> +++ b/drivers/base/power/trace.c
> @@ -118,9 +118,7 @@ static unsigned int read_magic_time(void)
> unsigned int val;
>
> mc146818_get_time(&time);
> - pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
> - time.tm_hour, time.tm_min, time.tm_sec,
> - time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
> + pr_info("RTC time: %ptt, date: %ptd\n", &time, &time);
> val = time.tm_year; /* 100 years */
> if (val > 100)
> val -= 100;
> --
> 2.11.0
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web