* [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers
@ 2024-08-21 9:28 Liao Yuanhong
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
` (6 more replies)
0 siblings, 7 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
The devm_clk_get_enabled() helpers:
- call devm_clk_get()
- call clk_prepare_enable() and register what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code and avoids the calls to clk_disable_unprepare().
Liao Yuanhong (7):
rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
rtc:rtc-imxdi:Use devm_clk_get_enabled() helpers
rtc:rtc-mt7622:Use devm_clk_get_enabled() helpers
rtc:rtc-s3c:Use devm_clk_get_enabled() helpers
rtc:rtc-sa1100:Use devm_clk_get_enabled() helpers
rtc:rtc-tegra:Use devm_clk_get_enabled() helpers
rtc:rtc-xgene:Use devm_clk_get_enabled() helpers
drivers/rtc/rtc-at91rm9200.c | 18 +++---------------
drivers/rtc/rtc-imxdi.c | 18 ++++--------------
drivers/rtc/rtc-mt7622.c | 24 ++++--------------------
drivers/rtc/rtc-s3c.c | 19 +++----------------
drivers/rtc/rtc-sa1100.c | 10 ++--------
drivers/rtc/rtc-tegra.c | 22 +++-------------------
drivers/rtc/rtc-xgene.c | 23 ++++-------------------
7 files changed, 23 insertions(+), 111 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
2024-08-21 11:22 ` Christophe JAILLET
` (5 more replies)
2024-08-21 9:28 ` [PATCH 2/7] rtc:rtc-imxdi:Use " Liao Yuanhong
` (5 subsequent siblings)
6 siblings, 6 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-at91rm9200.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-at91rm9200.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index c16fe711a0d9..81b2556930bb 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -498,14 +498,9 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
return PTR_ERR(rtc);
platform_set_drvdata(pdev, rtc);
- sclk = devm_clk_get(&pdev->dev, NULL);
+ sclk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(sclk))
return PTR_ERR(sclk);
-
- ret = clk_prepare_enable(sclk);
- if (ret) {
- dev_err(&pdev->dev, "Could not enable slow clock\n");
- return ret;
}
at91_rtc_write(AT91_RTC_CR, 0);
@@ -521,7 +516,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
"at91_rtc", pdev);
if (ret) {
dev_err(&pdev->dev, "IRQ %d already in use.\n", irq);
- goto err_clk;
+ return ret;
}
/* cpu init code should really have flagged this device as
@@ -539,7 +534,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
rtc->range_max = RTC_TIMESTAMP_END_2099;
ret = devm_rtc_register_device(rtc);
if (ret)
- goto err_clk;
+ return ret;
/* enable SECEV interrupt in order to initialize at91_rtc_upd_rdy
* completion.
@@ -548,11 +543,6 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
return 0;
-
-err_clk:
- clk_disable_unprepare(sclk);
-
- return ret;
}
/*
@@ -564,8 +554,6 @@ static void __exit at91_rtc_remove(struct platform_device *pdev)
at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
AT91_RTC_SECEV | AT91_RTC_TIMEV |
AT91_RTC_CALEV);
-
- clk_disable_unprepare(sclk);
}
static void at91_rtc_shutdown(struct platform_device *pdev)
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 2/7] rtc:rtc-imxdi:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
2024-08-22 2:44 ` [PATCH] rtc:rtc-at91rm9200:Use " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 3/7] rtc:rtc-mt7622:Use " Liao Yuanhong
` (4 subsequent siblings)
6 siblings, 1 reply; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-imxdi.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-imxdi.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 284011c419db..6cd75c5d8a9a 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -778,12 +778,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
if (IS_ERR(imxdi->rtc))
return PTR_ERR(imxdi->rtc);
- imxdi->clk = devm_clk_get(&pdev->dev, NULL);
+ imxdi->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(imxdi->clk))
return PTR_ERR(imxdi->clk);
- rc = clk_prepare_enable(imxdi->clk);
- if (rc)
- return rc;
/*
* Initialize dryice hardware
@@ -794,13 +791,13 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
rc = di_handle_state(imxdi);
if (rc != 0)
- goto err;
+ return rc;
rc = devm_request_irq(&pdev->dev, norm_irq, dryice_irq,
IRQF_SHARED, pdev->name, imxdi);
if (rc) {
dev_warn(&pdev->dev, "interrupt not available.\n");
- goto err;
+ return rc;
}
rc = devm_request_irq(&pdev->dev, sec_irq, dryice_irq,
@@ -820,14 +817,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
rc = devm_rtc_register_device(imxdi->rtc);
if (rc)
- goto err;
+ return rc;
return 0;
-
-err:
- clk_disable_unprepare(imxdi->clk);
-
- return rc;
}
static void __exit dryice_rtc_remove(struct platform_device *pdev)
@@ -838,8 +830,6 @@ static void __exit dryice_rtc_remove(struct platform_device *pdev)
/* mask all interrupts */
writel(0, imxdi->ioaddr + DIER);
-
- clk_disable_unprepare(imxdi->clk);
}
static const struct of_device_id dryice_dt_ids[] = {
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 3/7] rtc:rtc-mt7622:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 2/7] rtc:rtc-imxdi:Use " Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
2024-08-21 11:25 ` Christophe JAILLET
2024-08-22 2:57 ` [PATCH v2 " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 4/7] rtc:rtc-s3c:Use " Liao Yuanhong
` (3 subsequent siblings)
6 siblings, 2 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-mt7622.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-mt7622.c | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
index 094c649fc137..da1d9652d6da 100644
--- a/drivers/rtc/rtc-mt7622.c
+++ b/drivers/rtc/rtc-mt7622.c
@@ -315,27 +315,23 @@ static int mtk_rtc_probe(struct platform_device *pdev)
if (IS_ERR(hw->base))
return PTR_ERR(hw->base);
- hw->clk = devm_clk_get(&pdev->dev, "rtc");
+ hw->clk = devm_clk_get_enabled(&pdev->dev, "rtc");
if (IS_ERR(hw->clk)) {
dev_err(&pdev->dev, "No clock\n");
return PTR_ERR(hw->clk);
}
- ret = clk_prepare_enable(hw->clk);
- if (ret)
- return ret;
-
hw->irq = platform_get_irq(pdev, 0);
if (hw->irq < 0) {
ret = hw->irq;
- goto err;
+ return ret;
}
ret = devm_request_irq(&pdev->dev, hw->irq, mtk_rtc_alarmirq,
0, dev_name(&pdev->dev), hw);
if (ret) {
dev_err(&pdev->dev, "Can't request IRQ\n");
- goto err;
+ return ret;
}
mtk_rtc_hw_init(hw);
@@ -347,21 +343,10 @@ static int mtk_rtc_probe(struct platform_device *pdev)
if (IS_ERR(hw->rtc)) {
ret = PTR_ERR(hw->rtc);
dev_err(&pdev->dev, "Unable to register device\n");
- goto err;
+ return ret;
}
return 0;
-err:
- clk_disable_unprepare(hw->clk);
-
- return ret;
-}
-
-static void mtk_rtc_remove(struct platform_device *pdev)
-{
- struct mtk_rtc *hw = platform_get_drvdata(pdev);
-
- clk_disable_unprepare(hw->clk);
}
#ifdef CONFIG_PM_SLEEP
@@ -394,7 +379,6 @@ static SIMPLE_DEV_PM_OPS(mtk_rtc_pm_ops, mtk_rtc_suspend, mtk_rtc_resume);
static struct platform_driver mtk_rtc_driver = {
.probe = mtk_rtc_probe,
- .remove_new = mtk_rtc_remove,
.driver = {
.name = MTK_RTC_DEV,
.of_match_table = mtk_rtc_match,
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4/7] rtc:rtc-s3c:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
` (2 preceding siblings ...)
2024-08-21 9:28 ` [PATCH 3/7] rtc:rtc-mt7622:Use " Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
2024-08-22 5:07 ` kernel test robot
2024-08-22 6:50 ` [PATCH v2 " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 5/7] rtc:rtc-sa1100:Use " Liao Yuanhong
` (2 subsequent siblings)
6 siblings, 2 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-s3c.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-s3c.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 282238818f63..dd6a72b999e1 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -425,24 +425,18 @@ static int s3c_rtc_probe(struct platform_device *pdev)
if (IS_ERR(info->base))
return PTR_ERR(info->base);
- info->rtc_clk = devm_clk_get(&pdev->dev, "rtc");
+ info->rtc_clk = devm_clk_get_enabled(&pdev->dev, "rtc");
if (IS_ERR(info->rtc_clk))
return dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_clk),
"failed to find rtc clock\n");
- ret = clk_prepare_enable(info->rtc_clk);
- if (ret)
- return ret;
if (info->data->needs_src_clk) {
- info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src");
+ info->rtc_src_clk = devm_clk_get_enabled(&pdev->dev, "rtc_src");
if (IS_ERR(info->rtc_src_clk)) {
ret = dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_src_clk),
"failed to find rtc source clock\n");
- goto err_src_clk;
+ return ret;
}
- ret = clk_prepare_enable(info->rtc_src_clk);
- if (ret)
- goto err_src_clk;
}
/* disable RTC enable bits potentially set by the bootloader */
@@ -486,13 +480,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
err_nortc:
if (info->data->disable)
info->data->disable(info);
-
- if (info->data->needs_src_clk)
- clk_disable_unprepare(info->rtc_src_clk);
-err_src_clk:
- clk_disable_unprepare(info->rtc_clk);
-
- return ret;
}
#ifdef CONFIG_PM_SLEEP
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 5/7] rtc:rtc-sa1100:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
` (3 preceding siblings ...)
2024-08-21 9:28 ` [PATCH 4/7] rtc:rtc-s3c:Use " Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
2024-08-21 11:27 ` Christophe JAILLET
2024-08-22 3:13 ` [PATCH v2 " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 6/7] rtc:rtc-tegra:Use " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 7/7] rtc:rtc-xgene:Use " Liao Yuanhong
6 siblings, 2 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-sa1100.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-sa1100.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 0b2cfa8ca05b..2e72daa6a152 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -177,15 +177,12 @@ int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
spin_lock_init(&info->lock);
- info->clk = devm_clk_get(&pdev->dev, NULL);
+ info->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(info->clk)) {
dev_err(&pdev->dev, "failed to find rtc clock source\n");
return PTR_ERR(info->clk);
}
- ret = clk_prepare_enable(info->clk);
- if (ret)
- return ret;
/*
* According to the manual we should be able to let RTTR be zero
* and then a default diviser for a 32.768KHz clock is used.
@@ -206,10 +203,8 @@ int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
info->rtc->range_max = U32_MAX;
ret = devm_rtc_register_device(info->rtc);
- if (ret) {
- clk_disable_unprepare(info->clk);
+ if (ret)
return ret;
- }
/* Fix for a nasty initialization problem the in SA11xx RTSR register.
* See also the comments in sa1100_rtc_interrupt().
@@ -305,7 +300,6 @@ static void sa1100_rtc_remove(struct platform_device *pdev)
spin_lock_irq(&info->lock);
writel_relaxed(0, info->rtsr);
spin_unlock_irq(&info->lock);
- clk_disable_unprepare(info->clk);
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 6/7] rtc:rtc-tegra:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
` (4 preceding siblings ...)
2024-08-21 9:28 ` [PATCH 5/7] rtc:rtc-sa1100:Use " Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
2024-08-21 9:28 ` [PATCH 7/7] rtc:rtc-xgene:Use " Liao Yuanhong
6 siblings, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-tegra.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-tegra.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index 441e0a66b215..28db5b8cabdb 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -300,14 +300,10 @@ static int tegra_rtc_probe(struct platform_device *pdev)
info->rtc->ops = &tegra_rtc_ops;
info->rtc->range_max = U32_MAX;
- info->clk = devm_clk_get(&pdev->dev, NULL);
+ info->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(info->clk))
return PTR_ERR(info->clk);
- ret = clk_prepare_enable(info->clk);
- if (ret < 0)
- return ret;
-
/* set context info */
info->pdev = pdev;
spin_lock_init(&info->lock);
@@ -326,27 +322,16 @@ static int tegra_rtc_probe(struct platform_device *pdev)
&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "failed to request interrupt: %d\n", ret);
- goto disable_clk;
+ return ret;
}
ret = devm_rtc_register_device(info->rtc);
if (ret)
- goto disable_clk;
+ return ret;
dev_notice(&pdev->dev, "Tegra internal Real Time Clock\n");
return 0;
-
-disable_clk:
- clk_disable_unprepare(info->clk);
- return ret;
-}
-
-static void tegra_rtc_remove(struct platform_device *pdev)
-{
- struct tegra_rtc_info *info = platform_get_drvdata(pdev);
-
- clk_disable_unprepare(info->clk);
}
#ifdef CONFIG_PM_SLEEP
@@ -399,7 +384,6 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
static struct platform_driver tegra_rtc_driver = {
.probe = tegra_rtc_probe,
- .remove_new = tegra_rtc_remove,
.shutdown = tegra_rtc_shutdown,
.driver = {
.name = "tegra_rtc",
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 7/7] rtc:rtc-xgene:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
` (5 preceding siblings ...)
2024-08-21 9:28 ` [PATCH 6/7] rtc:rtc-tegra:Use " Liao Yuanhong
@ 2024-08-21 9:28 ` Liao Yuanhong
6 siblings, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-21 9:28 UTC (permalink / raw)
To: alexandre.belloni, linux-rtc, linux-kernel; +Cc: Liao Yuanhong
Use devm_clk_get_enabled() instead of clk functions in rtc-xgene.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/rtc/rtc-xgene.c | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c
index f78efc9760c0..96567c3906c1 100644
--- a/drivers/rtc/rtc-xgene.c
+++ b/drivers/rtc/rtc-xgene.c
@@ -162,32 +162,25 @@ static int xgene_rtc_probe(struct platform_device *pdev)
return ret;
}
- pdata->clk = devm_clk_get(&pdev->dev, NULL);
+ pdata->clk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(pdata->clk)) {
dev_err(&pdev->dev, "Couldn't get the clock for RTC\n");
return -ENODEV;
}
- ret = clk_prepare_enable(pdata->clk);
- if (ret)
- return ret;
/* Turn on the clock and the crystal */
writel(RTC_CCR_EN, pdata->csr_base + RTC_CCR);
ret = device_init_wakeup(&pdev->dev, 1);
- if (ret) {
- clk_disable_unprepare(pdata->clk);
+ if (ret)
return ret;
- }
pdata->rtc->ops = &xgene_rtc_ops;
pdata->rtc->range_max = U32_MAX;
ret = devm_rtc_register_device(pdata->rtc);
- if (ret) {
- clk_disable_unprepare(pdata->clk);
+ if (ret)
return ret;
- }
return 0;
}
@@ -198,7 +191,6 @@ static void xgene_rtc_remove(struct platform_device *pdev)
xgene_rtc_alarm_irq_enable(&pdev->dev, 0);
device_init_wakeup(&pdev->dev, 0);
- clk_disable_unprepare(pdata->clk);
}
static int __maybe_unused xgene_rtc_suspend(struct device *dev)
@@ -220,7 +212,6 @@ static int __maybe_unused xgene_rtc_suspend(struct device *dev)
} else {
pdata->irq_enabled = xgene_rtc_alarm_irq_enabled(dev);
xgene_rtc_alarm_irq_enable(dev, 0);
- clk_disable_unprepare(pdata->clk);
}
return 0;
}
@@ -239,14 +230,8 @@ static int __maybe_unused xgene_rtc_resume(struct device *dev)
disable_irq_wake(irq);
pdata->irq_wake = 0;
}
- } else {
- rc = clk_prepare_enable(pdata->clk);
- if (rc) {
- dev_err(dev, "Unable to enable clock error %d\n", rc);
- return rc;
- }
+ } else
xgene_rtc_alarm_irq_enable(dev, pdata->irq_enabled);
- }
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
@ 2024-08-21 11:22 ` Christophe JAILLET
2024-08-22 3:24 ` kernel test robot
` (4 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: Christophe JAILLET @ 2024-08-21 11:22 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Le 21/08/2024 à 11:28, Liao Yuanhong a écrit :
> Use devm_clk_get_enabled() instead of clk functions in rtc-at91rm9200.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> drivers/rtc/rtc-at91rm9200.c | 18 +++---------------
> 1 file changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
> index c16fe711a0d9..81b2556930bb 100644
> --- a/drivers/rtc/rtc-at91rm9200.c
> +++ b/drivers/rtc/rtc-at91rm9200.c
> @@ -498,14 +498,9 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
> return PTR_ERR(rtc);
> platform_set_drvdata(pdev, rtc);
>
> - sclk = devm_clk_get(&pdev->dev, NULL);
> + sclk = devm_clk_get_enabled(&pdev->dev, NULL);
Hi,
so now the global sclk variable could easily be removed as well.
CJ
> if (IS_ERR(sclk))
> return PTR_ERR(sclk);
> -
> - ret = clk_prepare_enable(sclk);
> - if (ret) {
> - dev_err(&pdev->dev, "Could not enable slow clock\n");
> - return ret;
> }
>
> at91_rtc_write(AT91_RTC_CR, 0);
> @@ -521,7 +516,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
> "at91_rtc", pdev);
> if (ret) {
> dev_err(&pdev->dev, "IRQ %d already in use.\n", irq);
> - goto err_clk;
> + return ret;
> }
>
> /* cpu init code should really have flagged this device as
> @@ -539,7 +534,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
> rtc->range_max = RTC_TIMESTAMP_END_2099;
> ret = devm_rtc_register_device(rtc);
> if (ret)
> - goto err_clk;
> + return ret;
>
> /* enable SECEV interrupt in order to initialize at91_rtc_upd_rdy
> * completion.
> @@ -548,11 +543,6 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
>
> dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
> return 0;
> -
> -err_clk:
> - clk_disable_unprepare(sclk);
> -
> - return ret;
> }
>
> /*
> @@ -564,8 +554,6 @@ static void __exit at91_rtc_remove(struct platform_device *pdev)
> at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
> AT91_RTC_SECEV | AT91_RTC_TIMEV |
> AT91_RTC_CALEV);
> -
> - clk_disable_unprepare(sclk);
> }
>
> static void at91_rtc_shutdown(struct platform_device *pdev)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 3/7] rtc:rtc-mt7622:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 3/7] rtc:rtc-mt7622:Use " Liao Yuanhong
@ 2024-08-21 11:25 ` Christophe JAILLET
2024-08-22 2:57 ` [PATCH v2 " Liao Yuanhong
1 sibling, 0 replies; 21+ messages in thread
From: Christophe JAILLET @ 2024-08-21 11:25 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Le 21/08/2024 à 11:28, Liao Yuanhong a écrit :
> Use devm_clk_get_enabled() instead of clk functions in rtc-mt7622.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> drivers/rtc/rtc-mt7622.c | 24 ++++--------------------
> 1 file changed, 4 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
> index 094c649fc137..da1d9652d6da 100644
> --- a/drivers/rtc/rtc-mt7622.c
> +++ b/drivers/rtc/rtc-mt7622.c
> @@ -315,27 +315,23 @@ static int mtk_rtc_probe(struct platform_device *pdev)
> if (IS_ERR(hw->base))
> return PTR_ERR(hw->base);
>
> - hw->clk = devm_clk_get(&pdev->dev, "rtc");
> + hw->clk = devm_clk_get_enabled(&pdev->dev, "rtc");
Hi,
the clk field in struct mtk_rtc could also be easily removed now.
CJ
> if (IS_ERR(hw->clk)) {
> dev_err(&pdev->dev, "No clock\n");
> return PTR_ERR(hw->clk);
> }
>
> - ret = clk_prepare_enable(hw->clk);
> - if (ret)
> - return ret;
> -
> hw->irq = platform_get_irq(pdev, 0);
> if (hw->irq < 0) {
> ret = hw->irq;
> - goto err;
> + return ret;
> }
>
> ret = devm_request_irq(&pdev->dev, hw->irq, mtk_rtc_alarmirq,
> 0, dev_name(&pdev->dev), hw);
> if (ret) {
> dev_err(&pdev->dev, "Can't request IRQ\n");
> - goto err;
> + return ret;
> }
>
> mtk_rtc_hw_init(hw);
> @@ -347,21 +343,10 @@ static int mtk_rtc_probe(struct platform_device *pdev)
> if (IS_ERR(hw->rtc)) {
> ret = PTR_ERR(hw->rtc);
> dev_err(&pdev->dev, "Unable to register device\n");
> - goto err;
> + return ret;
> }
>
> return 0;
> -err:
> - clk_disable_unprepare(hw->clk);
> -
> - return ret;
> -}
> -
> -static void mtk_rtc_remove(struct platform_device *pdev)
> -{
> - struct mtk_rtc *hw = platform_get_drvdata(pdev);
> -
> - clk_disable_unprepare(hw->clk);
> }
>
> #ifdef CONFIG_PM_SLEEP
> @@ -394,7 +379,6 @@ static SIMPLE_DEV_PM_OPS(mtk_rtc_pm_ops, mtk_rtc_suspend, mtk_rtc_resume);
>
> static struct platform_driver mtk_rtc_driver = {
> .probe = mtk_rtc_probe,
> - .remove_new = mtk_rtc_remove,
> .driver = {
> .name = MTK_RTC_DEV,
> .of_match_table = mtk_rtc_match,
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 5/7] rtc:rtc-sa1100:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 5/7] rtc:rtc-sa1100:Use " Liao Yuanhong
@ 2024-08-21 11:27 ` Christophe JAILLET
2024-08-22 3:13 ` [PATCH v2 " Liao Yuanhong
1 sibling, 0 replies; 21+ messages in thread
From: Christophe JAILLET @ 2024-08-21 11:27 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Le 21/08/2024 à 11:28, Liao Yuanhong a écrit :
> Use devm_clk_get_enabled() instead of clk functions in rtc-sa1100.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> drivers/rtc/rtc-sa1100.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
> index 0b2cfa8ca05b..2e72daa6a152 100644
> --- a/drivers/rtc/rtc-sa1100.c
> +++ b/drivers/rtc/rtc-sa1100.c
> @@ -177,15 +177,12 @@ int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
>
> spin_lock_init(&info->lock);
>
> - info->clk = devm_clk_get(&pdev->dev, NULL);
> + info->clk = devm_clk_get_enabled(&pdev->dev, NULL);
Hi,
the clk field in struct sa1100_rtc could also be easily removed now.
CJ
> if (IS_ERR(info->clk)) {
> dev_err(&pdev->dev, "failed to find rtc clock source\n");
> return PTR_ERR(info->clk);
> }
>
> - ret = clk_prepare_enable(info->clk);
> - if (ret)
> - return ret;
> /*
> * According to the manual we should be able to let RTTR be zero
> * and then a default diviser for a 32.768KHz clock is used.
> @@ -206,10 +203,8 @@ int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
> info->rtc->range_max = U32_MAX;
>
> ret = devm_rtc_register_device(info->rtc);
> - if (ret) {
> - clk_disable_unprepare(info->clk);
> + if (ret)
> return ret;
> - }
>
> /* Fix for a nasty initialization problem the in SA11xx RTSR register.
> * See also the comments in sa1100_rtc_interrupt().
> @@ -305,7 +300,6 @@ static void sa1100_rtc_remove(struct platform_device *pdev)
> spin_lock_irq(&info->lock);
> writel_relaxed(0, info->rtsr);
> spin_unlock_irq(&info->lock);
> - clk_disable_unprepare(info->clk);
> }
> }
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 2/7] rtc:rtc-imxdi:Use " Liao Yuanhong
@ 2024-08-22 2:44 ` Liao Yuanhong
0 siblings, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-22 2:44 UTC (permalink / raw)
To: alexandre.belloni; +Cc: liaoyuanhong, linux-kernel, linux-rtc
Use devm_clk_get_enabled() instead of clk functions in rtc-at91rm9200.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
v2:remove the global sclk variable.
---
drivers/rtc/rtc-at91rm9200.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index c16fe711a0d9..7be8a257829e 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -104,7 +104,6 @@ static bool suspended;
static DEFINE_SPINLOCK(suspended_lock);
static unsigned long cached_events;
static u32 at91_rtc_imr;
-static struct clk *sclk;
static void at91_rtc_write_ier(u32 mask)
{
@@ -471,6 +470,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
struct rtc_device *rtc;
struct resource *regs;
int ret = 0;
+ struct clk *sclk;
at91_rtc_config = of_device_get_match_data(&pdev->dev);
if (!at91_rtc_config)
@@ -498,14 +498,9 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
return PTR_ERR(rtc);
platform_set_drvdata(pdev, rtc);
- sclk = devm_clk_get(&pdev->dev, NULL);
+ sclk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(sclk))
return PTR_ERR(sclk);
-
- ret = clk_prepare_enable(sclk);
- if (ret) {
- dev_err(&pdev->dev, "Could not enable slow clock\n");
- return ret;
}
at91_rtc_write(AT91_RTC_CR, 0);
@@ -521,7 +516,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
"at91_rtc", pdev);
if (ret) {
dev_err(&pdev->dev, "IRQ %d already in use.\n", irq);
- goto err_clk;
+ return ret;
}
/* cpu init code should really have flagged this device as
@@ -539,7 +534,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
rtc->range_max = RTC_TIMESTAMP_END_2099;
ret = devm_rtc_register_device(rtc);
if (ret)
- goto err_clk;
+ return ret;
/* enable SECEV interrupt in order to initialize at91_rtc_upd_rdy
* completion.
@@ -548,11 +543,6 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
return 0;
-
-err_clk:
- clk_disable_unprepare(sclk);
-
- return ret;
}
/*
@@ -564,8 +554,6 @@ static void __exit at91_rtc_remove(struct platform_device *pdev)
at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
AT91_RTC_SECEV | AT91_RTC_TIMEV |
AT91_RTC_CALEV);
-
- clk_disable_unprepare(sclk);
}
static void at91_rtc_shutdown(struct platform_device *pdev)
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 3/7] rtc:rtc-mt7622:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 3/7] rtc:rtc-mt7622:Use " Liao Yuanhong
2024-08-21 11:25 ` Christophe JAILLET
@ 2024-08-22 2:57 ` Liao Yuanhong
1 sibling, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-22 2:57 UTC (permalink / raw)
To: alexandre.belloni; +Cc: liaoyuanhong, linux-kernel, linux-rtc
Use devm_clk_get_enabled() instead of clk functions in rtc-mt7622.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
v2:remove the clk field in struct mtk_rtc.
---
drivers/rtc/rtc-mt7622.c | 30 +++++++-----------------------
1 file changed, 7 insertions(+), 23 deletions(-)
diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
index 094c649fc137..0a54e9844840 100644
--- a/drivers/rtc/rtc-mt7622.c
+++ b/drivers/rtc/rtc-mt7622.c
@@ -102,7 +102,6 @@ struct mtk_rtc {
struct rtc_device *rtc;
void __iomem *base;
int irq;
- struct clk *clk;
};
static void mtk_w32(struct mtk_rtc *rtc, u32 reg, u32 val)
@@ -304,6 +303,7 @@ static int mtk_rtc_probe(struct platform_device *pdev)
{
struct mtk_rtc *hw;
int ret;
+ struct clk *clk;
hw = devm_kzalloc(&pdev->dev, sizeof(*hw), GFP_KERNEL);
if (!hw)
@@ -315,27 +315,23 @@ static int mtk_rtc_probe(struct platform_device *pdev)
if (IS_ERR(hw->base))
return PTR_ERR(hw->base);
- hw->clk = devm_clk_get(&pdev->dev, "rtc");
- if (IS_ERR(hw->clk)) {
+ clk = devm_clk_get_enabled(&pdev->dev, "rtc");
+ if (IS_ERR(clk)) {
dev_err(&pdev->dev, "No clock\n");
- return PTR_ERR(hw->clk);
+ return PTR_ERR(clk);
}
- ret = clk_prepare_enable(hw->clk);
- if (ret)
- return ret;
-
hw->irq = platform_get_irq(pdev, 0);
if (hw->irq < 0) {
ret = hw->irq;
- goto err;
+ return ret;
}
ret = devm_request_irq(&pdev->dev, hw->irq, mtk_rtc_alarmirq,
0, dev_name(&pdev->dev), hw);
if (ret) {
dev_err(&pdev->dev, "Can't request IRQ\n");
- goto err;
+ return ret;
}
mtk_rtc_hw_init(hw);
@@ -347,21 +343,10 @@ static int mtk_rtc_probe(struct platform_device *pdev)
if (IS_ERR(hw->rtc)) {
ret = PTR_ERR(hw->rtc);
dev_err(&pdev->dev, "Unable to register device\n");
- goto err;
+ return ret;
}
return 0;
-err:
- clk_disable_unprepare(hw->clk);
-
- return ret;
-}
-
-static void mtk_rtc_remove(struct platform_device *pdev)
-{
- struct mtk_rtc *hw = platform_get_drvdata(pdev);
-
- clk_disable_unprepare(hw->clk);
}
#ifdef CONFIG_PM_SLEEP
@@ -394,7 +379,6 @@ static SIMPLE_DEV_PM_OPS(mtk_rtc_pm_ops, mtk_rtc_suspend, mtk_rtc_resume);
static struct platform_driver mtk_rtc_driver = {
.probe = mtk_rtc_probe,
- .remove_new = mtk_rtc_remove,
.driver = {
.name = MTK_RTC_DEV,
.of_match_table = mtk_rtc_match,
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 5/7] rtc:rtc-sa1100:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 5/7] rtc:rtc-sa1100:Use " Liao Yuanhong
2024-08-21 11:27 ` Christophe JAILLET
@ 2024-08-22 3:13 ` Liao Yuanhong
1 sibling, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-22 3:13 UTC (permalink / raw)
To: alexandre.belloni; +Cc: liaoyuanhong, linux-kernel, linux-rtc
Use devm_clk_get_enabled() instead of clk functions in rtc-sa1100.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
v2:remove the clk field in struct sa1100_rtc.
---
drivers/rtc/rtc-sa1100.c | 15 +++++----------
drivers/rtc/rtc-sa1100.h | 2 --
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 0b2cfa8ca05b..c1e9ec40de18 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -174,18 +174,16 @@ static const struct rtc_class_ops sa1100_rtc_ops = {
int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
{
int ret;
+ struct clk *clk;
spin_lock_init(&info->lock);
- info->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(info->clk)) {
+ clk = devm_clk_get_enabled(&pdev->dev, NULL);
+ if (IS_ERR(clk)) {
dev_err(&pdev->dev, "failed to find rtc clock source\n");
- return PTR_ERR(info->clk);
+ return PTR_ERR(clk);
}
- ret = clk_prepare_enable(info->clk);
- if (ret)
- return ret;
/*
* According to the manual we should be able to let RTTR be zero
* and then a default diviser for a 32.768KHz clock is used.
@@ -206,10 +204,8 @@ int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
info->rtc->range_max = U32_MAX;
ret = devm_rtc_register_device(info->rtc);
- if (ret) {
- clk_disable_unprepare(info->clk);
+ if (ret)
return ret;
- }
/* Fix for a nasty initialization problem the in SA11xx RTSR register.
* See also the comments in sa1100_rtc_interrupt().
@@ -305,7 +301,6 @@ static void sa1100_rtc_remove(struct platform_device *pdev)
spin_lock_irq(&info->lock);
writel_relaxed(0, info->rtsr);
spin_unlock_irq(&info->lock);
- clk_disable_unprepare(info->clk);
}
}
diff --git a/drivers/rtc/rtc-sa1100.h b/drivers/rtc/rtc-sa1100.h
index cc724f5b07bc..cb8c2959f560 100644
--- a/drivers/rtc/rtc-sa1100.h
+++ b/drivers/rtc/rtc-sa1100.h
@@ -4,7 +4,6 @@
#include <linux/kernel.h>
-struct clk;
struct platform_device;
struct sa1100_rtc {
@@ -16,7 +15,6 @@ struct sa1100_rtc {
int irq_1hz;
int irq_alarm;
struct rtc_device *rtc;
- struct clk *clk;
};
int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info);
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
2024-08-21 11:22 ` Christophe JAILLET
@ 2024-08-22 3:24 ` kernel test robot
2024-08-22 3:24 ` kernel test robot
` (3 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: kernel test robot @ 2024-08-22 3:24 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Cc: llvm, oe-kbuild-all, Liao Yuanhong
Hi Liao,
kernel test robot noticed the following build errors:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on tegra/for-next linus/master v6.11-rc4 next-20240821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Liao-Yuanhong/rtc-rtc-at91rm9200-Use-devm_clk_get_enabled-helpers/20240821-190257
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20240821092846.20138-2-liaoyuanhong%40vivo.com
patch subject: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240822/202408221130.3Kw5w51m-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408221130.3Kw5w51m-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408221130.3Kw5w51m-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/rtc/rtc-at91rm9200.c:473:6: warning: unused variable 'ret' [-Wunused-variable]
int ret = 0;
^
>> drivers/rtc/rtc-at91rm9200.c:504:2: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
>> drivers/rtc/rtc-at91rm9200.c:506:30: error: expected ')'
at91_rtc_write(AT91_RTC_CR, 0);
^
drivers/rtc/rtc-at91rm9200.c:506:2: note: to match this '('
at91_rtc_write(AT91_RTC_CR, 0);
^
drivers/rtc/rtc-at91rm9200.c:89:17: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
>> drivers/rtc/rtc-at91rm9200.c:506:30: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
at91_rtc_write(AT91_RTC_CR, 0);
^
drivers/rtc/rtc-at91rm9200.c:506:2: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
at91_rtc_write(AT91_RTC_CR, 0);
^
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:56: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
include/uapi/linux/byteorder/little_endian.h:34:36: note: expanded from macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
>> drivers/rtc/rtc-at91rm9200.c:506:2: error: function cannot return function type 'int (int)'
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:56: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
include/uapi/linux/byteorder/little_endian.h:34:43: note: expanded from macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
drivers/rtc/rtc-at91rm9200.c:506:2: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:51: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
>> drivers/rtc/rtc-at91rm9200.c:506:2: error: function cannot return function type 'int (int ((*)(__le32))(__u32))' (aka 'int (int ((*)(unsigned int))(unsigned int))')
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:42: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
>> drivers/rtc/rtc-at91rm9200.c:506:2: error: unknown type name 'at91_rtc_regs'
drivers/rtc/rtc-at91rm9200.c:89:24: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
drivers/rtc/rtc-at91rm9200.c:506:2: error: expected ')'
drivers/rtc/rtc-at91rm9200.c:89:38: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
drivers/rtc/rtc-at91rm9200.c:506:2: note: to match this '('
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:41: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
drivers/rtc/rtc-at91rm9200.c:506:2: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
at91_rtc_write(AT91_RTC_CR, 0);
^
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:29: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
arch/arm/include/asm/io.h:92:22: note: expanded from macro '__raw_writel'
#define __raw_writel __raw_writel
^
drivers/rtc/rtc-at91rm9200.c:507:30: error: expected ')'
at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
^
drivers/rtc/rtc-at91rm9200.c:87:2: note: expanded from macro 'at91_rtc_read'
readl_relaxed(at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:277:27: note: expanded from macro 'readl_relaxed'
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
^
drivers/rtc/rtc-at91rm9200.c:507:30: note: to match this '('
drivers/rtc/rtc-at91rm9200.c:87:2: note: expanded from macro 'at91_rtc_read'
readl_relaxed(at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:277:26: note: expanded from macro 'readl_relaxed'
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
^
drivers/rtc/rtc-at91rm9200.c:507:57: error: expected ')'
at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
^
drivers/rtc/rtc-at91rm9200.c:507:2: note: to match this '('
at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
^
drivers/rtc/rtc-at91rm9200.c:89:17: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
drivers/rtc/rtc-at91rm9200.c:507:30: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
^
drivers/rtc/rtc-at91rm9200.c:87:2: note: expanded from macro 'at91_rtc_read'
readl_relaxed(at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:277:27: note: expanded from macro 'readl_relaxed'
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
^
drivers/rtc/rtc-at91rm9200.c:507:2: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
^
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:56: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
include/uapi/linux/byteorder/little_endian.h:34:36: note: expanded from macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
drivers/rtc/rtc-at91rm9200.c:507:2: error: function cannot return function type 'int (int)'
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:56: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
include/uapi/linux/byteorder/little_endian.h:34:43: note: expanded from macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
drivers/rtc/rtc-at91rm9200.c:507:2: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:51: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
drivers/rtc/rtc-at91rm9200.c:507:2: error: function cannot return function type 'int (int ((*)(__le32))(__u32))' (aka 'int (int ((*)(unsigned int))(unsigned int))')
drivers/rtc/rtc-at91rm9200.c:89:2: note: expanded from macro 'at91_rtc_write'
writel_relaxed((val), at91_rtc_regs + field)
^
arch/arm/include/asm/io.h:282:42: note: expanded from macro 'writel_relaxed'
vim +506 drivers/rtc/rtc-at91rm9200.c
f6a46f8b302d9b drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2020-11-09 465
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 466 /*
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 467 * Initialize and install RTC driver
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 468 */
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 469 static int __init at91_rtc_probe(struct platform_device *pdev)
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 470 {
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 471 struct rtc_device *rtc;
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 472 struct resource *regs;
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 @473 int ret = 0;
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 474
288d9cf1764a25 drivers/rtc/rtc-at91rm9200.c Claudiu Beznea 2019-09-26 475 at91_rtc_config = of_device_get_match_data(&pdev->dev);
de645475913f67 drivers/rtc/rtc-at91rm9200.c Johan Hovold 2013-06-12 476 if (!at91_rtc_config)
de645475913f67 drivers/rtc/rtc-at91rm9200.c Johan Hovold 2013-06-12 477 return -ENODEV;
de645475913f67 drivers/rtc/rtc-at91rm9200.c Johan Hovold 2013-06-12 478
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 479 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 480 if (!regs) {
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 481 dev_err(&pdev->dev, "no mmio resource defined\n");
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 482 return -ENXIO;
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 483 }
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 484
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 485 irq = platform_get_irq(pdev, 0);
faac910201e9be drivers/rtc/rtc-at91rm9200.c Stephen Boyd 2019-07-30 486 if (irq < 0)
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 487 return -ENXIO;
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 488
f3766250b2e9f2 drivers/rtc/rtc-at91rm9200.c Sachin Kamat 2013-11-12 489 at91_rtc_regs = devm_ioremap(&pdev->dev, regs->start,
f3766250b2e9f2 drivers/rtc/rtc-at91rm9200.c Sachin Kamat 2013-11-12 490 resource_size(regs));
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 491 if (!at91_rtc_regs) {
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 492 dev_err(&pdev->dev, "failed to map registers, aborting.\n");
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 493 return -ENOMEM;
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 494 }
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 495
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 496 rtc = devm_rtc_allocate_device(&pdev->dev);
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 497 if (IS_ERR(rtc))
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 498 return PTR_ERR(rtc);
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 499 platform_set_drvdata(pdev, rtc);
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 500
40844cea20a5f8 drivers/rtc/rtc-at91rm9200.c Liao Yuanhong 2024-08-21 501 sclk = devm_clk_get_enabled(&pdev->dev, NULL);
11f67a8bbf6587 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2015-07-31 502 if (IS_ERR(sclk))
11f67a8bbf6587 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2015-07-31 503 return PTR_ERR(sclk);
11f67a8bbf6587 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2015-07-31 @504 }
11f67a8bbf6587 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2015-07-31 505
d28bdfc5c80fb6 drivers/rtc/rtc-at91rm9200.c Jean-Christophe PLAGNIOL-VILLARD 2011-11-14 @506 at91_rtc_write(AT91_RTC_CR, 0);
f6a46f8b302d9b drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2020-11-09 507 at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 508
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 509 /* Disable all interrupts */
e304fcd075a0e9 drivers/rtc/rtc-at91rm9200.c Johan Hovold 2013-06-12 510 at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
e7a8bb12c24af8 drivers/rtc/rtc-at91.c Andrew Morton 2006-06-25 511 AT91_RTC_SECEV | AT91_RTC_TIMEV |
e7a8bb12c24af8 drivers/rtc/rtc-at91.c Andrew Morton 2006-06-25 512 AT91_RTC_CALEV);
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 513
f3766250b2e9f2 drivers/rtc/rtc-at91rm9200.c Sachin Kamat 2013-11-12 514 ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
dd1f1f391dd7f3 drivers/rtc/rtc-at91rm9200.c Boris Brezillon 2015-03-02 515 IRQF_SHARED | IRQF_COND_SUSPEND,
d728b1e69fd582 drivers/rtc/rtc-at91.c David Brownell 2006-11-25 516 "at91_rtc", pdev);
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 517 if (ret) {
6588208cb2be4a drivers/rtc/rtc-at91rm9200.c Jingoo Han 2013-02-21 518 dev_err(&pdev->dev, "IRQ %d already in use.\n", irq);
40844cea20a5f8 drivers/rtc/rtc-at91rm9200.c Liao Yuanhong 2024-08-21 519 return ret;
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 520 }
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 521
5d4675a811fb71 drivers/rtc/rtc-at91rm9200.c David Brownell 2007-02-20 522 /* cpu init code should really have flagged this device as
5d4675a811fb71 drivers/rtc/rtc-at91rm9200.c David Brownell 2007-02-20 523 * being wake-capable; if it didn't, do that here.
5d4675a811fb71 drivers/rtc/rtc-at91rm9200.c David Brownell 2007-02-20 524 */
5d4675a811fb71 drivers/rtc/rtc-at91rm9200.c David Brownell 2007-02-20 525 if (!device_can_wakeup(&pdev->dev))
5d4675a811fb71 drivers/rtc/rtc-at91rm9200.c David Brownell 2007-02-20 526 device_init_wakeup(&pdev->dev, 1);
5d4675a811fb71 drivers/rtc/rtc-at91rm9200.c David Brownell 2007-02-20 527
f6a46f8b302d9b drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2020-11-09 528 if (at91_rtc_config->has_correction)
f6a46f8b302d9b drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2020-11-09 529 rtc->ops = &sama5d4_rtc_ops;
f6a46f8b302d9b drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2020-11-09 530 else
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 531 rtc->ops = &at91_rtc_ops;
f6a46f8b302d9b drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2020-11-09 532
6c78a872a673c4 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2018-05-17 533 rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
6c78a872a673c4 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2018-05-17 534 rtc->range_max = RTC_TIMESTAMP_END_2099;
fdcfd854333be5 drivers/rtc/rtc-at91rm9200.c Bartosz Golaszewski 2020-11-09 535 ret = devm_rtc_register_device(rtc);
735ae2056b3c72 drivers/rtc/rtc-at91rm9200.c Alexandre Belloni 2017-07-06 536 if (ret)
40844cea20a5f8 drivers/rtc/rtc-at91rm9200.c Liao Yuanhong 2024-08-21 537 return ret;
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 538
2fe121e1f5aa3b drivers/rtc/rtc-at91rm9200.c Boris Brezillon 2014-06-06 539 /* enable SECEV interrupt in order to initialize at91_rtc_upd_rdy
2fe121e1f5aa3b drivers/rtc/rtc-at91rm9200.c Boris Brezillon 2014-06-06 540 * completion.
2fe121e1f5aa3b drivers/rtc/rtc-at91rm9200.c Boris Brezillon 2014-06-06 541 */
2fe121e1f5aa3b drivers/rtc/rtc-at91rm9200.c Boris Brezillon 2014-06-06 542 at91_rtc_write_ier(AT91_RTC_SECEV);
2fe121e1f5aa3b drivers/rtc/rtc-at91rm9200.c Boris Brezillon 2014-06-06 543
6588208cb2be4a drivers/rtc/rtc-at91rm9200.c Jingoo Han 2013-02-21 544 dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 545 return 0;
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 546 }
788b1fc619a31e drivers/rtc/rtc-at91.c Andrew Victor 2006-06-25 547
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
2024-08-21 11:22 ` Christophe JAILLET
2024-08-22 3:24 ` kernel test robot
@ 2024-08-22 3:24 ` kernel test robot
2024-08-22 3:37 ` [PATCH v3 " Liao Yuanhong
` (2 subsequent siblings)
5 siblings, 0 replies; 21+ messages in thread
From: kernel test robot @ 2024-08-22 3:24 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Cc: oe-kbuild-all, Liao Yuanhong
Hi Liao,
kernel test robot noticed the following build errors:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on tegra/for-next linus/master v6.11-rc4 next-20240821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Liao-Yuanhong/rtc-rtc-at91rm9200-Use-devm_clk_get_enabled-helpers/20240821-190257
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20240821092846.20138-2-liaoyuanhong%40vivo.com
patch subject: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240822/202408221124.2hKATpa8-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408221124.2hKATpa8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408221124.2hKATpa8-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/rtc/rtc-at91rm9200.c: In function 'at91_rtc_probe':
drivers/rtc/rtc-at91rm9200.c:473:13: warning: unused variable 'ret' [-Wunused-variable]
473 | int ret = 0;
| ^~~
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:14,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/m68k/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from drivers/rtc/rtc-at91rm9200.c:20:
drivers/rtc/rtc-at91rm9200.c: At top level:
>> arch/m68k/include/asm/raw_io.h:34:27: error: expected identifier or '(' before 'void'
34 | #define out_le32(addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))
| ^~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:506:9: note: in expansion of macro 'at91_rtc_write'
506 | at91_rtc_write(AT91_RTC_CR, 0);
| ^~~~~~~~~~~~~~
>> arch/m68k/include/asm/raw_io.h:34:27: error: expected identifier or '(' before 'void'
34 | #define out_le32(addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))
| ^~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:14,
from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/linux/bitfield.h:11,
from drivers/rtc/rtc-at91rm9200.c:17:
>> arch/m68k/include/asm/raw_io.h:28:95: error: expected identifier or '(' before ')' token
28 | ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
| ^
include/uapi/linux/swab.h:118:38: note: in definition of macro '__swab32'
118 | (__u32)(__builtin_constant_p(x) ? \
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:372:26: note: in expansion of macro 'in_le32'
372 | #define readl(addr) in_le32(addr)
| ^~~~~~~
arch/m68k/include/asm/io_mm.h:394:33: note: in expansion of macro 'readl'
394 | #define readl_relaxed(addr) readl(addr)
| ^~~~~
drivers/rtc/rtc-at91rm9200.c:87:9: note: in expansion of macro 'readl_relaxed'
87 | readl_relaxed(at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:37: note: in expansion of macro 'at91_rtc_read'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~
>> arch/m68k/include/asm/raw_io.h:28:95: error: expected identifier or '(' before ')' token
28 | ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
| ^
include/uapi/linux/swab.h:19:19: note: in definition of macro '___constant_swab32'
19 | (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
| ^
include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab32'
34 | #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:372:26: note: in expansion of macro 'in_le32'
372 | #define readl(addr) in_le32(addr)
| ^~~~~~~
arch/m68k/include/asm/io_mm.h:394:33: note: in expansion of macro 'readl'
394 | #define readl_relaxed(addr) readl(addr)
| ^~~~~
drivers/rtc/rtc-at91rm9200.c:87:9: note: in expansion of macro 'readl_relaxed'
87 | readl_relaxed(at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:37: note: in expansion of macro 'at91_rtc_read'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~
>> arch/m68k/include/asm/raw_io.h:28:95: error: expected identifier or '(' before ')' token
28 | ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
| ^
include/uapi/linux/swab.h:20:19: note: in definition of macro '___constant_swab32'
20 | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
| ^
include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab32'
34 | #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:372:26: note: in expansion of macro 'in_le32'
372 | #define readl(addr) in_le32(addr)
| ^~~~~~~
arch/m68k/include/asm/io_mm.h:394:33: note: in expansion of macro 'readl'
394 | #define readl_relaxed(addr) readl(addr)
| ^~~~~
drivers/rtc/rtc-at91rm9200.c:87:9: note: in expansion of macro 'readl_relaxed'
87 | readl_relaxed(at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:37: note: in expansion of macro 'at91_rtc_read'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~
>> arch/m68k/include/asm/raw_io.h:28:95: error: expected identifier or '(' before ')' token
28 | ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
| ^
include/uapi/linux/swab.h:21:19: note: in definition of macro '___constant_swab32'
21 | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
| ^
include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab32'
34 | #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:372:26: note: in expansion of macro 'in_le32'
372 | #define readl(addr) in_le32(addr)
| ^~~~~~~
arch/m68k/include/asm/io_mm.h:394:33: note: in expansion of macro 'readl'
394 | #define readl_relaxed(addr) readl(addr)
| ^~~~~
drivers/rtc/rtc-at91rm9200.c:87:9: note: in expansion of macro 'readl_relaxed'
87 | readl_relaxed(at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:37: note: in expansion of macro 'at91_rtc_read'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~
>> arch/m68k/include/asm/raw_io.h:28:95: error: expected identifier or '(' before ')' token
28 | ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
| ^
include/uapi/linux/swab.h:22:19: note: in definition of macro '___constant_swab32'
22 | (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
| ^
include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab32'
34 | #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
| ^~~~~~~~
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:372:26: note: in expansion of macro 'in_le32'
372 | #define readl(addr) in_le32(addr)
| ^~~~~~~
arch/m68k/include/asm/io_mm.h:394:33: note: in expansion of macro 'readl'
394 | #define readl_relaxed(addr) readl(addr)
| ^~~~~
drivers/rtc/rtc-at91rm9200.c:87:9: note: in expansion of macro 'readl_relaxed'
87 | readl_relaxed(at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:37: note: in expansion of macro 'at91_rtc_read'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~
>> arch/m68k/include/asm/raw_io.h:28:95: error: expected identifier or '(' before ')' token
28 | ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
| ^
include/uapi/linux/swab.h:120:19: note: in definition of macro '__swab32'
120 | __fswab32(x))
| ^
include/linux/byteorder/generic.h:88:21: note: in expansion of macro '__cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:373:26: note: in expansion of macro 'out_le32'
373 | #define writel(val,addr) out_le32((addr),(val))
| ^~~~~~~~
arch/m68k/include/asm/io_mm.h:398:33: note: in expansion of macro 'writel'
398 | #define writel_relaxed(b, addr) writel(b, addr)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:372:26: note: in expansion of macro 'in_le32'
372 | #define readl(addr) in_le32(addr)
| ^~~~~~~
arch/m68k/include/asm/io_mm.h:394:33: note: in expansion of macro 'readl'
394 | #define readl_relaxed(addr) readl(addr)
| ^~~~~
drivers/rtc/rtc-at91rm9200.c:87:9: note: in expansion of macro 'readl_relaxed'
87 | readl_relaxed(at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:37: note: in expansion of macro 'at91_rtc_read'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:6,
from include/linux/kernel.h:23,
from include/linux/clk.h:13,
from drivers/rtc/rtc-at91rm9200.c:18:
include/vdso/bits.h:7:33: error: expected declaration specifiers or '...' before '(' token
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/rtc/rtc-at91rm9200.c:66:41: note: in expansion of macro 'BIT'
66 | #define AT91_RTC_ACKUPD BIT(0) /* Acknowledge for Update */
| ^~~
drivers/rtc/rtc-at91rm9200.c:510:28: note: in expansion of macro 'AT91_RTC_ACKUPD'
510 | at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
| ^~~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:514:9: warning: data definition has no type or storage class
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~
drivers/rtc/rtc-at91rm9200.c:514:9: error: type defaults to 'int' in declaration of 'ret' [-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:514:33: error: 'pdev' undeclared here (not in a function); did you mean 'cdev'?
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~~
| cdev
drivers/rtc/rtc-at91rm9200.c:517:9: error: expected identifier or '(' before 'if'
517 | if (ret) {
| ^~
drivers/rtc/rtc-at91rm9200.c:525:9: error: expected identifier or '(' before 'if'
525 | if (!device_can_wakeup(&pdev->dev))
| ^~
drivers/rtc/rtc-at91rm9200.c:528:9: error: expected identifier or '(' before 'if'
528 | if (at91_rtc_config->has_correction)
| ^~
drivers/rtc/rtc-at91rm9200.c:530:9: error: expected identifier or '(' before 'else'
530 | else
| ^~~~
drivers/rtc/rtc-at91rm9200.c:533:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
533 | rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
| ^~
drivers/rtc/rtc-at91rm9200.c:534:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
534 | rtc->range_max = RTC_TIMESTAMP_END_2099;
| ^~
drivers/rtc/rtc-at91rm9200.c:535:9: warning: data definition has no type or storage class
535 | ret = devm_rtc_register_device(rtc);
| ^~~
drivers/rtc/rtc-at91rm9200.c:535:9: error: type defaults to 'int' in declaration of 'ret' [-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:535:9: error: redefinition of 'ret'
drivers/rtc/rtc-at91rm9200.c:514:9: note: previous definition of 'ret' with type 'int'
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~
In file included from drivers/rtc/rtc-at91rm9200.c:27:
drivers/rtc/rtc-at91rm9200.c:535:40: error: 'rtc' undeclared here (not in a function)
535 | ret = devm_rtc_register_device(rtc);
| ^~~
include/linux/rtc.h:246:49: note: in definition of macro 'devm_rtc_register_device'
246 | __devm_rtc_register_device(THIS_MODULE, device)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:536:9: error: expected identifier or '(' before 'if'
536 | if (ret)
| ^~
include/vdso/bits.h:7:33: error: expected declaration specifiers or '...' before '(' token
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/rtc/rtc-at91rm9200.c:68:41: note: in expansion of macro 'BIT'
68 | #define AT91_RTC_SECEV BIT(2) /* Second Event */
| ^~~
drivers/rtc/rtc-at91rm9200.c:542:28: note: in expansion of macro 'AT91_RTC_SECEV'
542 | at91_rtc_write_ier(AT91_RTC_SECEV);
| ^~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
vim +34 arch/m68k/include/asm/raw_io.h
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 15
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 16 /* ++roman: The assignments to temp. vars avoid that gcc sometimes generates
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 17 * two accesses to memory, which may be undesirable for some devices.
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 18 */
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 19 #define in_8(addr) \
c7db3832ff19a9 arch/m68k/include/asm/raw_io.h Arnd Bergmann 2023-09-25 20 ({ u8 __v = (*(__force const volatile u8 *) (unsigned long)(addr)); __v; })
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 21 #define in_be16(addr) \
c7db3832ff19a9 arch/m68k/include/asm/raw_io.h Arnd Bergmann 2023-09-25 22 ({ u16 __v = (*(__force const volatile u16 *) (unsigned long)(addr)); __v; })
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 23 #define in_be32(addr) \
c7db3832ff19a9 arch/m68k/include/asm/raw_io.h Arnd Bergmann 2023-09-25 24 ({ u32 __v = (*(__force const volatile u32 *) (unsigned long)(addr)); __v; })
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 25 #define in_le16(addr) \
c7db3832ff19a9 arch/m68k/include/asm/raw_io.h Arnd Bergmann 2023-09-25 26 ({ u16 __v = le16_to_cpu(*(__force const volatile __le16 *) (unsigned long)(addr)); __v; })
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 27 #define in_le32(addr) \
c7db3832ff19a9 arch/m68k/include/asm/raw_io.h Arnd Bergmann 2023-09-25 @28 ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 29
b1a89856fbf63f arch/m68k/include/asm/raw_io.h Guenter Roeck 2021-09-06 30 #define out_8(addr,b) (void)((*(__force volatile u8 *) (unsigned long)(addr)) = (b))
b1a89856fbf63f arch/m68k/include/asm/raw_io.h Guenter Roeck 2021-09-06 31 #define out_be16(addr,w) (void)((*(__force volatile u16 *) (unsigned long)(addr)) = (w))
b1a89856fbf63f arch/m68k/include/asm/raw_io.h Guenter Roeck 2021-09-06 32 #define out_be32(addr,l) (void)((*(__force volatile u32 *) (unsigned long)(addr)) = (l))
b1a89856fbf63f arch/m68k/include/asm/raw_io.h Guenter Roeck 2021-09-06 33 #define out_le16(addr,w) (void)((*(__force volatile __le16 *) (unsigned long)(addr)) = cpu_to_le16(w))
b1a89856fbf63f arch/m68k/include/asm/raw_io.h Guenter Roeck 2021-09-06 @34 #define out_le32(addr,l) (void)((*(__force volatile __le32 *) (unsigned long)(addr)) = cpu_to_le32(l))
^1da177e4c3f41 include/asm-m68k/raw_io.h Linus Torvalds 2005-04-16 35
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v3 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
` (2 preceding siblings ...)
2024-08-22 3:24 ` kernel test robot
@ 2024-08-22 3:37 ` Liao Yuanhong
2024-08-23 9:01 ` [PATCH " kernel test robot
2024-08-23 9:11 ` kernel test robot
5 siblings, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-22 3:37 UTC (permalink / raw)
To: alexandre.belloni; +Cc: liaoyuanhong, linux-kernel, linux-rtc
Use devm_clk_get_enabled() instead of clk functions in rtc-at91rm9200.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
v3:fix the missing bracket.
v2:remove the global sclk variable.
---
drivers/rtc/rtc-at91rm9200.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index c16fe711a0d9..4d909b840515 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -104,7 +104,6 @@ static bool suspended;
static DEFINE_SPINLOCK(suspended_lock);
static unsigned long cached_events;
static u32 at91_rtc_imr;
-static struct clk *sclk;
static void at91_rtc_write_ier(u32 mask)
{
@@ -471,6 +470,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
struct rtc_device *rtc;
struct resource *regs;
int ret = 0;
+ struct clk *sclk;
at91_rtc_config = of_device_get_match_data(&pdev->dev);
if (!at91_rtc_config)
@@ -498,16 +498,10 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
return PTR_ERR(rtc);
platform_set_drvdata(pdev, rtc);
- sclk = devm_clk_get(&pdev->dev, NULL);
+ sclk = devm_clk_get_enabled(&pdev->dev, NULL);
if (IS_ERR(sclk))
return PTR_ERR(sclk);
- ret = clk_prepare_enable(sclk);
- if (ret) {
- dev_err(&pdev->dev, "Could not enable slow clock\n");
- return ret;
- }
-
at91_rtc_write(AT91_RTC_CR, 0);
at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
@@ -521,7 +515,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
"at91_rtc", pdev);
if (ret) {
dev_err(&pdev->dev, "IRQ %d already in use.\n", irq);
- goto err_clk;
+ return ret;
}
/* cpu init code should really have flagged this device as
@@ -539,7 +533,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
rtc->range_max = RTC_TIMESTAMP_END_2099;
ret = devm_rtc_register_device(rtc);
if (ret)
- goto err_clk;
+ return ret;
/* enable SECEV interrupt in order to initialize at91_rtc_upd_rdy
* completion.
@@ -548,11 +542,6 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
return 0;
-
-err_clk:
- clk_disable_unprepare(sclk);
-
- return ret;
}
/*
@@ -564,8 +553,6 @@ static void __exit at91_rtc_remove(struct platform_device *pdev)
at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
AT91_RTC_SECEV | AT91_RTC_TIMEV |
AT91_RTC_CALEV);
-
- clk_disable_unprepare(sclk);
}
static void at91_rtc_shutdown(struct platform_device *pdev)
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 4/7] rtc:rtc-s3c:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 4/7] rtc:rtc-s3c:Use " Liao Yuanhong
@ 2024-08-22 5:07 ` kernel test robot
2024-08-22 6:50 ` [PATCH v2 " Liao Yuanhong
1 sibling, 0 replies; 21+ messages in thread
From: kernel test robot @ 2024-08-22 5:07 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Cc: llvm, oe-kbuild-all, Liao Yuanhong
Hi Liao,
kernel test robot noticed the following build warnings:
[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on tegra/for-next linus/master v6.11-rc4 next-20240821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Liao-Yuanhong/rtc-rtc-at91rm9200-Use-devm_clk_get_enabled-helpers/20240821-190257
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20240821092846.20138-5-liaoyuanhong%40vivo.com
patch subject: [PATCH 4/7] rtc:rtc-s3c:Use devm_clk_get_enabled() helpers
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240822/202408221253.CO0v47kj-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240822/202408221253.CO0v47kj-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408221253.CO0v47kj-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/rtc/rtc-s3c.c:483:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated.
vim +483 drivers/rtc/rtc-s3c.c
1add6781c85d7e Ben Dooks 2006-07-01 397
5a167f4543e45d Greg Kroah-Hartman 2012-12-21 398 static int s3c_rtc_probe(struct platform_device *pdev)
1add6781c85d7e Ben Dooks 2006-07-01 399 {
19be09f51d3610 Chanwoo Choi 2014-10-13 400 struct s3c_rtc *info = NULL;
1add6781c85d7e Ben Dooks 2006-07-01 401 int ret;
1add6781c85d7e Ben Dooks 2006-07-01 402
19be09f51d3610 Chanwoo Choi 2014-10-13 403 info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
19be09f51d3610 Chanwoo Choi 2014-10-13 404 if (!info)
19be09f51d3610 Chanwoo Choi 2014-10-13 405 return -ENOMEM;
1add6781c85d7e Ben Dooks 2006-07-01 406
19be09f51d3610 Chanwoo Choi 2014-10-13 407 info->dev = &pdev->dev;
64704c92fd19c5 Marek Szyprowski 2019-01-18 408 info->data = of_device_get_match_data(&pdev->dev);
ae05c95074e0ea Chanwoo Choi 2014-10-13 409 if (!info->data) {
ae05c95074e0ea Chanwoo Choi 2014-10-13 410 dev_err(&pdev->dev, "failed getting s3c_rtc_data\n");
ae05c95074e0ea Chanwoo Choi 2014-10-13 411 return -EINVAL;
ae05c95074e0ea Chanwoo Choi 2014-10-13 412 }
5a5b614ba61cc2 Marek Szyprowski 2019-01-21 413 spin_lock_init(&info->alarm_lock);
19be09f51d3610 Chanwoo Choi 2014-10-13 414
19be09f51d3610 Chanwoo Choi 2014-10-13 415 platform_set_drvdata(pdev, info);
19be09f51d3610 Chanwoo Choi 2014-10-13 416
19be09f51d3610 Chanwoo Choi 2014-10-13 417 info->irq_alarm = platform_get_irq(pdev, 0);
faac910201e9be Stephen Boyd 2019-07-30 418 if (info->irq_alarm < 0)
19be09f51d3610 Chanwoo Choi 2014-10-13 419 return info->irq_alarm;
1add6781c85d7e Ben Dooks 2006-07-01 420
ce9af89392024f Marek Szyprowski 2020-12-02 421 dev_dbg(&pdev->dev, "s3c2410_rtc: alarm irq %d\n", info->irq_alarm);
1add6781c85d7e Ben Dooks 2006-07-01 422
1add6781c85d7e Ben Dooks 2006-07-01 423 /* get the memory region */
09ef18bcd5ac6c YueHaibing 2019-10-06 424 info->base = devm_platform_ioremap_resource(pdev, 0);
19be09f51d3610 Chanwoo Choi 2014-10-13 425 if (IS_ERR(info->base))
19be09f51d3610 Chanwoo Choi 2014-10-13 426 return PTR_ERR(info->base);
1add6781c85d7e Ben Dooks 2006-07-01 427
ab10bbbb4bf910 Liao Yuanhong 2024-08-21 428 info->rtc_clk = devm_clk_get_enabled(&pdev->dev, "rtc");
eb633de6abcb30 Yang Yingliang 2022-09-19 429 if (IS_ERR(info->rtc_clk))
eb633de6abcb30 Yang Yingliang 2022-09-19 430 return dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_clk),
eb633de6abcb30 Yang Yingliang 2022-09-19 431 "failed to find rtc clock\n");
e48add8c1c462f Atul Dahiya 2010-07-20 432
eaf3a659086e1d Marek Szyprowski 2014-10-29 433 if (info->data->needs_src_clk) {
ab10bbbb4bf910 Liao Yuanhong 2024-08-21 434 info->rtc_src_clk = devm_clk_get_enabled(&pdev->dev, "rtc_src");
df9e26d093d33a Chanwoo Choi 2014-10-13 435 if (IS_ERR(info->rtc_src_clk)) {
c52d270c68a02f Krzysztof Kozlowski 2020-08-30 436 ret = dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_src_clk),
eaf3a659086e1d Marek Szyprowski 2014-10-29 437 "failed to find rtc source clock\n");
ab10bbbb4bf910 Liao Yuanhong 2024-08-21 438 return ret;
df9e26d093d33a Chanwoo Choi 2014-10-13 439 }
eaf3a659086e1d Marek Szyprowski 2014-10-29 440 }
df9e26d093d33a Chanwoo Choi 2014-10-13 441
31b16d978f902b Marek Szyprowski 2020-12-02 442 /* disable RTC enable bits potentially set by the bootloader */
31b16d978f902b Marek Szyprowski 2020-12-02 443 if (info->data->disable)
31b16d978f902b Marek Szyprowski 2020-12-02 444 info->data->disable(info);
31b16d978f902b Marek Szyprowski 2020-12-02 445
1add6781c85d7e Ben Dooks 2006-07-01 446 /* check to see if everything is setup correctly */
ae05c95074e0ea Chanwoo Choi 2014-10-13 447 if (info->data->enable)
ae05c95074e0ea Chanwoo Choi 2014-10-13 448 info->data->enable(info);
1add6781c85d7e Ben Dooks 2006-07-01 449
d4a48c2ad75b06 Jingoo Han 2013-02-21 450 dev_dbg(&pdev->dev, "s3c2410_rtc: RTCCON=%02x\n",
19be09f51d3610 Chanwoo Choi 2014-10-13 451 readw(info->base + S3C2410_RTCCON));
1add6781c85d7e Ben Dooks 2006-07-01 452
51b7616e36fbad Yauhen Kharuzhy 2008-10-29 453 device_init_wakeup(&pdev->dev, 1);
51b7616e36fbad Yauhen Kharuzhy 2008-10-29 454
dba28c37f23a09 Sam Protsenko 2021-10-21 455 info->rtc = devm_rtc_allocate_device(&pdev->dev);
19be09f51d3610 Chanwoo Choi 2014-10-13 456 if (IS_ERR(info->rtc)) {
19be09f51d3610 Chanwoo Choi 2014-10-13 457 ret = PTR_ERR(info->rtc);
1add6781c85d7e Ben Dooks 2006-07-01 458 goto err_nortc;
1add6781c85d7e Ben Dooks 2006-07-01 459 }
1add6781c85d7e Ben Dooks 2006-07-01 460
dba28c37f23a09 Sam Protsenko 2021-10-21 461 info->rtc->ops = &s3c_rtcops;
a5feda3b361e11 Sam Protsenko 2021-10-21 462 info->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
a5feda3b361e11 Sam Protsenko 2021-10-21 463 info->rtc->range_max = RTC_TIMESTAMP_END_2099;
dba28c37f23a09 Sam Protsenko 2021-10-21 464
dba28c37f23a09 Sam Protsenko 2021-10-21 465 ret = devm_rtc_register_device(info->rtc);
dba28c37f23a09 Sam Protsenko 2021-10-21 466 if (ret)
dba28c37f23a09 Sam Protsenko 2021-10-21 467 goto err_nortc;
dba28c37f23a09 Sam Protsenko 2021-10-21 468
19be09f51d3610 Chanwoo Choi 2014-10-13 469 ret = devm_request_irq(&pdev->dev, info->irq_alarm, s3c_rtc_alarmirq,
19be09f51d3610 Chanwoo Choi 2014-10-13 470 0, "s3c2410-rtc alarm", info);
19be09f51d3610 Chanwoo Choi 2014-10-13 471 if (ret) {
19be09f51d3610 Chanwoo Choi 2014-10-13 472 dev_err(&pdev->dev, "IRQ%d error %d\n", info->irq_alarm, ret);
19be09f51d3610 Chanwoo Choi 2014-10-13 473 goto err_nortc;
19be09f51d3610 Chanwoo Choi 2014-10-13 474 }
eaa6e4dd4bf243 Maurus Cuelenaere 2010-06-04 475
5a5b614ba61cc2 Marek Szyprowski 2019-01-21 476 s3c_rtc_disable_clk(info);
5a5b614ba61cc2 Marek Szyprowski 2019-01-21 477
1add6781c85d7e Ben Dooks 2006-07-01 478 return 0;
1add6781c85d7e Ben Dooks 2006-07-01 479
1add6781c85d7e Ben Dooks 2006-07-01 480 err_nortc:
ae05c95074e0ea Chanwoo Choi 2014-10-13 481 if (info->data->disable)
ae05c95074e0ea Chanwoo Choi 2014-10-13 482 info->data->disable(info);
1add6781c85d7e Ben Dooks 2006-07-01 @483 }
1add6781c85d7e Ben Dooks 2006-07-01 484
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 4/7] rtc:rtc-s3c:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 4/7] rtc:rtc-s3c:Use " Liao Yuanhong
2024-08-22 5:07 ` kernel test robot
@ 2024-08-22 6:50 ` Liao Yuanhong
1 sibling, 0 replies; 21+ messages in thread
From: Liao Yuanhong @ 2024-08-22 6:50 UTC (permalink / raw)
To: alexandre.belloni; +Cc: liaoyuanhong, linux-kernel, linux-rtc
Use devm_clk_get_enabled() instead of clk functions in rtc-s3c.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
v2:add missing return value.
---
drivers/rtc/rtc-s3c.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 282238818f63..ecceffee7118 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -425,24 +425,18 @@ static int s3c_rtc_probe(struct platform_device *pdev)
if (IS_ERR(info->base))
return PTR_ERR(info->base);
- info->rtc_clk = devm_clk_get(&pdev->dev, "rtc");
+ info->rtc_clk = devm_clk_get_enabled(&pdev->dev, "rtc");
if (IS_ERR(info->rtc_clk))
return dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_clk),
"failed to find rtc clock\n");
- ret = clk_prepare_enable(info->rtc_clk);
- if (ret)
- return ret;
if (info->data->needs_src_clk) {
- info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src");
+ info->rtc_src_clk = devm_clk_get_enabled(&pdev->dev, "rtc_src");
if (IS_ERR(info->rtc_src_clk)) {
ret = dev_err_probe(&pdev->dev, PTR_ERR(info->rtc_src_clk),
"failed to find rtc source clock\n");
- goto err_src_clk;
+ return ret;
}
- ret = clk_prepare_enable(info->rtc_src_clk);
- if (ret)
- goto err_src_clk;
}
/* disable RTC enable bits potentially set by the bootloader */
@@ -487,11 +481,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
if (info->data->disable)
info->data->disable(info);
- if (info->data->needs_src_clk)
- clk_disable_unprepare(info->rtc_src_clk);
-err_src_clk:
- clk_disable_unprepare(info->rtc_clk);
-
return ret;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
` (3 preceding siblings ...)
2024-08-22 3:37 ` [PATCH v3 " Liao Yuanhong
@ 2024-08-23 9:01 ` kernel test robot
2024-08-23 9:11 ` kernel test robot
5 siblings, 0 replies; 21+ messages in thread
From: kernel test robot @ 2024-08-23 9:01 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Cc: oe-kbuild-all, Liao Yuanhong
Hi Liao,
kernel test robot noticed the following build errors:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on tegra/for-next linus/master v6.11-rc4 next-20240823]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Liao-Yuanhong/rtc-rtc-at91rm9200-Use-devm_clk_get_enabled-helpers/20240822-150754
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20240821092846.20138-2-liaoyuanhong%40vivo.com
patch subject: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
config: sparc64-randconfig-r064-20240823 (https://download.01.org/0day-ci/archive/20240823/202408231657.ZitX62vV-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408231657.ZitX62vV-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408231657.ZitX62vV-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/rtc/rtc-at91rm9200.c: In function 'at91_rtc_probe':
drivers/rtc/rtc-at91rm9200.c:473:13: warning: unused variable 'ret' [-Wunused-variable]
473 | int ret = 0;
| ^~~
drivers/rtc/rtc-at91rm9200.c: At top level:
drivers/rtc/rtc-at91rm9200.c:89:24: error: expected declaration specifiers or '...' before '(' token
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^
drivers/rtc/rtc-at91rm9200.c:506:9: note: in expansion of macro 'at91_rtc_write'
506 | at91_rtc_write(AT91_RTC_CR, 0);
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:89:31: error: expected declaration specifiers or '...' before 'at91_rtc_regs'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:506:9: note: in expansion of macro 'at91_rtc_write'
506 | at91_rtc_write(AT91_RTC_CR, 0);
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:89:24: error: expected declaration specifiers or '...' before '(' token
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:89:31: error: expected declaration specifiers or '...' before 'at91_rtc_regs'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:6,
from include/linux/kernel.h:23,
from include/linux/clk.h:13,
from drivers/rtc/rtc-at91rm9200.c:18:
include/vdso/bits.h:7:33: error: expected declaration specifiers or '...' before '(' token
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/rtc/rtc-at91rm9200.c:66:41: note: in expansion of macro 'BIT'
66 | #define AT91_RTC_ACKUPD BIT(0) /* Acknowledge for Update */
| ^~~
drivers/rtc/rtc-at91rm9200.c:510:28: note: in expansion of macro 'AT91_RTC_ACKUPD'
510 | at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
| ^~~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:514:9: warning: data definition has no type or storage class
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~
drivers/rtc/rtc-at91rm9200.c:514:9: error: type defaults to 'int' in declaration of 'ret' [-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:514:33: error: 'pdev' undeclared here (not in a function); did you mean 'cdev'?
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~~
| cdev
In file included from include/linux/bcd.h:5,
from drivers/rtc/rtc-at91rm9200.c:16:
>> include/linux/compiler.h:55:23: error: expected identifier or '(' before 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/rtc/rtc-at91rm9200.c:517:9: note: in expansion of macro 'if'
517 | if (ret) {
| ^~
>> include/linux/compiler.h:71:2: error: expected identifier or '(' before ')' token
71 | })
| ^
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:517:9: note: in expansion of macro 'if'
517 | if (ret) {
| ^~
>> include/linux/compiler.h:55:23: error: expected identifier or '(' before 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/rtc/rtc-at91rm9200.c:525:9: note: in expansion of macro 'if'
525 | if (!device_can_wakeup(&pdev->dev))
| ^~
>> include/linux/compiler.h:71:2: error: expected identifier or '(' before ')' token
71 | })
| ^
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:525:9: note: in expansion of macro 'if'
525 | if (!device_can_wakeup(&pdev->dev))
| ^~
>> include/linux/compiler.h:55:23: error: expected identifier or '(' before 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/rtc/rtc-at91rm9200.c:528:9: note: in expansion of macro 'if'
528 | if (at91_rtc_config->has_correction)
| ^~
>> include/linux/compiler.h:71:2: error: expected identifier or '(' before ')' token
71 | })
| ^
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:528:9: note: in expansion of macro 'if'
528 | if (at91_rtc_config->has_correction)
| ^~
drivers/rtc/rtc-at91rm9200.c:530:9: error: expected identifier or '(' before 'else'
530 | else
| ^~~~
drivers/rtc/rtc-at91rm9200.c:533:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
533 | rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
| ^~
drivers/rtc/rtc-at91rm9200.c:534:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
534 | rtc->range_max = RTC_TIMESTAMP_END_2099;
| ^~
drivers/rtc/rtc-at91rm9200.c:535:9: warning: data definition has no type or storage class
535 | ret = devm_rtc_register_device(rtc);
| ^~~
drivers/rtc/rtc-at91rm9200.c:535:9: error: type defaults to 'int' in declaration of 'ret' [-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:535:9: error: redefinition of 'ret'
drivers/rtc/rtc-at91rm9200.c:514:9: note: previous definition of 'ret' with type 'int'
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~
In file included from drivers/rtc/rtc-at91rm9200.c:27:
drivers/rtc/rtc-at91rm9200.c:535:40: error: 'rtc' undeclared here (not in a function)
535 | ret = devm_rtc_register_device(rtc);
| ^~~
include/linux/rtc.h:246:49: note: in definition of macro 'devm_rtc_register_device'
246 | __devm_rtc_register_device(THIS_MODULE, device)
| ^~~~~~
>> include/linux/compiler.h:55:23: error: expected identifier or '(' before 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~
drivers/rtc/rtc-at91rm9200.c:536:9: note: in expansion of macro 'if'
536 | if (ret)
| ^~
>> include/linux/compiler.h:71:2: error: expected identifier or '(' before ')' token
71 | })
| ^
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:536:9: note: in expansion of macro 'if'
536 | if (ret)
| ^~
include/vdso/bits.h:7:33: error: expected declaration specifiers or '...' before '(' token
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/rtc/rtc-at91rm9200.c:68:41: note: in expansion of macro 'BIT'
68 | #define AT91_RTC_SECEV BIT(2) /* Second Event */
| ^~~
drivers/rtc/rtc-at91rm9200.c:542:28: note: in expansion of macro 'AT91_RTC_SECEV'
542 | at91_rtc_write_ier(AT91_RTC_SECEV);
| ^~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/rtc/rtc-at91rm9200.c:26:
include/linux/dev_printk.h:108:10: error: expected identifier or '(' before '{' token
108 | ({ \
| ^
include/linux/dev_printk.h:160:9: note: in expansion of macro 'dev_printk_index_wrap'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:544:9: note: in expansion of macro 'dev_info'
544 | dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
| ^~~~~~~~
drivers/rtc/rtc-at91rm9200.c:545:9: error: expected identifier or '(' before 'return'
545 | return 0;
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:546:1: error: expected identifier or '(' before '}' token
546 | }
| ^
drivers/rtc/rtc-at91rm9200.c: In function 'at91_rtc_probe':
drivers/rtc/rtc-at91rm9200.c:504:9: warning: control reaches end of non-void function [-Wreturn-type]
504 | }
| ^
drivers/rtc/rtc-at91rm9200.c: At top level:
drivers/rtc/rtc-at91rm9200.c:456:35: warning: 'sama5d4_rtc_ops' defined but not used [-Wunused-const-variable=]
456 | static const struct rtc_class_ops sama5d4_rtc_ops = {
| ^~~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:448:35: warning: 'at91_rtc_ops' defined but not used [-Wunused-const-variable=]
448 | static const struct rtc_class_ops at91_rtc_ops = {
| ^~~~~~~~~~~~
vim +55 include/linux/compiler.h
2bcd521a684cc9 Steven Rostedt 2008-11-21 49
2bcd521a684cc9 Steven Rostedt 2008-11-21 50 #ifdef CONFIG_PROFILE_ALL_BRANCHES
2bcd521a684cc9 Steven Rostedt 2008-11-21 51 /*
2bcd521a684cc9 Steven Rostedt 2008-11-21 52 * "Define 'is'", Bill Clinton
2bcd521a684cc9 Steven Rostedt 2008-11-21 53 * "Define 'if'", Steven Rostedt
2bcd521a684cc9 Steven Rostedt 2008-11-21 54 */
a15fd609ad53a6 Linus Torvalds 2019-03-20 @55 #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
a15fd609ad53a6 Linus Torvalds 2019-03-20 56
a15fd609ad53a6 Linus Torvalds 2019-03-20 57 #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
a15fd609ad53a6 Linus Torvalds 2019-03-20 58
a15fd609ad53a6 Linus Torvalds 2019-03-20 59 #define __trace_if_value(cond) ({ \
2bcd521a684cc9 Steven Rostedt 2008-11-21 60 static struct ftrace_branch_data \
e04462fb82f8dd Miguel Ojeda 2018-09-03 61 __aligned(4) \
33def8498fdde1 Joe Perches 2020-10-21 62 __section("_ftrace_branch") \
a15fd609ad53a6 Linus Torvalds 2019-03-20 63 __if_trace = { \
2bcd521a684cc9 Steven Rostedt 2008-11-21 64 .func = __func__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 65 .file = __FILE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 66 .line = __LINE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 67 }; \
a15fd609ad53a6 Linus Torvalds 2019-03-20 68 (cond) ? \
a15fd609ad53a6 Linus Torvalds 2019-03-20 69 (__if_trace.miss_hit[1]++,1) : \
a15fd609ad53a6 Linus Torvalds 2019-03-20 70 (__if_trace.miss_hit[0]++,0); \
a15fd609ad53a6 Linus Torvalds 2019-03-20 @71 })
a15fd609ad53a6 Linus Torvalds 2019-03-20 72
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
` (4 preceding siblings ...)
2024-08-23 9:01 ` [PATCH " kernel test robot
@ 2024-08-23 9:11 ` kernel test robot
5 siblings, 0 replies; 21+ messages in thread
From: kernel test robot @ 2024-08-23 9:11 UTC (permalink / raw)
To: Liao Yuanhong, alexandre.belloni, linux-rtc, linux-kernel
Cc: oe-kbuild-all, Liao Yuanhong
Hi Liao,
kernel test robot noticed the following build errors:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on tegra/for-next linus/master v6.11-rc4 next-20240823]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Liao-Yuanhong/rtc-rtc-at91rm9200-Use-devm_clk_get_enabled-helpers/20240822-150754
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20240821092846.20138-2-liaoyuanhong%40vivo.com
patch subject: [PATCH 1/7] rtc:rtc-at91rm9200:Use devm_clk_get_enabled() helpers
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240823/202408231607.RHujmOKI-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408231607.RHujmOKI-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408231607.RHujmOKI-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/rtc/rtc-at91rm9200.c: In function 'at91_rtc_probe':
drivers/rtc/rtc-at91rm9200.c:473:13: warning: unused variable 'ret' [-Wunused-variable]
473 | int ret = 0;
| ^~~
In file included from include/linux/io.h:14,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from arch/sh/include/asm/hardirq.h:9,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from drivers/rtc/rtc-at91rm9200.c:20:
drivers/rtc/rtc-at91rm9200.c: At top level:
>> arch/sh/include/asm/io.h:46:35: error: expected identifier or '(' before 'void'
46 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)ioswabl(v),c))
| ^~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:506:9: note: in expansion of macro 'at91_rtc_write'
506 | at91_rtc_write(AT91_RTC_CR, 0);
| ^~~~~~~~~~~~~~
>> arch/sh/include/asm/io.h:31:33: error: expected ')' before '(' token
31 | #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v))
| ^
arch/sh/include/asm/io.h:46:40: note: in expansion of macro '__raw_writel'
46 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)ioswabl(v),c))
| ^~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:506:9: note: in expansion of macro 'at91_rtc_write'
506 | at91_rtc_write(AT91_RTC_CR, 0);
| ^~~~~~~~~~~~~~
>> arch/sh/include/asm/io.h:46:35: error: expected identifier or '(' before 'void'
46 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)ioswabl(v),c))
| ^~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
>> arch/sh/include/asm/io.h:31:33: error: expected ')' before '(' token
31 | #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v))
| ^
arch/sh/include/asm/io.h:46:40: note: in expansion of macro '__raw_writel'
46 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)ioswabl(v),c))
| ^~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:89:9: note: in expansion of macro 'writel_relaxed'
89 | writel_relaxed((val), at91_rtc_regs + field)
| ^~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:507:9: note: in expansion of macro 'at91_rtc_write'
507 | at91_rtc_write(AT91_RTC_MR, at91_rtc_read(AT91_RTC_MR) & ~AT91_RTC_HRMOD);
| ^~~~~~~~~~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:6,
from include/linux/kernel.h:23,
from include/linux/clk.h:13,
from drivers/rtc/rtc-at91rm9200.c:18:
include/vdso/bits.h:7:33: error: expected declaration specifiers or '...' before '(' token
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/rtc/rtc-at91rm9200.c:66:41: note: in expansion of macro 'BIT'
66 | #define AT91_RTC_ACKUPD BIT(0) /* Acknowledge for Update */
| ^~~
drivers/rtc/rtc-at91rm9200.c:510:28: note: in expansion of macro 'AT91_RTC_ACKUPD'
510 | at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
| ^~~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:514:9: warning: data definition has no type or storage class
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~
drivers/rtc/rtc-at91rm9200.c:514:9: error: type defaults to 'int' in declaration of 'ret' [-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:514:33: error: 'pdev' undeclared here (not in a function); did you mean 'cdev'?
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~~
| cdev
drivers/rtc/rtc-at91rm9200.c:517:9: error: expected identifier or '(' before 'if'
517 | if (ret) {
| ^~
drivers/rtc/rtc-at91rm9200.c:525:9: error: expected identifier or '(' before 'if'
525 | if (!device_can_wakeup(&pdev->dev))
| ^~
drivers/rtc/rtc-at91rm9200.c:528:9: error: expected identifier or '(' before 'if'
528 | if (at91_rtc_config->has_correction)
| ^~
drivers/rtc/rtc-at91rm9200.c:530:9: error: expected identifier or '(' before 'else'
530 | else
| ^~~~
drivers/rtc/rtc-at91rm9200.c:533:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
533 | rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
| ^~
drivers/rtc/rtc-at91rm9200.c:534:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
534 | rtc->range_max = RTC_TIMESTAMP_END_2099;
| ^~
drivers/rtc/rtc-at91rm9200.c:535:9: warning: data definition has no type or storage class
535 | ret = devm_rtc_register_device(rtc);
| ^~~
drivers/rtc/rtc-at91rm9200.c:535:9: error: type defaults to 'int' in declaration of 'ret' [-Wimplicit-int]
drivers/rtc/rtc-at91rm9200.c:535:9: error: redefinition of 'ret'
drivers/rtc/rtc-at91rm9200.c:514:9: note: previous definition of 'ret' with type 'int'
514 | ret = devm_request_irq(&pdev->dev, irq, at91_rtc_interrupt,
| ^~~
In file included from drivers/rtc/rtc-at91rm9200.c:27:
drivers/rtc/rtc-at91rm9200.c:535:40: error: 'rtc' undeclared here (not in a function)
535 | ret = devm_rtc_register_device(rtc);
| ^~~
include/linux/rtc.h:246:49: note: in definition of macro 'devm_rtc_register_device'
246 | __devm_rtc_register_device(THIS_MODULE, device)
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:536:9: error: expected identifier or '(' before 'if'
536 | if (ret)
| ^~
include/vdso/bits.h:7:33: error: expected declaration specifiers or '...' before '(' token
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/rtc/rtc-at91rm9200.c:68:41: note: in expansion of macro 'BIT'
68 | #define AT91_RTC_SECEV BIT(2) /* Second Event */
| ^~~
drivers/rtc/rtc-at91rm9200.c:542:28: note: in expansion of macro 'AT91_RTC_SECEV'
542 | at91_rtc_write_ier(AT91_RTC_SECEV);
| ^~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/platform_device.h:13,
from drivers/rtc/rtc-at91rm9200.c:26:
include/linux/dev_printk.h:108:10: error: expected identifier or '(' before '{' token
108 | ({ \
| ^
include/linux/dev_printk.h:160:9: note: in expansion of macro 'dev_printk_index_wrap'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/rtc/rtc-at91rm9200.c:544:9: note: in expansion of macro 'dev_info'
544 | dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
| ^~~~~~~~
drivers/rtc/rtc-at91rm9200.c:545:9: error: expected identifier or '(' before 'return'
545 | return 0;
| ^~~~~~
drivers/rtc/rtc-at91rm9200.c:546:1: error: expected identifier or '(' before '}' token
546 | }
| ^
drivers/rtc/rtc-at91rm9200.c: In function 'at91_rtc_probe':
drivers/rtc/rtc-at91rm9200.c:504:9: warning: control reaches end of non-void function [-Wreturn-type]
504 | }
| ^
vim +46 arch/sh/include/asm/io.h
b66c1a3919abb4 include/asm-sh/io.h Paul Mundt 2006-01-16 28
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 29 #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 30 #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 @31 #define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile u32 __force *)(a) = (v))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 32 #define __raw_writeq(v,a) (__chk_io_ptr(a), *(volatile u64 __force *)(a) = (v))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 33
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 34 #define __raw_readb(a) (__chk_io_ptr(a), *(volatile u8 __force *)(a))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 35 #define __raw_readw(a) (__chk_io_ptr(a), *(volatile u16 __force *)(a))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 36 #define __raw_readl(a) (__chk_io_ptr(a), *(volatile u32 __force *)(a))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 37 #define __raw_readq(a) (__chk_io_ptr(a), *(volatile u64 __force *)(a))
14866543ad2201 arch/sh/include/asm/io.h Paul Mundt 2008-10-04 38
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 39 #define readb_relaxed(c) ({ u8 __v = ioswabb(__raw_readb(c)); __v; })
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 40 #define readw_relaxed(c) ({ u16 __v = ioswabw(__raw_readw(c)); __v; })
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 41 #define readl_relaxed(c) ({ u32 __v = ioswabl(__raw_readl(c)); __v; })
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 42 #define readq_relaxed(c) ({ u64 __v = ioswabq(__raw_readq(c)); __v; })
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 43
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 44 #define writeb_relaxed(v,c) ((void)__raw_writeb((__force u8)ioswabb(v),c))
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 45 #define writew_relaxed(v,c) ((void)__raw_writew((__force u16)ioswabw(v),c))
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 @46 #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)ioswabl(v),c))
b7e68d6876dfba arch/sh/include/asm/io.h Paul Mundt 2012-03-29 47 #define writeq_relaxed(v,c) ((void)__raw_writeq((__force u64)ioswabq(v),c))
37b7a97884ba64 arch/sh/include/asm/io.h Paul Mundt 2010-11-01 48
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2024-08-23 9:12 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 9:28 [PATCH 0/7] rtc:Use devm_clk_get_enabled() helpers Liao Yuanhong
2024-08-21 9:28 ` [PATCH 1/7] rtc:rtc-at91rm9200:Use " Liao Yuanhong
2024-08-21 11:22 ` Christophe JAILLET
2024-08-22 3:24 ` kernel test robot
2024-08-22 3:24 ` kernel test robot
2024-08-22 3:37 ` [PATCH v3 " Liao Yuanhong
2024-08-23 9:01 ` [PATCH " kernel test robot
2024-08-23 9:11 ` kernel test robot
2024-08-21 9:28 ` [PATCH 2/7] rtc:rtc-imxdi:Use " Liao Yuanhong
2024-08-22 2:44 ` [PATCH] rtc:rtc-at91rm9200:Use " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 3/7] rtc:rtc-mt7622:Use " Liao Yuanhong
2024-08-21 11:25 ` Christophe JAILLET
2024-08-22 2:57 ` [PATCH v2 " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 4/7] rtc:rtc-s3c:Use " Liao Yuanhong
2024-08-22 5:07 ` kernel test robot
2024-08-22 6:50 ` [PATCH v2 " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 5/7] rtc:rtc-sa1100:Use " Liao Yuanhong
2024-08-21 11:27 ` Christophe JAILLET
2024-08-22 3:13 ` [PATCH v2 " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 6/7] rtc:rtc-tegra:Use " Liao Yuanhong
2024-08-21 9:28 ` [PATCH 7/7] rtc:rtc-xgene:Use " Liao Yuanhong
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).