Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge series "regulator: Fix W=1 build warning when CONFIG_OF=n" from Jisheng Zhang <Jisheng.Zhang@synaptics.com>:

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

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

+22 -22
+1 -1
drivers/regulator/88pg86x.c
··· 84 84 return 0; 85 85 } 86 86 87 - static const struct of_device_id pg86x_dt_ids [] = { 87 + static const struct of_device_id __maybe_unused pg86x_dt_ids[] = { 88 88 { .compatible = "marvell,88pg867" }, 89 89 { .compatible = "marvell,88pg868" }, 90 90 { }
+1 -1
drivers/regulator/da9210-regulator.c
··· 125 125 * I2C driver interface functions 126 126 */ 127 127 128 - static const struct of_device_id da9210_dt_ids[] = { 128 + static const struct of_device_id __maybe_unused da9210_dt_ids[] = { 129 129 { .compatible = "dlg,da9210", }, 130 130 { } 131 131 };
+1 -1
drivers/regulator/fan53555.c
··· 436 436 return pdata; 437 437 } 438 438 439 - static const struct of_device_id fan53555_dt_ids[] = { 439 + static const struct of_device_id __maybe_unused fan53555_dt_ids[] = { 440 440 { 441 441 .compatible = "fcs,fan53526", 442 442 .data = (void *)FAN53526_VENDOR_FAIRCHILD,
+8 -8
drivers/regulator/fixed.c
··· 41 41 bool has_enable_clock; 42 42 }; 43 43 44 - static const struct fixed_dev_type fixed_voltage_data = { 45 - .has_enable_clock = false, 46 - }; 47 - 48 - static const struct fixed_dev_type fixed_clkenable_data = { 49 - .has_enable_clock = true, 50 - }; 51 - 52 44 static int reg_clock_enable(struct regulator_dev *rdev) 53 45 { 54 46 struct fixed_voltage_data *priv = rdev_get_drvdata(rdev); ··· 252 260 } 253 261 254 262 #if defined(CONFIG_OF) 263 + static const struct fixed_dev_type fixed_voltage_data = { 264 + .has_enable_clock = false, 265 + }; 266 + 267 + static const struct fixed_dev_type fixed_clkenable_data = { 268 + .has_enable_clock = true, 269 + }; 270 + 255 271 static const struct of_device_id fixed_of_match[] = { 256 272 { 257 273 .compatible = "regulator-fixed",
+1 -1
drivers/regulator/ltc3589.c
··· 457 457 }; 458 458 MODULE_DEVICE_TABLE(i2c, ltc3589_i2c_id); 459 459 460 - static const struct of_device_id ltc3589_of_match[] = { 460 + static const struct of_device_id __maybe_unused ltc3589_of_match[] = { 461 461 { 462 462 .compatible = "lltc,ltc3589", 463 463 .data = (void *)LTC3589,
+1 -1
drivers/regulator/ltc3676.c
··· 368 368 }; 369 369 MODULE_DEVICE_TABLE(i2c, ltc3676_i2c_id); 370 370 371 - static const struct of_device_id ltc3676_of_match[] = { 371 + static const struct of_device_id __maybe_unused ltc3676_of_match[] = { 372 372 { .compatible = "lltc,ltc3676" }, 373 373 { }, 374 374 };
+1 -1
drivers/regulator/max1586.c
··· 201 201 return 0; 202 202 } 203 203 204 - static const struct of_device_id max1586_of_match[] = { 204 + static const struct of_device_id __maybe_unused max1586_of_match[] = { 205 205 { .compatible = "maxim,max1586", }, 206 206 {}, 207 207 };
+1 -1
drivers/regulator/max77826-regulator.c
··· 274 274 return max77826_read_device_id(regmap, dev); 275 275 } 276 276 277 - static const struct of_device_id max77826_of_match[] = { 277 + static const struct of_device_id __maybe_unused max77826_of_match[] = { 278 278 { .compatible = "maxim,max77826" }, 279 279 { /* sentinel */ } 280 280 };
+1 -1
drivers/regulator/pwm-regulator.c
··· 390 390 return 0; 391 391 } 392 392 393 - static const struct of_device_id pwm_of_match[] = { 393 + static const struct of_device_id __maybe_unused pwm_of_match[] = { 394 394 { .compatible = "pwm-regulator" }, 395 395 { }, 396 396 };
+1 -1
drivers/regulator/qcom-rpmh-regulator.c
··· 967 967 return 0; 968 968 } 969 969 970 - static const struct of_device_id rpmh_regulator_match_table[] = { 970 + static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { 971 971 { 972 972 .compatible = "qcom,pm8005-rpmh-regulators", 973 973 .data = pm8005_vreg_data,
+1 -1
drivers/regulator/stm32-booster.c
··· 101 101 return 0; 102 102 } 103 103 104 - static const struct of_device_id stm32_booster_of_match[] = { 104 + static const struct of_device_id __maybe_unused stm32_booster_of_match[] = { 105 105 { 106 106 .compatible = "st,stm32h7-booster", 107 107 .data = (void *)&stm32h7_booster_desc
+1 -1
drivers/regulator/stm32-pwr.c
··· 166 166 return ret; 167 167 } 168 168 169 - static const struct of_device_id stm32_pwr_of_match[] = { 169 + static const struct of_device_id __maybe_unused stm32_pwr_of_match[] = { 170 170 { .compatible = "st,stm32mp1,pwr-reg", }, 171 171 {}, 172 172 };
+1 -1
drivers/regulator/stm32-vrefbuf.c
··· 284 284 NULL) 285 285 }; 286 286 287 - static const struct of_device_id stm32_vrefbuf_of_match[] = { 287 + static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = { 288 288 { .compatible = "st,stm32-vrefbuf", }, 289 289 {}, 290 290 };
+1 -1
drivers/regulator/sy8106a-regulator.c
··· 123 123 return 0; 124 124 } 125 125 126 - static const struct of_device_id sy8106a_i2c_of_match[] = { 126 + static const struct of_device_id __maybe_unused sy8106a_i2c_of_match[] = { 127 127 { .compatible = "silergy,sy8106a" }, 128 128 { }, 129 129 };
+1 -1
drivers/regulator/tps65023-regulator.c
··· 316 316 return 0; 317 317 } 318 318 319 - static const struct of_device_id tps65023_of_match[] = { 319 + static const struct of_device_id __maybe_unused tps65023_of_match[] = { 320 320 { .compatible = "ti,tps65020", .data = &tps65020_drv_data}, 321 321 { .compatible = "ti,tps65021", .data = &tps65021_drv_data}, 322 322 { .compatible = "ti,tps65023", .data = &tps65023_drv_data},