Skip to contentSkip to conversation

power: supply: cpcap-charger: Make cpcap_charger_voltage_to_regval static

PATCH In review zhong jiang 2 participants 5 messages Oct 21, 2019 – Oct 29, 2019 Power supply

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: supply: cpcap-charger: Make cpcap_charger_voltage_to_regval static

The GCC complains the following case when compiling kernel.

drivers/power/supply/cpcap-charger.c:563:5: warning: symbol 'cpcap_charger_voltage_to_regval' was not declared. Should it be static?

---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/cpcap-charger.c +1 -1
index 40d96b8..c0d452e 100644
@@ -560,7 +560,7 @@ static void cpcap_charger_update_state(struct cpcap_charger_ddata *ddata,
 	dev_dbg(ddata->dev, "state: %s\n", status);
 }
 
-int cpcap_charger_voltage_to_regval(int voltage)
+static int cpcap_charger_voltage_to_regval(int voltage)
 {
 	int offset;
 
Signature · 1 line
1.7.12.4
#1 lore raw

Hi,

Quoted 6 lines · zhong jiang

The GCC complains the following case when compiling kernel.

drivers/power/supply/cpcap-charger.c:563:5: warning: symbol 'cpcap_charger_voltage_to_regval' was not declared. Should it be static?

---

Thanks, but Intel's kbuild test robot was faster than you:

https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git/commit/?h=for-next

-- Sebastian

#2 lore raw
In reply to zhong jiang

ping.

Quoted 22 lines · zhong jiang

The GCC complains the following case when compiling kernel.

drivers/power/supply/cpcap-charger.c:563:5: warning: symbol 'cpcap_charger_voltage_to_regval' was not declared. Should it be static?

---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/cpcap-charger.c +1 -1
index 40d96b8..c0d452e 100644
@@ -560,7 +560,7 @@ static void cpcap_charger_update_state(struct cpcap_charger_ddata *ddata,
 	dev_dbg(ddata->dev, "state: %s\n", status);
 }
 
-int cpcap_charger_voltage_to_regval(int voltage)
+static int cpcap_charger_voltage_to_regval(int voltage)
 {
 	int offset;
 
#3 lore raw

Hi,

https://lkml.org/lkml/2019/10/21/1018

That's e3da2ce04e12 to be specific.

-- Sebastian

Quoted 27 lines · zhong jiang

ping.

Quoted 22 lines · zhong jiang

The GCC complains the following case when compiling kernel.

drivers/power/supply/cpcap-charger.c:563:5: warning: symbol 'cpcap_charger_voltage_to_regval' was not declared. Should it be static?

---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/cpcap-charger.c +1 -1
index 40d96b8..c0d452e 100644
@@ -560,7 +560,7 @@ static void cpcap_charger_update_state(struct cpcap_charger_ddata *ddata,
 	dev_dbg(ddata->dev, "state: %s\n", status);
 }
 
-int cpcap_charger_voltage_to_regval(int voltage)
+static int cpcap_charger_voltage_to_regval(int voltage)
 {
 	int offset;
 
#4 lore raw

Sorry, I forget that.

Thanks,
zhogn jiang

Quoted 35 lines · Sebastian Reichel

Hi,

https://lkml.org/lkml/2019/10/21/1018

That's e3da2ce04e12 to be specific.

-- Sebastian

Quoted 26 lines · zhong jiang

ping.

Quoted 22 lines · zhong jiang

The GCC complains the following case when compiling kernel.

drivers/power/supply/cpcap-charger.c:563:5: warning: symbol 'cpcap_charger_voltage_to_regval' was not declared. Should it be static?

---
 drivers/power/supply/cpcap-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/cpcap-charger.c +1 -1
index 40d96b8..c0d452e 100644
@@ -560,7 +560,7 @@ static void cpcap_charger_update_state(struct cpcap_charger_ddata *ddata,
 	dev_dbg(ddata->dev, "state: %s\n", status);
 }
 
-int cpcap_charger_voltage_to_regval(int voltage)
+static int cpcap_charger_voltage_to_regval(int voltage)
 {
 	int offset;