power: supply: cpcap-charger: cpcap_charger_voltage_to_regval() can be static
authorkbuild test robot <lkp@intel.com>
Sun, 20 Oct 2019 22:20:52 +0000 (06:20 +0800)
committerSebastian Reichel <sre@kernel.org>
Mon, 21 Oct 2019 08:43:41 +0000 (10:43 +0200)
Add 'static' keyword to internal function as reported by sparse
using the following configuration:

make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

Fixes: d4ee021c410f ("power: supply: cpcap-charger: Limit voltage to 4.2V for battery")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cpcap-charger.c

index 40d96b8c00a818fdb197045b29a98e1b4efb8027..c0d452e3dc8b06cd7abc62b118f63b78bd408888 100644 (file)
@@ -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;