2014-07-20 05:32:00

by weiyj_lk

[permalink] [raw]
Subject: [PATCH -next] power_supply: Fix sparse non static symbol warning

From: Wei Yongjun <[email protected]>

Fixes the following sparse warnings:

drivers/power/power_supply_core.c:540:5: warning:
symbol '__power_supply_register' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/power/power_supply_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 5a5a24e..078afd6 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -537,7 +537,8 @@ static void psy_unregister_cooler(struct power_supply *psy)
}
#endif

-int __power_supply_register(struct device *parent, struct power_supply *psy, bool ws)
+static int __power_supply_register(struct device *parent,
+ struct power_supply *psy, bool ws)
{
struct device *dev;
int rc;


2014-07-20 07:30:39

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH -next] power_supply: Fix sparse non static symbol warning

Hi,

On Sun, Jul 20, 2014 at 01:31:09PM +0800, [email protected] wrote:
> Fixes the following sparse warnings:
>
> drivers/power/power_supply_core.c:540:5: warning:
> symbol '__power_supply_register' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <[email protected]>

Applied to battery-2.6.git:

http://git.infradead.org/battery-2.6.git/commit/c128d39737fbf23d978eb05a9c7915507a69c1df

-- Sebastian


Attachments:
(No filename) (437.00 B)
signature.asc (819.00 B)
Digital signature
Download all attachments