diff mbox series

[10/21] rtc: meson: quiet maybe-unused variable warning

Message ID 20210202112219.3610853-11-alexandre.belloni@bootlin.com
State Accepted
Headers show
Series rtc: remove make W=1 warnings | expand

Commit Message

Alexandre Belloni Feb. 2, 2021, 11:22 a.m. UTC
When CONFIG_OF is disabled then the matching table is not referenced.

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

Comments

Kevin Hilman Feb. 2, 2021, 4:26 p.m. UTC | #1
Alexandre Belloni <alexandre.belloni@bootlin.com> writes:

> When CONFIG_OF is disabled then the matching table is not referenced.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>

> ---
>  drivers/rtc/rtc-meson.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-meson.c b/drivers/rtc/rtc-meson.c
> index 8642c06565ea..44bdc8b4a90d 100644
> --- a/drivers/rtc/rtc-meson.c
> +++ b/drivers/rtc/rtc-meson.c
> @@ -380,7 +380,7 @@ static int meson_rtc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static const struct of_device_id meson_rtc_dt_match[] = {
> +static const __maybe_unused struct of_device_id meson_rtc_dt_match[] = {
>  	{ .compatible = "amlogic,meson6-rtc", },
>  	{ .compatible = "amlogic,meson8-rtc", },
>  	{ .compatible = "amlogic,meson8b-rtc", },
> -- 
> 2.29.2
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-meson.c b/drivers/rtc/rtc-meson.c
index 8642c06565ea..44bdc8b4a90d 100644
--- a/drivers/rtc/rtc-meson.c
+++ b/drivers/rtc/rtc-meson.c
@@ -380,7 +380,7 @@  static int meson_rtc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static const struct of_device_id meson_rtc_dt_match[] = {
+static const __maybe_unused struct of_device_id meson_rtc_dt_match[] = {
 	{ .compatible = "amlogic,meson6-rtc", },
 	{ .compatible = "amlogic,meson8-rtc", },
 	{ .compatible = "amlogic,meson8b-rtc", },