linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] rtc: omap: switch to rtc_time64_to_tm/rtc_tm_to_time64
@ 2019-03-20 12:45 Alexandre Belloni
  2019-03-20 12:45 ` [PATCH 2/3] rtc: omap: convert to SPDX identifier Alexandre Belloni
  2019-03-20 12:45 ` [PATCH 3/3] rtc: omap: checkpatch cleanup Alexandre Belloni
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-03-20 12:45 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

Call the 64bit versions of rtc_time_to_tm now that the range is enforced by
the core.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-omap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index ea0eb48f3bb9..e0cf9344b146 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -433,8 +433,8 @@ static void omap_rtc_power_off(void)
 	omap_rtc_read_time_raw(rtc, &tm);
 	seconds = tm.tm_sec;
 	bcd2tm(&tm);
-	rtc_tm_to_time(&tm, &now);
-	rtc_time_to_tm(now + 1, &tm);
+	now = rtc_tm_to_time64(&tm);
+	rtc_time64_to_tm(now + 1, &tm);
 
 	tm2bcd(&tm);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] rtc: omap: convert to SPDX identifier
  2019-03-20 12:45 [PATCH 1/3] rtc: omap: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
@ 2019-03-20 12:45 ` Alexandre Belloni
  2019-03-20 12:45 ` [PATCH 3/3] rtc: omap: checkpatch cleanup Alexandre Belloni
  1 sibling, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-03-20 12:45 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

Use SPDX-License-Identifier instead of a verbose license text.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-omap.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index e0cf9344b146..78082f94495e 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * TI OMAP Real Time Clock interface for Linux
  *
@@ -6,11 +7,6 @@
  *
  * Copyright (C) 2006 David Brownell (new RTC framework)
  * Copyright (C) 2014 Johan Hovold <johan@kernel.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
  */
 
 #include <dt-bindings/gpio/gpio.h>
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] rtc: omap: checkpatch cleanup
  2019-03-20 12:45 [PATCH 1/3] rtc: omap: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
  2019-03-20 12:45 ` [PATCH 2/3] rtc: omap: convert to SPDX identifier Alexandre Belloni
@ 2019-03-20 12:45 ` Alexandre Belloni
  2019-03-20 13:31   ` Johan Hovold
  1 sibling, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2019-03-20 12:45 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

Properly align code with opening parenthesis.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-omap.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 78082f94495e..ec3957c43cb6 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -450,7 +450,7 @@ static void omap_rtc_power_off(void)
 	 */
 	val = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG);
 	rtc_writel(rtc, OMAP_RTC_INTERRUPTS_REG,
-			val | OMAP_RTC_INTERRUPTS_IT_ALARM2);
+		   val | OMAP_RTC_INTERRUPTS_IT_ALARM2);
 
 	/* Retry in case roll over happened before alarm was armed. */
 	if (rtc_read(rtc, OMAP_RTC_SECONDS_REG) != seconds) {
@@ -538,7 +538,7 @@ static int rtc_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
 }
 
 static const char *rtc_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
-					unsigned int group)
+					      unsigned int group)
 {
 	return NULL;
 }
@@ -563,7 +563,7 @@ static const struct pin_config_item rtc_conf_items[ARRAY_SIZE(rtc_params)] = {
 #endif
 
 static int rtc_pinconf_get(struct pinctrl_dev *pctldev,
-			unsigned int pin, unsigned long *config)
+			   unsigned int pin, unsigned long *config)
 {
 	struct omap_rtc *rtc = pinctrl_dev_get_drvdata(pctldev);
 	unsigned int param = pinconf_to_config_param(*config);
@@ -591,8 +591,8 @@ static int rtc_pinconf_get(struct pinctrl_dev *pctldev,
 }
 
 static int rtc_pinconf_set(struct pinctrl_dev *pctldev,
-			unsigned int pin, unsigned long *configs,
-			unsigned int num_configs)
+			   unsigned int pin, unsigned long *configs,
+			   unsigned int num_configs)
 {
 	struct omap_rtc *rtc = pinctrl_dev_get_drvdata(pctldev);
 	u32 val;
@@ -757,7 +757,7 @@ static int omap_rtc_probe(struct platform_device *pdev)
 	if (rtc->type->has_32kclk_en) {
 		reg = rtc_read(rtc, OMAP_RTC_OSC_REG);
 		rtc_writel(rtc, OMAP_RTC_OSC_REG,
-				reg | OMAP_RTC_OSC_32KCLK_EN);
+			   reg | OMAP_RTC_OSC_32KCLK_EN);
 	}
 
 	/* clear old status */
@@ -835,13 +835,13 @@ static int omap_rtc_probe(struct platform_device *pdev)
 
 	/* handle periodic and alarm irqs */
 	ret = devm_request_irq(&pdev->dev, rtc->irq_timer, rtc_irq, 0,
-			dev_name(&rtc->rtc->dev), rtc);
+			       dev_name(&rtc->rtc->dev), rtc);
 	if (ret)
 		goto err;
 
 	if (rtc->irq_timer != rtc->irq_alarm) {
 		ret = devm_request_irq(&pdev->dev, rtc->irq_alarm, rtc_irq, 0,
-				dev_name(&rtc->rtc->dev), rtc);
+				       dev_name(&rtc->rtc->dev), rtc);
 		if (ret)
 			goto err;
 	}
@@ -889,7 +889,7 @@ static int omap_rtc_remove(struct platform_device *pdev)
 	u8 reg;
 
 	if (pm_power_off == omap_rtc_power_off &&
-			omap_rtc_power_off_rtc == rtc) {
+	    omap_rtc_power_off_rtc == rtc) {
 		pm_power_off = NULL;
 		omap_rtc_power_off_rtc = NULL;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] rtc: omap: checkpatch cleanup
  2019-03-20 12:45 ` [PATCH 3/3] rtc: omap: checkpatch cleanup Alexandre Belloni
@ 2019-03-20 13:31   ` Johan Hovold
  2019-03-22  6:35     ` Alexandre Belloni
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2019-03-20 13:31 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: linux-rtc, linux-kernel

On Wed, Mar 20, 2019 at 01:45:35PM +0100, Alexandre Belloni wrote:
> Properly align code with opening parenthesis.

FWIW, this is a checkpatch --strict warning you're addressing, and not
something that is enforced by the coding standard.

Indenting continuation lines at least two tabs further conforms with the
coding style which says to indent lines substantially to the right (and
you don't have to run around realigning things should a function call be
renamed, etc).

But your call.

Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] rtc: omap: checkpatch cleanup
  2019-03-20 13:31   ` Johan Hovold
@ 2019-03-22  6:35     ` Alexandre Belloni
  0 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-03-22  6:35 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-rtc, linux-kernel

On 20/03/2019 14:31:53+0100, Johan Hovold wrote:
> On Wed, Mar 20, 2019 at 01:45:35PM +0100, Alexandre Belloni wrote:
> > Properly align code with opening parenthesis.
> 
> FWIW, this is a checkpatch --strict warning you're addressing, and not
> something that is enforced by the coding standard.
> 
> Indenting continuation lines at least two tabs further conforms with the
> coding style which says to indent lines substantially to the right (and
> you don't have to run around realigning things should a function call be
> renamed, etc).
> 
> But your call.
> 

That's fine, I can drop that one.

> Johan

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-22  6:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 12:45 [PATCH 1/3] rtc: omap: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
2019-03-20 12:45 ` [PATCH 2/3] rtc: omap: convert to SPDX identifier Alexandre Belloni
2019-03-20 12:45 ` [PATCH 3/3] rtc: omap: checkpatch cleanup Alexandre Belloni
2019-03-20 13:31   ` Johan Hovold
2019-03-22  6:35     ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).