From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Lee Jones <lee.jones@linaro.org>,
linux-power@fi.rohmeurope.com, linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: rohm-generic: remove unused dummies
Date: Wed, 24 Nov 2021 07:57:49 +0200 [thread overview]
Message-ID: <YZ3UXXrk/Efe7Scj@fedora> (raw)
[-- 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 --]
next reply other threads:[~2021-11-24 5:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 5:57 Matti Vaittinen [this message]
2021-11-24 17:36 ` [PATCH] regulator: rohm-generic: remove unused dummies Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YZ3UXXrk/Efe7Scj@fedora \
--to=matti.vaittinen@fi.rohmeurope.com \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-power@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox