linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] regulator: Make symbols static
@ 2019-04-16 14:41 Yue Haibing
  2019-04-19 16:12 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Yue Haibing @ 2019-04-16 14:41 UTC (permalink / raw)
  To: lgirdwood, broonie, mcoquelin.stm32, alexandre.torgue
  Cc: linux-kernel, linux-stm32, linux-arm-kernel, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

Fix 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?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@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 e434b26..222d593 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;
-- 
2.7.4



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

* Re: [PATCH -next] regulator: Make symbols static
  2019-04-16 14:41 [PATCH -next] regulator: Make symbols static Yue Haibing
@ 2019-04-19 16:12 ` Mark Brown
  2019-04-20  3:13   ` YueHaibing
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2019-04-19 16:12 UTC (permalink / raw)
  To: Yue Haibing
  Cc: lgirdwood, mcoquelin.stm32, alexandre.torgue, linux-kernel,
	linux-stm32, linux-arm-kernel

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

On Tue, Apr 16, 2019 at 10:41:09PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fix 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?

This doesn't apply against current code, please check and resend (I
think it's just that someone else made similar fixes already but didn't
check properly).

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

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

* Re: [PATCH -next] regulator: Make symbols static
  2019-04-19 16:12 ` Mark Brown
@ 2019-04-20  3:13   ` YueHaibing
  0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2019-04-20  3:13 UTC (permalink / raw)
  To: Mark Brown
  Cc: lgirdwood, mcoquelin.stm32, alexandre.torgue, linux-kernel,
	linux-stm32, linux-arm-kernel

On 2019/4/20 0:12, Mark Brown wrote:
> On Tue, Apr 16, 2019 at 10:41:09PM +0800, Yue Haibing wrote:
>> From: YueHaibing <yuehaibing@huawei.com>
>>
>> Fix 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?
> 
> This doesn't apply against current code, please check and resend (I
> think it's just that someone else made similar fixes already but didn't
> check properly).

Yep, there is already a fix from kbuild test robot:

82f26185a912 ("regulator: ready_mask_table[] can be static")

> 


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

end of thread, other threads:[~2019-04-20  3:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 14:41 [PATCH -next] regulator: Make symbols static Yue Haibing
2019-04-19 16:12 ` Mark Brown
2019-04-20  3:13   ` YueHaibing

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).