diff mbox series

regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR

Message ID 20240830073511.1.Ib733229a8a19fad8179213c05e1af01b51e42328@changeid (mailing list archive)
State New, archived
Headers show
Series regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR | expand

Commit Message

Douglas Anderson Aug. 30, 2024, 2:35 p.m. UTC
When adding devm_regulator_bulk_get_const() I missed adding a stub for
when CONFIG_REGULATOR is not enabled. Under certain conditions (like
randconfig testing) this can cause the compiler to reports errors
like:

  error: implicit declaration of function 'devm_regulator_bulk_get_const';
  did you mean 'devm_regulator_bulk_get_enable'?

Add the stub.

Fixes: 1de452a0edda ("regulator: core: Allow drivers to define their init data as const")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408301813.TesFuSbh-lkp@intel.com/
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 include/linux/regulator/consumer.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Mark Brown Aug. 30, 2024, 5:14 p.m. UTC | #1
On Fri, 30 Aug 2024 07:35:12 -0700, Douglas Anderson wrote:
> When adding devm_regulator_bulk_get_const() I missed adding a stub for
> when CONFIG_REGULATOR is not enabled. Under certain conditions (like
> randconfig testing) this can cause the compiler to reports errors
> like:
> 
>   error: implicit declaration of function 'devm_regulator_bulk_get_const';
>   did you mean 'devm_regulator_bulk_get_enable'?
> 
> [...]

Applied to

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

Thanks!

[1/1] regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR
      commit: 1a5caec7f80ca2e659c03f45378ee26915f4eda2

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
diff mbox series

Patch

diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index d986ec13092e..b9ce521910a0 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -452,6 +452,14 @@  static inline int of_regulator_bulk_get_all(struct device *dev, struct device_no
 	return 0;
 }
 
+static inline int devm_regulator_bulk_get_const(
+	struct device *dev, int num_consumers,
+	const struct regulator_bulk_data *in_consumers,
+	struct regulator_bulk_data **out_consumers)
+{
+	return 0;
+}
+
 static inline int regulator_bulk_enable(int num_consumers,
 					struct regulator_bulk_data *consumers)
 {