* [PATCH -next] regulator: stm32-pwr: Make some symbols static
@ 2019-04-17 2:31 Wei Yongjun
2019-04-17 16:38 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2019-04-17 2:31 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Maxime Coquelin, Alexandre Torgue,
Pascal PAILLET-LME
Cc: Wei Yongjun, linux-kernel, linux-stm32, linux-arm-kernel,
kernel-janitors
Fixes the following sparse warnings:
drivers/regulator/stm32-pwr.c:35:5: warning:
symbol 'ready_mask_table' was not declared. Should it be static?
drivers/regulator/stm32-pwr.c:47:5: warning:
symbol 'stm32_pwr_reg_is_ready' was not declared. Should it be static?
drivers/regulator/stm32-pwr.c:57:5: warning:
symbol 'stm32_pwr_reg_is_enabled' was not declared. Should it be static?
Fixes: 6cdae8173f67 ("regulator: Add support for stm32 power regulators")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/regulator/stm32-pwr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c
index e434b26d4c8b..222d593d76a2 100644
--- a/drivers/regulator/stm32-pwr.c
+++ b/drivers/regulator/stm32-pwr.c
@@ -32,7 +32,7 @@ enum {
STM32PWR_REG_NUM_REGS
};
-u32 ready_mask_table[STM32PWR_REG_NUM_REGS] = {
+static u32 ready_mask_table[STM32PWR_REG_NUM_REGS] = {
[PWR_REG11] = REG_1_1_RDY,
[PWR_REG18] = REG_1_8_RDY,
[PWR_USB33] = USB_3_3_RDY,
@@ -44,7 +44,7 @@ struct stm32_pwr_reg {
u32 ready_mask;
};
-int stm32_pwr_reg_is_ready(struct regulator_dev *rdev)
+static int stm32_pwr_reg_is_ready(struct regulator_dev *rdev)
{
struct stm32_pwr_reg *priv = rdev_get_drvdata(rdev);
u32 val;
@@ -54,7 +54,7 @@ int stm32_pwr_reg_is_ready(struct regulator_dev *rdev)
return (val & priv->ready_mask);
}
-int stm32_pwr_reg_is_enabled(struct regulator_dev *rdev)
+static int stm32_pwr_reg_is_enabled(struct regulator_dev *rdev)
{
struct stm32_pwr_reg *priv = rdev_get_drvdata(rdev);
u32 val;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] regulator: stm32-pwr: Make some symbols static
2019-04-17 2:31 [PATCH -next] regulator: stm32-pwr: Make some symbols static Wei Yongjun
@ 2019-04-17 16:38 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2019-04-17 16:38 UTC (permalink / raw)
To: Wei Yongjun
Cc: Liam Girdwood, Maxime Coquelin, Alexandre Torgue,
Pascal PAILLET-LME, linux-kernel, linux-stm32, linux-arm-kernel,
kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
On Wed, Apr 17, 2019 at 02:31:12AM +0000, Wei Yongjun wrote:
> Fixes the following sparse warnings:
>
> drivers/regulator/stm32-pwr.c:35:5: warning:
> symbol 'ready_mask_table' was not declared. Should it be static?
> drivers/regulator/stm32-pwr.c:47:5: warning:
> symbol 'stm32_pwr_reg_is_ready' was not declared. Should it be static?
> drivers/regulator/stm32-pwr.c:57:5: warning:
> symbol 'stm32_pwr_reg_is_enabled' was not declared. Should it be static?
Someone already sent a patch for this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-17 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 2:31 [PATCH -next] regulator: stm32-pwr: Make some symbols static Wei Yongjun
2019-04-17 16:38 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).