2020-08-21 03:22:30

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 00/15] regulator: Fix W=1 build warning when CONFIG_OF=n

Fixing W=1 build warning when no support for device tree is there.

Since v1:
- fix the warning with __maybe_unused instead of CONFIG_OF macro
- add 3 more patches to fix the same issue

Jisheng Zhang (15):
regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n
regulator: da9210: Fix W=1 build warning when CONFIG_OF=n
regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n
regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n
regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n
regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n
regulator: max1586: Fix W=1 build warning when CONFIG_OF=n
regulator: max77826: Fix W=1 build warning when CONFIG_OF=n
regulator: pwm: Fix W=1 build warning when CONFIG_OF=n
regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n
regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n
regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n
regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n
regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n

drivers/regulator/88pg86x.c | 2 +-
drivers/regulator/da9210-regulator.c | 2 +-
drivers/regulator/fan53555.c | 2 +-
drivers/regulator/fixed.c | 16 ++++++++--------
drivers/regulator/ltc3589.c | 2 +-
drivers/regulator/ltc3676.c | 2 +-
drivers/regulator/max1586.c | 2 +-
drivers/regulator/max77826-regulator.c | 2 +-
drivers/regulator/pwm-regulator.c | 2 +-
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
drivers/regulator/stm32-booster.c | 2 +-
drivers/regulator/stm32-pwr.c | 2 +-
drivers/regulator/stm32-vrefbuf.c | 2 +-
drivers/regulator/sy8106a-regulator.c | 2 +-
drivers/regulator/tps65023-regulator.c | 2 +-
15 files changed, 22 insertions(+), 22 deletions(-)

--
2.28.0


2020-08-21 03:23:15

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 14/15] regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n

Fix below warning when CONFIG_OF=n:

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

Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/regulator/stm32-booster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/stm32-booster.c b/drivers/regulator/stm32-booster.c
index 03f162ffd144..3136ea8a35d5 100644
--- a/drivers/regulator/stm32-booster.c
+++ b/drivers/regulator/stm32-booster.c
@@ -101,7 +101,7 @@ static int stm32_booster_probe(struct platform_device *pdev)
return 0;
}

-static const struct of_device_id stm32_booster_of_match[] = {
+static const struct of_device_id __maybe_unused stm32_booster_of_match[] = {
{
.compatible = "st,stm32h7-booster",
.data = (void *)&stm32h7_booster_desc
--
2.28.0

2020-08-21 03:23:25

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 07/15] regulator: max1586: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/max1586.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index f8941025780b..d4958394e608 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -201,7 +201,7 @@ static int of_get_max1586_platform_data(struct device *dev,
return 0;
}

-static const struct of_device_id max1586_of_match[] = {
+static const struct of_device_id __maybe_unused max1586_of_match[] = {
{ .compatible = "maxim,max1586", },
{},
};
--
2.28.0

2020-08-21 03:23:38

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 10/15] regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/stm32-pwr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c
index e0e627b0106e..2a42acb7c24e 100644
--- a/drivers/regulator/stm32-pwr.c
+++ b/drivers/regulator/stm32-pwr.c
@@ -166,7 +166,7 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev)
return ret;
}

-static const struct of_device_id stm32_pwr_of_match[] = {
+static const struct of_device_id __maybe_unused stm32_pwr_of_match[] = {
{ .compatible = "st,stm32mp1,pwr-reg", },
{},
};
--
2.28.0

2020-08-21 03:24:19

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 04/15] regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n

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 <[email protected]>
---
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 142a70a89153..5a03fd86ad0a 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

2020-08-21 03:24:27

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 11/15] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/stm32-vrefbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
index 992bc18101ef..161622ea7259 100644
--- a/drivers/regulator/stm32-vrefbuf.c
+++ b/drivers/regulator/stm32-vrefbuf.c
@@ -284,7 +284,7 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
NULL)
};

-static const struct of_device_id stm32_vrefbuf_of_match[] = {
+static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = {
{ .compatible = "st,stm32-vrefbuf", },
{},
};
--
2.28.0

2020-08-21 03:25:02

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 05/15] regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/ltc3589.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c
index 9a037fdc5fc5..fa563aacf742 100644
--- a/drivers/regulator/ltc3589.c
+++ b/drivers/regulator/ltc3589.c
@@ -457,7 +457,7 @@ static const struct i2c_device_id ltc3589_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id);

-static const struct of_device_id ltc3589_of_match[] = {
+static const struct of_device_id __maybe_unused ltc3589_of_match[] = {
{
.compatible = "lltc,ltc3589",
.data = (void *)LTC3589,
--
2.28.0

2020-08-21 03:25:08

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 03/15] regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/fan53555.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index 00c83492f774..aa426183b6a1 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -436,7 +436,7 @@ static struct fan53555_platform_data *fan53555_parse_dt(struct device *dev,
return pdata;
}

-static const struct of_device_id fan53555_dt_ids[] = {
+static const struct of_device_id __maybe_unused fan53555_dt_ids[] = {
{
.compatible = "fcs,fan53526",
.data = (void *)FAN53526_VENDOR_FAIRCHILD,
--
2.28.0

2020-08-21 03:25:47

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 02/15] regulator: da9210: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/da9210-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
index 0cdeb6186529..2aea442b62fe 100644
--- a/drivers/regulator/da9210-regulator.c
+++ b/drivers/regulator/da9210-regulator.c
@@ -125,7 +125,7 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
* I2C driver interface functions
*/

-static const struct of_device_id da9210_dt_ids[] = {
+static const struct of_device_id __maybe_unused da9210_dt_ids[] = {
{ .compatible = "dlg,da9210", },
{ }
};
--
2.28.0

2020-08-21 03:26:21

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 01/15] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/88pg86x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/88pg86x.c b/drivers/regulator/88pg86x.c
index 71cfa2c5de5e..e995e7379a04 100644
--- a/drivers/regulator/88pg86x.c
+++ b/drivers/regulator/88pg86x.c
@@ -84,7 +84,7 @@ static int pg86x_i2c_probe(struct i2c_client *i2c)
return 0;
}

-static const struct of_device_id pg86x_dt_ids [] = {
+static const struct of_device_id __maybe_unused pg86x_dt_ids[] = {
{ .compatible = "marvell,88pg867" },
{ .compatible = "marvell,88pg868" },
{ }
--
2.28.0

2020-08-21 03:26:22

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 13/15] regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n

Fix below warning when CONFIG_OF=n:

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

Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 08dcc614efa7..d488325499a9 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -967,7 +967,7 @@ static int rpmh_regulator_probe(struct platform_device *pdev)
return 0;
}

-static const struct of_device_id rpmh_regulator_match_table[] = {
+static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = {
{
.compatible = "qcom,pm8005-rpmh-regulators",
.data = pm8005_vreg_data,
--
2.28.0

2020-08-21 03:26:38

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 09/15] regulator: pwm: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/pwm-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c
index 3234b118b53e..d250e60f1625 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -390,7 +390,7 @@ static int pwm_regulator_probe(struct platform_device *pdev)
return 0;
}

-static const struct of_device_id pwm_of_match[] = {
+static const struct of_device_id __maybe_unused pwm_of_match[] = {
{ .compatible = "pwm-regulator" },
{ },
};
--
2.28.0

2020-08-21 03:27:20

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 12/15] regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/sy8106a-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/sy8106a-regulator.c b/drivers/regulator/sy8106a-regulator.c
index 2222e739e62b..c119f85259a5 100644
--- a/drivers/regulator/sy8106a-regulator.c
+++ b/drivers/regulator/sy8106a-regulator.c
@@ -123,7 +123,7 @@ static int sy8106a_i2c_probe(struct i2c_client *i2c)
return 0;
}

-static const struct of_device_id sy8106a_i2c_of_match[] = {
+static const struct of_device_id __maybe_unused sy8106a_i2c_of_match[] = {
{ .compatible = "silergy,sy8106a" },
{ },
};
--
2.28.0

2020-08-21 03:27:27

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 06/15] regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n

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 <[email protected]>
---
drivers/regulator/ltc3676.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c
index 093b3e4a6303..557727b54f0e 100644
--- a/drivers/regulator/ltc3676.c
+++ b/drivers/regulator/ltc3676.c
@@ -368,7 +368,7 @@ static const struct i2c_device_id ltc3676_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ltc3676_i2c_id);

-static const struct of_device_id ltc3676_of_match[] = {
+static const struct of_device_id __maybe_unused ltc3676_of_match[] = {
{ .compatible = "lltc,ltc3676" },
{ },
};
--
2.28.0

2020-08-21 03:27:40

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 15/15] regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n

Fix below warning when CONFIG_OF=n:

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

Signed-off-by: Jisheng Zhang <[email protected]>
---
drivers/regulator/tps65023-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 795d459ff3cf..f25806531c7e 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -316,7 +316,7 @@ static int tps_65023_probe(struct i2c_client *client,
return 0;
}

-static const struct of_device_id tps65023_of_match[] = {
+static const struct of_device_id __maybe_unused tps65023_of_match[] = {
{ .compatible = "ti,tps65020", .data = &tps65020_drv_data},
{ .compatible = "ti,tps65021", .data = &tps65021_drv_data},
{ .compatible = "ti,tps65023", .data = &tps65023_drv_data},
--
2.28.0

2020-08-21 08:07:34

by Fabrice Gasnier

[permalink] [raw]
Subject: Re: [PATCH v2 11/15] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n

On 8/21/20 5:17 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 <[email protected]>

Hi Jisheng,

Acked-by: Fabrice Gasnier <[email protected]>

Thanks for the patch,
Fabrice
> ---
> drivers/regulator/stm32-vrefbuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
> index 992bc18101ef..161622ea7259 100644
> --- a/drivers/regulator/stm32-vrefbuf.c
> +++ b/drivers/regulator/stm32-vrefbuf.c
> @@ -284,7 +284,7 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
> NULL)
> };
>
> -static const struct of_device_id stm32_vrefbuf_of_match[] = {
> +static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = {
> { .compatible = "st,stm32-vrefbuf", },
> {},
> };
>

2020-08-21 08:08:43

by Fabrice Gasnier

[permalink] [raw]
Subject: Re: [PATCH v2 14/15] regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n

On 8/21/20 5:19 AM, Jisheng Zhang wrote:
> Fix below warning when CONFIG_OF=n:
>
> drivers/regulator/stm32-booster.c:104:34: warning: ‘stm32_booster_of_match’ defined but not used [-Wunused-const-variable=]
> 104 | static const struct of_device_id stm32_booster_of_match[] = {
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Jisheng Zhang <[email protected]>

Hi Jisheng,

Acked-by: Fabrice Gasnier <[email protected]>

Thanks for the patch,
Fabrice
> ---
> drivers/regulator/stm32-booster.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/stm32-booster.c b/drivers/regulator/stm32-booster.c
> index 03f162ffd144..3136ea8a35d5 100644
> --- a/drivers/regulator/stm32-booster.c
> +++ b/drivers/regulator/stm32-booster.c
> @@ -101,7 +101,7 @@ static int stm32_booster_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static const struct of_device_id stm32_booster_of_match[] = {
> +static const struct of_device_id __maybe_unused stm32_booster_of_match[] = {
> {
> .compatible = "st,stm32h7-booster",
> .data = (void *)&stm32h7_booster_desc
>

2020-08-21 08:58:04

by Adam Thomson

[permalink] [raw]
Subject: RE: [PATCH v2 02/15] regulator: da9210: Fix W=1 build warning when CONFIG_OF=n

On 21 August 2020 04:13, Jisheng Zhang wrote:

> 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 <[email protected]>

Acked-by: Adam Thomson <[email protected]>


2020-08-21 16:42:41

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2 00/15] regulator: Fix W=1 build warning when CONFIG_OF=n

On Fri, 21 Aug 2020 11:11:35 +0800, Jisheng Zhang wrote:
> Fixing W=1 build warning when no support for device tree is there.
>
> Since v1:
> - fix the warning with __maybe_unused instead of CONFIG_OF macro
> - add 3 more patches to fix the same issue
>
> Jisheng Zhang (15):
> regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n
> regulator: da9210: Fix W=1 build warning when CONFIG_OF=n
> regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n
> regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n
> regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n
> regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n
> regulator: max1586: Fix W=1 build warning when CONFIG_OF=n
> regulator: max77826: Fix W=1 build warning when CONFIG_OF=n
> regulator: pwm: Fix W=1 build warning when CONFIG_OF=n
> regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n
> regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
> regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n
> regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n
> regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n
> regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[01/15] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n
commit: e11e068ccbdb038e21e24ad2ee0157c902e3c9fc
[02/15] regulator: da9210: Fix W=1 build warning when CONFIG_OF=n
commit: 2d2a84ae30a3bda57a22b283c55be8e9e6fd158b
[03/15] regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n
commit: 5e97d7e809a1fd8a2401429df13e0410b77d2142
[04/15] regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n
commit: 0f037255008386f4ac15a201678e8e4565cd91a3
[05/15] regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n
commit: 8ece31564f1964d52eb1180ee33314c63533947e
[06/15] regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n
commit: 1d4c1e02b96ea579f68412980ee1fe5f2ce57d8c
[07/15] regulator: max1586: Fix W=1 build warning when CONFIG_OF=n
commit: 44bc5d168dc209bddafb3269f72a74c3cbb0d820
[08/15] regulator: max77826: Fix W=1 build warning when CONFIG_OF=n
commit: 7bf0a29c354fc1855dc478916211b5194bab4393
[09/15] regulator: pwm: Fix W=1 build warning when CONFIG_OF=n
commit: dc8c5ea3574e08e3c7105bbba5af5bb9c055903b
[10/15] regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n
commit: a94a11ce0d5235e53bb74d54bbd5399c23abfd87
[11/15] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
commit: d5579e7a2c6aa49a183440eb4e199f4a71543762
[12/15] regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n
commit: bbe26107204eb64e7be1b3433e8b2252edc0b375
[13/15] regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n
commit: a2508eeb8dbdf621518f8c3538d3adcb6960619c
[14/15] regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n
commit: b461ac1cc6c0a0bc4a788d5d65cfd82e5f3bd856
[15/15] regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n
commit: 8536bf811dd7a25d90d9128f9db98b5ed8e5bd5c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark