rtc: omap: switch to rtc_time64_to_tm/rtc_tm_to_time64
Alexandre Belloni
maintainerPATCH 1/3 rtc: omap: switch to rtc_time64_to_tm/rtc_tm_to_time64
Call the 64bit versions of rtc_time_to_tm now that the range is enforced by the core.
--- drivers/rtc/rtc-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-omap.c +2 -2
@@ -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);
Signature · 1 line
2.20.1
Alexandre Belloni
maintainerPATCH 2/3 rtc: omap: convert to SPDX identifier
Use SPDX-License-Identifier instead of a verbose license text.
--- drivers/rtc/rtc-omap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/rtc/rtc-omap.c +1 -5
@@ -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 <[email protected]> -* -* 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>
Signature · 1 line
2.20.1
Alexandre Belloni
maintainerPATCH 3/3 rtc: omap: checkpatch cleanup
In reply to Alexandre BelloniProperly align code with opening parenthesis.
--- drivers/rtc/rtc-omap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/rtc/rtc-omap.c +9 -9
@@ -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 ; }
Signature · 1 line
2.20.1
Re: [PATCH 3/3] rtc: omap: checkpatch cleanup
Quoted 1 line · Alexandre Belloni
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
Alexandre Belloni
maintainerRe: [PATCH 3/3] rtc: omap: checkpatch cleanup
Quoted 6 lines · Johan Hovold
Quoted 1 line · Alexandre Belloni
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.
Quoted 7 lines
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.
Quoted 1 line
Johan
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com