Skip to contentSkip to conversation

rtc: remove make W=1 warnings

PATCH In review Alexandre Belloni 5 participants 26 messages Feb 2, 2021

Subsystems (5)
lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

cover rtc: remove make W=1 warnings

Hi,

This series removes some make W=1 warning, especially when CONFIG_OF is not defined.

Alexandre Belloni (21):
rtc: class: remove bogus documentation
rtc: armada38x: depend on OF
rtc: bq32k: quiet maybe-unused variable warning
rtc: brcmstb-waketimer: quiet maybe-unused variable warning
rtc: digicolor: quiet maybe-unused variable warning
rtc: ds1672: quiet maybe-unused variable warning
rtc: ds3232: quiet maybe-unused variable warning
rtc: isl1208: quiet maybe-unused variable warning
rtc: m41t80: quiet maybe-unused variable warning
rtc: meson: quiet maybe-unused variable warning
rtc: pcf85063: quiet maybe-unused variable warnings
rtc: pcf85363: quiet maybe-unused variable warning
rtc: rs5c372: quiet maybe-unused variable warning
rtc: rv3028: quiet maybe-unused variable warning
rtc: rv3029: quiet maybe-unused variable warning
rtc: rv3032: quiet maybe-unused variable warning
rtc: rv8803: quiet maybe-unused variable warning
rtc: rx8010: quiet maybe-unused variable warning
rtc: rx8581: quiet maybe-unused variable warning
rtc: s35390a: quiet maybe-unused variable warning
rtc: sd3078: quiet maybe-unused variable warning

 drivers/rtc/Kconfig                 |  1 +
 drivers/rtc/class.c                 |  5 ----
 drivers/rtc/rtc-bq32k.c             |  2 +-
 drivers/rtc/rtc-brcmstb-waketimer.c |  2 +-
 drivers/rtc/rtc-digicolor.c         |  2 +-
 drivers/rtc/rtc-ds1672.c            |  2 +-
 drivers/rtc/rtc-ds3232.c            |  2 +-
 drivers/rtc/rtc-isl1208.c           |  2 +-
 drivers/rtc/rtc-m41t80.c            |  2 +-
 drivers/rtc/rtc-meson.c             |  2 +-
 drivers/rtc/rtc-pcf85063.c          | 38 ++++++++++++++---------------
 drivers/rtc/rtc-pcf85363.c          |  2 +-
 drivers/rtc/rtc-rs5c372.c           |  2 +-
 drivers/rtc/rtc-rv3028.c            |  2 +-
 drivers/rtc/rtc-rv3029c2.c          |  2 +-
 drivers/rtc/rtc-rv3032.c            |  2 +-
 drivers/rtc/rtc-rv8803.c            |  2 +-
 drivers/rtc/rtc-rx8010.c            |  2 +-
 drivers/rtc/rtc-rx8581.c            |  2 +-
 drivers/rtc/rtc-s35390a.c           |  2 +-
 drivers/rtc/rtc-sd3078.c            |  2 +-
 21 files changed, 38 insertions(+), 42 deletions(-)
Signature · 1 line
2.29.2
author maintainer
#1 lore raw

PATCH 1/21 rtc: class: remove bogus documentation

rtc_device_unregister is gone since commit fdcfd854333b ("rtc: rework rtc_register_device() resource management"). Remove its documentation.

---
 drivers/rtc/class.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/rtc/class.c +0 -5
index 03abd0aa229a..f77bc089eb6b 100644
@@ -324,11 +324,6 @@ static void rtc_device_get_offset(struct rtc_device *rtc)
 		rtc->offset_secs = 0;
 }
 
-/**
- * rtc_device_unregister - removes the previously registered RTC class device
- *
- * @rtc: the RTC class device to destroy
- */
 static void devm_rtc_unregister_device(void *data)
 {
 	struct rtc_device *rtc = data;
Signature · 1 line
2.29.2
author maintainer
#2 lore raw

PATCH 2/21 rtc: armada38x: depend on OF

In reply to Alexandre Belloni

The driver will compile with warning without OF because armada38x_data and armada8k_data will be defined but not used. It would be possible to move then in the #ifdef CONFIG_OF section but then their members will be defined but not used. Instead of moving most of the driver in the #ifdef, simply depend on OF.

---
 drivers/rtc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/Kconfig +1 -0
index e1576754a50f..68ae202e0716 100644
@@ -1594,6 +1594,7 @@ config RTC_DRV_MV
 config RTC_DRV_ARMADA38X
 	tristate "Armada 38x Marvell SoC RTC"
 	depends on ARCH_MVEBU || COMPILE_TEST
+	depends on OF
 	help
 	  If you say yes here you will get support for the in-chip RTC
 	  that can be found in the Armada 38x Marvell's SoC device
Signature · 1 line
2.29.2
author maintainer
#3 lore raw

PATCH 3/21 rtc: bq32k: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-bq32k.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-bq32k.c +1 -1
index 933e4237237d..2235c968842d 100644
@@ -311,7 +311,7 @@ static const struct i2c_device_id bq32k_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, bq32k_id);
 
-static const struct of_device_id bq32k_of_match[] = {
+static const __maybe_unused struct of_device_id bq32k_of_match[] = {
 	{ .compatible = "ti,bq32000" },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#4 lore raw

PATCH 4/21 rtc: brcmstb-waketimer: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-brcmstb-waketimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-brcmstb-waketimer.c +1 -1
index 0366e2ff04ae..c74130e8f496 100644
@@ -306,7 +306,7 @@ static int brcmstb_waketmr_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(brcmstb_waketmr_pm_ops,
 			 brcmstb_waketmr_suspend, brcmstb_waketmr_resume);
 
-static const struct of_device_id brcmstb_waketmr_of_match[] = {
+static const __maybe_unused struct of_device_id brcmstb_waketmr_of_match[] = {
 	{ .compatible = "brcm,brcmstb-waketimer" },
 	{ /* sentinel */ },
 };
Signature · 1 line
2.29.2
maintainer Acked-by on v1 4/21
#5 lore raw

Re: [PATCH 04/21] rtc: brcmstb-waketimer: quiet maybe-unused variable warning

Quoted 3 lines · Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

Signature · 1 line
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Acked-by on v1 4/21
#6 lore raw

Re: [PATCH 04/21] rtc: brcmstb-waketimer: quiet maybe-unused variable warning

In reply to Alexandre Belloni
Quoted 3 lines · Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

Signature · 6 lines
Florian

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#7 lore raw

PATCH 5/21 rtc: digicolor: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-digicolor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-digicolor.c +1 -1
index 4fdfa5b6feb2..218a6de19247 100644
@@ -205,7 +205,7 @@ static int __init dc_rtc_probe(struct platform_device *pdev)
 	return devm_rtc_register_device(rtc->rtc_dev);
 }
 
-static const struct of_device_id dc_dt_ids[] = {
+static const __maybe_unused struct of_device_id dc_dt_ids[] = {
 	{ .compatible = "cnxt,cx92755-rtc" },
 	{ /* sentinel */ }
 };
Signature · 1 line
2.29.2
maintainer Acked-by on v1 5/21
#8 lore raw

Re: [PATCH 05/21] rtc: digicolor: quiet maybe-unused variable warning

Hi Alex,

Quoted 3 lines · Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

Thanks,
baruch

Quoted 17 lines
---
 drivers/rtc/rtc-digicolor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-digicolor.c +1 -1
index 4fdfa5b6feb2..218a6de19247 100644
@@ -205,7 +205,7 @@ static int __init dc_rtc_probe(struct platform_device *pdev)
 	return devm_rtc_register_device(rtc->rtc_dev);
 }
 
-static const struct of_device_id dc_dt_ids[] = {
+static const __maybe_unused struct of_device_id dc_dt_ids[] = {
 	{ .compatible = "cnxt,cx92755-rtc" },
 	{ /* sentinel */ }
 };
Signature · 8 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.52.368.4656, http://www.tkos.co.il -

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#9 lore raw

PATCH 6/21 rtc: ds1672: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-ds1672.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-ds1672.c +1 -1
index 630493759d15..4cd8efbef6cf 100644
@@ -139,7 +139,7 @@ static const struct i2c_device_id ds1672_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ds1672_id);
 
-static const struct of_device_id ds1672_of_match[] = {
+static const __maybe_unused struct of_device_id ds1672_of_match[] = {
 	{ .compatible = "dallas,ds1672" },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#10 lore raw

PATCH 7/21 rtc: ds3232: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-ds3232.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-ds3232.c +1 -1
index 535e4a88fbb6..168bc27f1f5a 100644
@@ -592,7 +592,7 @@ static const struct i2c_device_id ds3232_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ds3232_id);
 
-static const struct of_device_id ds3232_of_match[] = {
+static const  __maybe_unused struct of_device_id ds3232_of_match[] = {
 	{ .compatible = "dallas,ds3232" },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#11 lore raw

PATCH 8/21 rtc: isl1208: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-isl1208.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-isl1208.c +1 -1
index 563a6d9c9fcf..182dfa605515 100644
@@ -99,7 +99,7 @@ static const struct i2c_device_id isl1208_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, isl1208_id);
 
-static const struct of_device_id isl1208_of_match[] = {
+static const __maybe_unused struct of_device_id isl1208_of_match[] = {
 	{ .compatible = "isil,isl1208", .data = &isl1208_configs[TYPE_ISL1208] },
 	{ .compatible = "isil,isl1209", .data = &isl1208_configs[TYPE_ISL1209] },
 	{ .compatible = "isil,isl1218", .data = &isl1208_configs[TYPE_ISL1218] },
Signature · 1 line
2.29.2
author maintainer
#12 lore raw

PATCH 9/21 rtc: m41t80: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-m41t80.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-m41t80.c +1 -1
index ee0c1be0354e..cce5b5284658 100644
@@ -85,7 +85,7 @@ static const struct i2c_device_id m41t80_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, m41t80_id);
 
-static const struct of_device_id m41t80_of_match[] = {
+static const __maybe_unused struct of_device_id m41t80_of_match[] = {
 	{
 		.compatible = "st,m41t62",
 		.data = (void *)(M41T80_FEATURE_SQ | M41T80_FEATURE_SQ_ALT)
Signature · 1 line
2.29.2
author maintainer
#13 lore raw

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

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-meson.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-meson.c +1 -1
index 8642c06565ea..44bdc8b4a90d 100644
@@ -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", },
Signature · 7 lines
2.29.2


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer Acked-by on v1 10/21
#14 lore raw

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

Quoted 3 lines · Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

Quoted 19 lines
---
 drivers/rtc/rtc-meson.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-meson.c +1 -1
index 8642c06565ea..44bdc8b4a90d 100644
@@ -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", },
Signature · 1 line
2.29.2

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

author maintainer
#15 lore raw

PATCH 11/21 rtc: pcf85063: quiet maybe-unused variable warnings

In reply to Alexandre Belloni

pcf85063a_config and rv8263_config are only referenced by pcf85063_of_match, move them in the #ifdef CONFIG_OF section.

---
 drivers/rtc/rtc-pcf85063.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
drivers/rtc/rtc-pcf85063.c +19 -19
index f7e7c9eb0781..aef6c1ee8bb0 100644
@@ -501,15 +501,6 @@ static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063)
 }
 #endif
 
-static const struct pcf85063_config pcf85063a_config = {
-	.regmap = {
-		.reg_bits = 8,
-		.val_bits = 8,
-		.max_register = 0x11,
-	},
-	.has_alarms = 1,
-};
-
 static const struct pcf85063_config pcf85063tp_config = {
 	.regmap = {
 		.reg_bits = 8,
@@ -518,16 +509,6 @@ static const struct pcf85063_config pcf85063tp_config = {
 	},
 };
 
-static const struct pcf85063_config rv8263_config = {
-	.regmap = {
-		.reg_bits = 8,
-		.val_bits = 8,
-		.max_register = 0x11,
-	},
-	.has_alarms = 1,
-	.force_cap_7000 = 1,
-};
-
 static int pcf85063_probe(struct i2c_client *client)
 {
 	struct pcf85063 *pcf85063;
@@ -611,6 +592,25 @@ static int pcf85063_probe(struct i2c_client *client)
 }
 
 #ifdef CONFIG_OF
+static const struct pcf85063_config pcf85063a_config = {
+	.regmap = {
+		.reg_bits = 8,
+		.val_bits = 8,
+		.max_register = 0x11,
+	},
+	.has_alarms = 1,
+};
+
+static const struct pcf85063_config rv8263_config = {
+	.regmap = {
+		.reg_bits = 8,
+		.val_bits = 8,
+		.max_register = 0x11,
+	},
+	.has_alarms = 1,
+	.force_cap_7000 = 1,
+};
+
 static const struct of_device_id pcf85063_of_match[] = {
 	{ .compatible = "nxp,pcf85063", .data = &pcf85063tp_config },
 	{ .compatible = "nxp,pcf85063tp", .data = &pcf85063tp_config },
Signature · 1 line
2.29.2
author maintainer
#16 lore raw

PATCH 12/21 rtc: pcf85363: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-pcf85363.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pcf85363.c +1 -1
index 8c2dcbac0d7b..bb3e9ba75f6c 100644
@@ -424,7 +424,7 @@ static int pcf85363_probe(struct i2c_client *client,
 	return ret;
 }
 
-static const struct of_device_id dev_ids[] = {
+static const __maybe_unused struct of_device_id dev_ids[] = {
 	{ .compatible = "nxp,pcf85263", .data = &pcf_85263_config },
 	{ .compatible = "nxp,pcf85363", .data = &pcf_85363_config },
 	{ /* sentinel */ }
Signature · 1 line
2.29.2
author maintainer
#17 lore raw

PATCH 13/21 rtc: rs5c372: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rs5c372.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rs5c372.c +1 -1
index 3bd6eaa0dcf6..80980414890c 100644
@@ -83,7 +83,7 @@ static const struct i2c_device_id rs5c372_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rs5c372_id);
 
-static const struct of_device_id rs5c372_of_match[] = {
+static const __maybe_unused struct of_device_id rs5c372_of_match[] = {
 	{
 		.compatible = "ricoh,r2025sd",
 		.data = (void *)rtc_r2025sd
Signature · 1 line
2.29.2
author maintainer
#18 lore raw

PATCH 14/21 rtc: rv3028: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rv3028.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv3028.c +1 -1
index 2ee2afa3fa66..0c48d980d06a 100644
@@ -898,7 +898,7 @@ static int rv3028_probe(struct i2c_client *client)
 	return 0;
 }
 
-static const struct of_device_id rv3028_of_match[] = {
+static const __maybe_unused struct of_device_id rv3028_of_match[] = {
 	{ .compatible = "microcrystal,rv3028", },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#19 lore raw

PATCH 15/21 rtc: rv3029: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rv3029c2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv3029c2.c +1 -1
index 71102c7fbd7d..8cb84c9595fc 100644
@@ -808,7 +808,7 @@ static const struct i2c_device_id rv3029_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rv3029_id);
 
-static const struct of_device_id rv3029_of_match[] = {
+static const __maybe_unused struct of_device_id rv3029_of_match[] = {
 	{ .compatible = "microcrystal,rv3029" },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#20 lore raw

PATCH 16/21 rtc: rv3032: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rv3032.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv3032.c +1 -1
index 5161016bce00..d63102d5cb1e 100644
@@ -906,7 +906,7 @@ static int rv3032_probe(struct i2c_client *client)
 	return 0;
 }
 
-static const struct of_device_id rv3032_of_match[] = {
+static const __maybe_unused struct of_device_id rv3032_of_match[] = {
 	{ .compatible = "microcrystal,rv3032", },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#21 lore raw

PATCH 17/21 rtc: rv8803: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rv8803.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rv8803.c +1 -1
index 8821264e9385..72adef5a5ebe 100644
@@ -607,7 +607,7 @@ static const struct i2c_device_id rv8803_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rv8803_id);
 
-static const struct of_device_id rv8803_of_match[] = {
+static const __maybe_unused struct of_device_id rv8803_of_match[] = {
 	{
 		.compatible = "microcrystal,rv8803",
 		.data = (void *)rv_8803
Signature · 1 line
2.29.2
author maintainer
#22 lore raw

PATCH 18/21 rtc: rx8010: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rx8010.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rx8010.c +1 -1
index 95e751c8048e..d09056570739 100644
@@ -55,7 +55,7 @@ static const struct i2c_device_id rx8010_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rx8010_id);
 
-static const struct of_device_id rx8010_of_match[] = {
+static const __maybe_unused struct of_device_id rx8010_of_match[] = {
 	{ .compatible = "epson,rx8010" },
 	{ }
 };
Signature · 1 line
2.29.2
author maintainer
#23 lore raw

PATCH 19/21 rtc: rx8581: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-rx8581.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rx8581.c +1 -1
index de109139529b..aed4898a0ff4 100644
@@ -314,7 +314,7 @@ static const struct i2c_device_id rx8581_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rx8581_id);
 
-static const struct of_device_id rx8581_of_match[] = {
+static const __maybe_unused struct of_device_id rx8581_of_match[] = {
 	{ .compatible = "epson,rx8571", .data = &rx8571_config },
 	{ .compatible = "epson,rx8581", .data = &rx8581_config },
 	{ /* sentinel */ }
Signature · 1 line
2.29.2
author maintainer
#24 lore raw

PATCH 20/21 rtc: s35390a: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-s35390a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-s35390a.c +1 -1
index ea15d0392bb9..b5bdeda7d767 100644
@@ -55,7 +55,7 @@ static const struct i2c_device_id s35390a_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, s35390a_id);
 
-static const struct of_device_id s35390a_of_match[] = {
+static const __maybe_unused struct of_device_id s35390a_of_match[] = {
 	{ .compatible = "s35390a" },
 	{ .compatible = "sii,s35390a" },
 	{ }
Signature · 1 line
2.29.2
author maintainer
#25 lore raw

PATCH 21/21 rtc: sd3078: quiet maybe-unused variable warning

In reply to Alexandre Belloni

When CONFIG_OF is disabled then the matching table is not referenced.

---
 drivers/rtc/rtc-sd3078.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-sd3078.c +1 -1
index f6bee69ba017..24e8528e23ec 100644
@@ -207,7 +207,7 @@ static const struct i2c_device_id sd3078_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, sd3078_id);
 
-static const struct of_device_id rtc_dt_match[] = {
+static const __maybe_unused struct of_device_id rtc_dt_match[] = {
 	{ .compatible = "whwave,sd3078" },
 	{},
 };
Signature · 1 line
2.29.2