All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: rohm-generic: remove unused dummies
@ 2021-11-24  5:57 Matti Vaittinen
  2021-11-24 17:36 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Matti Vaittinen @ 2021-11-24  5:57 UTC (permalink / raw)
  To: Matti Vaittinen, Matti Vaittinen
  Cc: Mark Brown, Matti Vaittinen, Lee Jones, linux-power, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]

Function rohm_regulator_set_voltage_sel_restricted() and
rohm_regulator_set_dvs_levels() had inlined dummy implementations for
cases when the real implementation was not configured in.

All of the drivers who issue the call to these functions do SELECT the
real implementation from the Kconfig. There should be no cases where the
real implementation was not selected by the drivers using these
functions - such a situation is likely to be an error which deserves to be
noticed at compile-time.

These dummies could in theory be used for compile-testing the drivers
only (without the generic rohm regulator pieces). However, for such
compile testing we should manually drop the selection from KConfig - and
I guess that if it does not work out-of-the-box, then it is not going to
happen. Especially when there should be no reason to omit
compile-testing the generic rohm_regulator part.

Crash test dummies.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

---

This patch is a result of me breaking the build with the dummy-function
which I forgot to inline. When fixing it I noticed these dummies should
actually not be there. As a result Mark asked me to send a follow-up
patch removing the one I added - and I decided to do double the work and
remove two of them :) Anyways, I'd suggest this to go via Mark's tree
even if the header resides in a file which may be regarded as MFD
territory.

Reference to previous discussion:
https://lore.kernel.org/lkml/YZz4FkRoiVIbfgEf@sirena.org.uk/
---
 include/linux/mfd/rohm-generic.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/include/linux/mfd/rohm-generic.h b/include/linux/mfd/rohm-generic.h
index 080d60adcd5f..5ed97a1d0908 100644
--- a/include/linux/mfd/rohm-generic.h
+++ b/include/linux/mfd/rohm-generic.h
@@ -82,20 +82,6 @@ int rohm_regulator_set_dvs_levels(const struct rohm_dvs_config *dvs,
 
 int rohm_regulator_set_voltage_sel_restricted(struct regulator_dev *rdev,
 					      unsigned int sel);
-#else
-static inline int rohm_regulator_set_dvs_levels(const struct rohm_dvs_config *dvs,
-						struct device_node *np,
-						const struct regulator_desc *desc,
-						struct regmap *regmap)
-{
-	return 0;
-}
-
-static inline int rohm_regulator_set_voltage_sel_restricted(struct regulator_dev *rdev,
-						     unsigned int sel)
-{
-	return 0;
-}
 #endif
 
 #endif
-- 
2.31.1


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

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

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

* Re: [PATCH] regulator: rohm-generic: remove unused dummies
  2021-11-24  5:57 [PATCH] regulator: rohm-generic: remove unused dummies Matti Vaittinen
@ 2021-11-24 17:36 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-11-24 17:36 UTC (permalink / raw)
  To: Matti Vaittinen, Matti Vaittinen; +Cc: Lee Jones, linux-kernel, linux-power

On Wed, 24 Nov 2021 07:57:49 +0200, Matti Vaittinen wrote:
> Function rohm_regulator_set_voltage_sel_restricted() and
> rohm_regulator_set_dvs_levels() had inlined dummy implementations for
> cases when the real implementation was not configured in.
> 
> All of the drivers who issue the call to these functions do SELECT the
> real implementation from the Kconfig. There should be no cases where the
> real implementation was not selected by the drivers using these
> functions - such a situation is likely to be an error which deserves to be
> noticed at compile-time.
> 
> [...]

Applied to

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

Thanks!

[1/1] regulator: rohm-generic: remove unused dummies
      commit: 432dd1fc134ef902b049b26839edfd3fdc1f8dc0

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

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

end of thread, other threads:[~2021-11-24 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  5:57 [PATCH] regulator: rohm-generic: remove unused dummies Matti Vaittinen
2021-11-24 17:36 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.