linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/12] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
@ 2020-08-20  7:32 ` Jisheng Zhang
  2020-08-20  7:33 ` [PATCH 02/12] regulator: da9210: " Jisheng Zhang
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:32 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/88pg86x.c:87:34: warning: ‘pg86x_dt_ids’ defined but not used [-Wunused-const-variable=]
87 | static const struct of_device_id pg86x_dt_ids [] = {
   |                                  ^~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/88pg86x.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/88pg86x.c b/drivers/regulator/88pg86x.c
index 71cfa2c5de5e..c47c14d190f5 100644
--- a/drivers/regulator/88pg86x.c
+++ b/drivers/regulator/88pg86x.c
@@ -84,12 +84,14 @@ static int pg86x_i2c_probe(struct i2c_client *i2c)
 	return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id pg86x_dt_ids [] = {
 	{ .compatible = "marvell,88pg867" },
 	{ .compatible = "marvell,88pg868" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, pg86x_dt_ids);
+#endif
 
 static const struct i2c_device_id pg86x_i2c_id[] = {
 	{ "88pg867", },
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/12] regulator: da9210: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
  2020-08-20  7:32 ` [PATCH 01/12] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n Jisheng Zhang
@ 2020-08-20  7:33 ` Jisheng Zhang
  2020-08-20  7:34 ` [PATCH 03/12] regulator: fan53555: " Jisheng Zhang
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:33 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/da9210-regulator.c:128:34: warning: ‘da9210_dt_ids’ defined but not used [-Wunused-const-variable=]
  128 | static const struct of_device_id da9210_dt_ids[] = {
      |                                  ^~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/da9210-regulator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
index 0cdeb6186529..219baed89ba5 100644
--- a/drivers/regulator/da9210-regulator.c
+++ b/drivers/regulator/da9210-regulator.c
@@ -125,11 +125,13 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
  * I2C driver interface functions
  */
 
+#ifdef CONFIG_OF
 static const struct of_device_id da9210_dt_ids[] = {
 	{ .compatible = "dlg,da9210", },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, da9210_dt_ids);
+#endif
 
 static int da9210_i2c_probe(struct i2c_client *i2c)
 {
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/12] regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
  2020-08-20  7:32 ` [PATCH 01/12] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n Jisheng Zhang
  2020-08-20  7:33 ` [PATCH 02/12] regulator: da9210: " Jisheng Zhang
@ 2020-08-20  7:34 ` Jisheng Zhang
  2020-08-20  7:34 ` [PATCH 04/12] regulator: fixed: Fix W=1 build warnings " Jisheng Zhang
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:34 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/fan53555.c:439:34: warning: ‘fan53555_dt_ids’ defined but not used [-Wunused-const-variable=]
  439 | static const struct of_device_id fan53555_dt_ids[] = {
      |                                  ^~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/fan53555.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index 00c83492f774..387c53f387ba 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -436,6 +436,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
 	return pdata;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id fan53555_dt_ids[] = {
 	{
 		.compatible = "fcs,fan53526",
@@ -453,6 +454,7 @@ static const struct of_device_id fan53555_dt_ids[] = {
 	{ }
 };
 MODULE_DEVICE_TABLE(of, fan53555_dt_ids);
+#endif
 
 static int fan53555_regulator_probe(struct i2c_client *client,
 				const struct i2c_device_id *id)
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/12] regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (2 preceding siblings ...)
  2020-08-20  7:34 ` [PATCH 03/12] regulator: fan53555: " Jisheng Zhang
@ 2020-08-20  7:34 ` Jisheng Zhang
  2020-08-20  7:35 ` [PATCH 05/12] regulator: ltc3589: Fix W=1 build warning " Jisheng Zhang
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:34 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warnings when CONFIG_OF=n:

drivers/regulator/fixed.c:48:36: warning: ‘fixed_clkenable_data’ defined but not used [-Wunused-const-variable=]
   48 | static const struct fixed_dev_type fixed_clkenable_data = {
      |                                    ^~~~~~~~~~~~~~~~~~~~
drivers/regulator/fixed.c:44:36: warning: ‘fixed_voltage_data’ defined but not used [-Wunused-const-variable=]
   44 | static const struct fixed_dev_type fixed_voltage_data = {
      |                                    ^~~~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/fixed.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index d54830e48b8d..2d92a471ebc1 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -41,14 +41,6 @@ struct fixed_dev_type {
 	bool has_enable_clock;
 };
 
-static const struct fixed_dev_type fixed_voltage_data = {
-	.has_enable_clock = false,
-};
-
-static const struct fixed_dev_type fixed_clkenable_data = {
-	.has_enable_clock = true,
-};
-
 static int reg_clock_enable(struct regulator_dev *rdev)
 {
 	struct fixed_voltage_data *priv = rdev_get_drvdata(rdev);
@@ -260,6 +252,14 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
 }
 
 #if defined(CONFIG_OF)
+static const struct fixed_dev_type fixed_voltage_data = {
+	.has_enable_clock = false,
+};
+
+static const struct fixed_dev_type fixed_clkenable_data = {
+	.has_enable_clock = true,
+};
+
 static const struct of_device_id fixed_of_match[] = {
 	{
 		.compatible = "regulator-fixed",
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 05/12] regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (3 preceding siblings ...)
  2020-08-20  7:34 ` [PATCH 04/12] regulator: fixed: Fix W=1 build warnings " Jisheng Zhang
@ 2020-08-20  7:35 ` Jisheng Zhang
  2020-08-20  7:36 ` [PATCH 06/12] regulator: ltc3676: " Jisheng Zhang
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:35 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/ltc3589.c:460:34: warning: ‘ltc3589_of_match’ defined but not used [-Wunused-const-variable=]
  460 | static const struct of_device_id ltc3589_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/ltc3589.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c
index 9a037fdc5fc5..c73010bb3b41 100644
--- a/drivers/regulator/ltc3589.c
+++ b/drivers/regulator/ltc3589.c
@@ -457,6 +457,7 @@ static const struct i2c_device_id ltc3589_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id);
 
+#ifdef CONFIG_OF
 static const struct of_device_id ltc3589_of_match[] = {
 	{
 		.compatible = "lltc,ltc3589",
@@ -473,6 +474,7 @@ static const struct of_device_id ltc3589_of_match[] = {
 	{ },
 };
 MODULE_DEVICE_TABLE(of, ltc3589_of_match);
+#endif
 
 static struct i2c_driver ltc3589_driver = {
 	.driver = {
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/12] regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (4 preceding siblings ...)
  2020-08-20  7:35 ` [PATCH 05/12] regulator: ltc3589: Fix W=1 build warning " Jisheng Zhang
@ 2020-08-20  7:36 ` Jisheng Zhang
  2020-08-20  7:37 ` [PATCH 07/12] regulator: max1586: " Jisheng Zhang
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:36 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/ltc3676.c:371:34: warning: ‘ltc3676_of_match’ defined but not used [-Wunused-const-variable=]
  371 | static const struct of_device_id ltc3676_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/ltc3676.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c
index 093b3e4a6303..0778d5bb7559 100644
--- a/drivers/regulator/ltc3676.c
+++ b/drivers/regulator/ltc3676.c
@@ -368,11 +368,13 @@ static const struct i2c_device_id ltc3676_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ltc3676_i2c_id);
 
+#ifdef CONFIG_OF
 static const struct of_device_id ltc3676_of_match[] = {
 	{ .compatible = "lltc,ltc3676" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, ltc3676_of_match);
+#endif
 
 static struct i2c_driver ltc3676_driver = {
 	.driver = {
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 07/12] regulator: max1586: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (5 preceding siblings ...)
  2020-08-20  7:36 ` [PATCH 06/12] regulator: ltc3676: " Jisheng Zhang
@ 2020-08-20  7:37 ` Jisheng Zhang
  2020-08-20  7:37 ` [PATCH 08/12] regulator: max77826: " Jisheng Zhang
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:37 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/max1586.c:204:34: warning: ‘max1586_of_match’ defined but not used [-Wunused-const-variable=]
  204 | static const struct of_device_id max1586_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/max1586.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index f8941025780b..2ddcdd2908b1 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -201,11 +201,13 @@ static int of_get_max1586_platform_data(struct device *dev,
 	return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id max1586_of_match[] = {
 	{ .compatible = "maxim,max1586", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, max1586_of_match);
+#endif
 
 static int max1586_pmic_probe(struct i2c_client *client,
 					const struct i2c_device_id *i2c_id)
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 08/12] regulator: max77826: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (6 preceding siblings ...)
  2020-08-20  7:37 ` [PATCH 07/12] regulator: max1586: " Jisheng Zhang
@ 2020-08-20  7:37 ` Jisheng Zhang
  2020-08-20  7:38 ` [PATCH 09/12] regulator: pwm: " Jisheng Zhang
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:37 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/max77826-regulator.c:277:34: warning: ‘max77826_of_match’ defined but not used [-Wunused-const-variable=]
  277 | static const struct of_device_id max77826_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/max77826-regulator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/max77826-regulator.c b/drivers/regulator/max77826-regulator.c
index 502ab6afc814..7fbdcd7118a8 100644
--- a/drivers/regulator/max77826-regulator.c
+++ b/drivers/regulator/max77826-regulator.c
@@ -274,11 +274,13 @@ static int max77826_i2c_probe(struct i2c_client *client)
 	return max77826_read_device_id(regmap, dev);
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id max77826_of_match[] = {
 	{ .compatible = "maxim,max77826" },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, max77826_of_match);
+#endif
 
 static const struct i2c_device_id max77826_id[] = {
 	{ "max77826-regulator" },
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 09/12] regulator: pwm: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (7 preceding siblings ...)
  2020-08-20  7:37 ` [PATCH 08/12] regulator: max77826: " Jisheng Zhang
@ 2020-08-20  7:38 ` Jisheng Zhang
  2020-08-20  7:46 ` [PATCH 11/12] regulator: stm32-vrefbuf: " Jisheng Zhang
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:38 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/pwm-regulator.c:393:34: warning: ‘pwm_of_match’ defined but not used [-Wunused-const-variable=]
  393 | static const struct of_device_id pwm_of_match[] = {
      |                                  ^~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/pwm-regulator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index 3234b118b53e..c00829bd5d7b 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -390,11 +390,13 @@ static int pwm_regulator_probe(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id pwm_of_match[] = {
 	{ .compatible = "pwm-regulator" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, pwm_of_match);
+#endif
 
 static struct platform_driver pwm_regulator_driver = {
 	.driver = {
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 11/12] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (8 preceding siblings ...)
  2020-08-20  7:38 ` [PATCH 09/12] regulator: pwm: " Jisheng Zhang
@ 2020-08-20  7:46 ` Jisheng Zhang
  2020-08-20  8:13   ` Fabrice Gasnier
  2020-08-20  7:47 ` [PATCH 12/12] regulator: sy8106a: " Jisheng Zhang
  2020-08-20  8:00 ` [PATCH 10/12] regulator: stm32-pwr: " Jisheng Zhang
  11 siblings, 1 reply; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/stm32-vrefbuf.c:287:34: warning: ‘stm32_vrefbuf_of_match’ defined but not used [-Wunused-const-variable=]
  287 | static const struct of_device_id stm32_vrefbuf_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/stm32-vrefbuf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
index 992bc18101ef..5a5c12d9ea22 100644
--- a/drivers/regulator/stm32-vrefbuf.c
+++ b/drivers/regulator/stm32-vrefbuf.c
@@ -284,11 +284,13 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
 			   NULL)
 };
 
+#ifdef CONFIG_OF
 static const struct of_device_id stm32_vrefbuf_of_match[] = {
 	{ .compatible = "st,stm32-vrefbuf", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, stm32_vrefbuf_of_match);
+#endif
 
 static struct platform_driver stm32_vrefbuf_driver = {
 	.probe = stm32_vrefbuf_probe,
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 12/12] regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (9 preceding siblings ...)
  2020-08-20  7:46 ` [PATCH 11/12] regulator: stm32-vrefbuf: " Jisheng Zhang
@ 2020-08-20  7:47 ` Jisheng Zhang
  2020-08-20  8:00 ` [PATCH 10/12] regulator: stm32-pwr: " Jisheng Zhang
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  7:47 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/sy8106a-regulator.c:126:34: warning: ‘sy8106a_i2c_of_match’ defined but not used [-Wunused-const-variable=]
  126 | static const struct of_device_id sy8106a_i2c_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/sy8106a-regulator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c
index 2222e739e62b..1878caf4dd40 100644
--- a/drivers/regulator/sy8106a-regulator.c
+++ b/drivers/regulator/sy8106a-regulator.c
@@ -123,11 +123,13 @@ static int sy8106a_i2c_probe(struct i2c_client *i2c)
 	return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id sy8106a_i2c_of_match[] = {
 	{ .compatible = "silergy,sy8106a" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match);
+#endif
 
 static const struct i2c_device_id sy8106a_i2c_id[] = {
 	{ "sy8106a", 0 },
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/12] regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n
       [not found] <20200820152926.42c48840@xhacker.debian>
                   ` (10 preceding siblings ...)
  2020-08-20  7:47 ` [PATCH 12/12] regulator: sy8106a: " Jisheng Zhang
@ 2020-08-20  8:00 ` Jisheng Zhang
  11 siblings, 0 replies; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  8:00 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Support Opensource, Maxime Coquelin,
	Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

Fix below warning when CONFIG_OF=n:

drivers/regulator/stm32-pwr.c:169:34: warning: ‘stm32_pwr_of_match’ defined but not used [-Wunused-const-variable=]
  169 | static const struct of_device_id stm32_pwr_of_match[] = {
      |                                  ^~~~~~~~~~~~~~~~~~

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/regulator/stm32-pwr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c
index e0e627b0106e..3d5cd954c391 100644
--- a/drivers/regulator/stm32-pwr.c
+++ b/drivers/regulator/stm32-pwr.c
@@ -166,11 +166,13 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev)
 	return ret;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id stm32_pwr_of_match[] = {
 	{ .compatible = "st,stm32mp1,pwr-reg", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, stm32_pwr_of_match);
+#endif
 
 static struct platform_driver stm32_pwr_driver = {
 	.probe = stm32_pwr_regulator_probe,
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 11/12] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
  2020-08-20  7:46 ` [PATCH 11/12] regulator: stm32-vrefbuf: " Jisheng Zhang
@ 2020-08-20  8:13   ` Fabrice Gasnier
  2020-08-20  8:32     ` Jisheng Zhang
  0 siblings, 1 reply; 15+ messages in thread
From: Fabrice Gasnier @ 2020-08-20  8:13 UTC (permalink / raw)
  To: Jisheng Zhang, Liam Girdwood, Mark Brown, Support Opensource,
	Maxime Coquelin, Alexandre Torgue, Icenowy Zheng
  Cc: linux-kernel, linux-arm-kernel, linux-stm32

On 8/20/20 9:46 AM, Jisheng Zhang wrote:
> Fix below warning when CONFIG_OF=n:
> 
> drivers/regulator/stm32-vrefbuf.c:287:34: warning: ‘stm32_vrefbuf_of_match’ defined but not used [-Wunused-const-variable=]
>   287 | static const struct of_device_id stm32_vrefbuf_of_match[] = {
>       |                                  ^~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
>  drivers/regulator/stm32-vrefbuf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
> index 992bc18101ef..5a5c12d9ea22 100644
> --- a/drivers/regulator/stm32-vrefbuf.c
> +++ b/drivers/regulator/stm32-vrefbuf.c
> @@ -284,11 +284,13 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
>  			   NULL)
>  };
>  
> +#ifdef CONFIG_OF

Hi Jisheng,

You could probably adopt "__maybe_unused" here ? E.g. like:

static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = {

I can see other drivers use this already for the same.

Thanks,
Best regards,
Fabrice

>  static const struct of_device_id stm32_vrefbuf_of_match[] = {
>  	{ .compatible = "st,stm32-vrefbuf", },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, stm32_vrefbuf_of_match);
> +#endif
>  
>  static struct platform_driver stm32_vrefbuf_driver = {
>  	.probe = stm32_vrefbuf_probe,
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 11/12] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
  2020-08-20  8:13   ` Fabrice Gasnier
@ 2020-08-20  8:32     ` Jisheng Zhang
  2020-08-20 10:51       ` Mark Brown
  0 siblings, 1 reply; 15+ messages in thread
From: Jisheng Zhang @ 2020-08-20  8:32 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: Alexandre Torgue, Support Opensource, Liam Girdwood,
	linux-kernel, Mark Brown, Maxime Coquelin, linux-stm32,
	linux-arm-kernel, Icenowy Zheng

On Thu, 20 Aug 2020 10:13:12 +0200 Fabrice Gasnier wrote:

> 
> 
> On 8/20/20 9:46 AM, Jisheng Zhang wrote:
> > Fix below warning when CONFIG_OF=n:
> >
> > drivers/regulator/stm32-vrefbuf.c:287:34: warning: ‘stm32_vrefbuf_of_match’ defined but not used [-Wunused-const-variable=]
> >   287 | static const struct of_device_id stm32_vrefbuf_of_match[] = {
> >       |                                  ^~~~~~~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > ---
> >  drivers/regulator/stm32-vrefbuf.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
> > index 992bc18101ef..5a5c12d9ea22 100644
> > --- a/drivers/regulator/stm32-vrefbuf.c
> > +++ b/drivers/regulator/stm32-vrefbuf.c
> > @@ -284,11 +284,13 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
> >                          NULL)
> >  };
> >
> > +#ifdef CONFIG_OF  
> 
> Hi Jisheng,

Hi,

> 
> You could probably adopt "__maybe_unused" here ? E.g. like:

__maybe_unused also fixes the warning. I'm not sure the maintainers' preference.

Hi Mark,

which solution do you prefer?

Thanks in advance

> 
> static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = {
> 
> I can see other drivers use this already for the same.
> 
> Thanks,
> Best regards,
> Fabrice
> 
> >  static const struct of_device_id stm32_vrefbuf_of_match[] = {
> >       { .compatible = "st,stm32-vrefbuf", },
> >       {},
> >  };
> >  MODULE_DEVICE_TABLE(of, stm32_vrefbuf_of_match);
> > +#endif
> >
> >  static struct platform_driver stm32_vrefbuf_driver = {
> >       .probe = stm32_vrefbuf_probe,
> >  


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 11/12] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
  2020-08-20  8:32     ` Jisheng Zhang
@ 2020-08-20 10:51       ` Mark Brown
  0 siblings, 0 replies; 15+ messages in thread
From: Mark Brown @ 2020-08-20 10:51 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Alexandre Torgue, Support Opensource, Liam Girdwood,
	linux-kernel, Maxime Coquelin, Fabrice Gasnier, linux-stm32,
	linux-arm-kernel, Icenowy Zheng


[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]

On Thu, Aug 20, 2020 at 04:32:32PM +0800, Jisheng Zhang wrote:
> On Thu, 20 Aug 2020 10:13:12 +0200 Fabrice Gasnier wrote:

> > You could probably adopt "__maybe_unused" here ? E.g. like:

> __maybe_unused also fixes the warning. I'm not sure the maintainers' preference.

> which solution do you prefer?

__maybe_unused is a bit nicer.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-08-20 10:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200820152926.42c48840@xhacker.debian>
2020-08-20  7:32 ` [PATCH 01/12] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n Jisheng Zhang
2020-08-20  7:33 ` [PATCH 02/12] regulator: da9210: " Jisheng Zhang
2020-08-20  7:34 ` [PATCH 03/12] regulator: fan53555: " Jisheng Zhang
2020-08-20  7:34 ` [PATCH 04/12] regulator: fixed: Fix W=1 build warnings " Jisheng Zhang
2020-08-20  7:35 ` [PATCH 05/12] regulator: ltc3589: Fix W=1 build warning " Jisheng Zhang
2020-08-20  7:36 ` [PATCH 06/12] regulator: ltc3676: " Jisheng Zhang
2020-08-20  7:37 ` [PATCH 07/12] regulator: max1586: " Jisheng Zhang
2020-08-20  7:37 ` [PATCH 08/12] regulator: max77826: " Jisheng Zhang
2020-08-20  7:38 ` [PATCH 09/12] regulator: pwm: " Jisheng Zhang
2020-08-20  7:46 ` [PATCH 11/12] regulator: stm32-vrefbuf: " Jisheng Zhang
2020-08-20  8:13   ` Fabrice Gasnier
2020-08-20  8:32     ` Jisheng Zhang
2020-08-20 10:51       ` Mark Brown
2020-08-20  7:47 ` [PATCH 12/12] regulator: sy8106a: " Jisheng Zhang
2020-08-20  8:00 ` [PATCH 10/12] regulator: stm32-pwr: " Jisheng Zhang

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).