* [PATCH] regulator: max77857: mark more functions static
@ 2023-07-18 19:39 Arnd Bergmann
2023-07-19 16:17 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-07-18 19:39 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Okan Sahin; +Cc: Arnd Bergmann, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
A few functions in the new driver are global but only used in this file:
drivers/regulator/max77857-regulator.c:209:5: error: no previous prototype for 'max77859_get_voltage_sel' [-Werror=missing-prototypes]
drivers/regulator/max77857-regulator.c:221:5: error: no previous prototype for 'max77859_set_current_limit' [-Werror=missing-prototypes]
drivers/regulator/max77857-regulator.c:235:5: error: no previous prototype for 'max77859_get_current_limit' [-Werror=missing-prototypes]
Mark them static, which produces potentially better code and avoids the warning.
Fixes: af71cccadeced ("regulator: max77857: Add ADI MAX77857/59/MAX77831 Regulator Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/regulator/max77857-regulator.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/max77857-regulator.c b/drivers/regulator/max77857-regulator.c
index c5482ffd606ec..e1150a9a11f26 100644
--- a/drivers/regulator/max77857-regulator.c
+++ b/drivers/regulator/max77857-regulator.c
@@ -206,7 +206,7 @@ static int max77859_set_voltage_sel(struct regulator_dev *rdev,
MAX77859_CONT3_DVS_START);
}
-int max77859_get_voltage_sel(struct regulator_dev *rdev)
+static int max77859_get_voltage_sel(struct regulator_dev *rdev)
{
__be16 reg;
int ret;
@@ -218,7 +218,7 @@ int max77859_get_voltage_sel(struct regulator_dev *rdev)
return FIELD_GET(MAX77859_VOLTAGE_SEL_MASK, __be16_to_cpu(reg));
}
-int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_uA)
+static int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_uA)
{
u32 selector;
@@ -232,7 +232,7 @@ int max77859_set_current_limit(struct regulator_dev *rdev, int min_uA, int max_u
return regmap_write(rdev->regmap, MAX77859_REG_CONT5, selector);
}
-int max77859_get_current_limit(struct regulator_dev *rdev)
+static int max77859_get_current_limit(struct regulator_dev *rdev)
{
u32 selector;
int ret;
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: max77857: mark more functions static
2023-07-18 19:39 [PATCH] regulator: max77857: mark more functions static Arnd Bergmann
@ 2023-07-19 16:17 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-07-19 16:17 UTC (permalink / raw)
To: Liam Girdwood, Okan Sahin, Arnd Bergmann; +Cc: Arnd Bergmann, linux-kernel
On Tue, 18 Jul 2023 21:39:31 +0200, Arnd Bergmann wrote:
> A few functions in the new driver are global but only used in this file:
>
> drivers/regulator/max77857-regulator.c:209:5: error: no previous prototype for 'max77859_get_voltage_sel' [-Werror=missing-prototypes]
> drivers/regulator/max77857-regulator.c:221:5: error: no previous prototype for 'max77859_set_current_limit' [-Werror=missing-prototypes]
> drivers/regulator/max77857-regulator.c:235:5: error: no previous prototype for 'max77859_get_current_limit' [-Werror=missing-prototypes]
>
> Mark them static, which produces potentially better code and avoids the warning.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: max77857: mark more functions static
commit: 541e75954cadde0355ce7bebed5675625b2943a8
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:[~2023-07-19 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-18 19:39 [PATCH] regulator: max77857: mark more functions static Arnd Bergmann
2023-07-19 16:17 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome