diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-09-30 16:53:08 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-01 23:33:01 +0000 |
commit | 90bbe7d16a96041dc7ddb4ababeaf6b079c3d5b7 (patch) | |
tree | 4b59760a1dc05515e56a51d43698cb0f140653ab | |
parent | 506dcb5e5b2aa1d4864a98972540ad95396ef372 (diff) | |
download | chrome-ec-90bbe7d16a96041dc7ddb4ababeaf6b079c3d5b7.tar.gz |
driver/charger: Remove unused functions
When building with clang it warns:
driver/charger/isl923x.c:116:34: error: unused function 'raw_read8'
[-Werror,-Wunused-function]
static inline enum ec_error_list raw_read8(int chgnum, int offset,
int *value)
driver/charger/isl923x.c:137:34: error: unused function 'raw_update16'
[-Werror,-Wunused-function]
static inline enum ec_error_list raw_update16(int chgnum, int offset,
int mask,
raw_update16 is only used in some configurations; remove ifdefs from
callers. raw_read8 is not used at all, so it is removed.
BRANCH=none
BUG=b:172020503
TEST=make CC=arm-none-eabi-clang BOARD=elm -j
TEST=make buildall -j
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Iaabdc5f4dfe8d6ad8a8ee5d157f284fff1ed676d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3197752
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | driver/charger/isl923x.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c index b530629aab..7603350a84 100644 --- a/driver/charger/isl923x.c +++ b/driver/charger/isl923x.c @@ -113,13 +113,6 @@ static const struct charger_info isl9237_charger_info = { .input_current_step = AC_REG_TO_CURRENT(INPUT_I_STEP), }; -static inline enum ec_error_list raw_read8(int chgnum, int offset, int *value) -{ - return i2c_read8(chg_chips[chgnum].i2c_port, - chg_chips[chgnum].i2c_addr_flags, - offset, value); -} - static inline enum ec_error_list raw_read16(int chgnum, int offset, int *value) { return i2c_read16(chg_chips[chgnum].i2c_port, @@ -796,7 +789,6 @@ out: return rv; } -#ifdef CONFIG_CHARGER_RAA489000 enum ec_error_list raa489000_is_acok(int chgnum, bool *acok) { int regval, rv; @@ -916,9 +908,7 @@ void raa489000_hibernate(int chgnum, bool disable_adc) cflush(); } -#endif /* CONFIG_CHARGER_RAA489000 */ -#ifdef CONFIG_CHARGER_ISL9238C enum ec_error_list isl9238c_hibernate(int chgnum) { /* Disable IMON */ @@ -958,7 +948,6 @@ enum ec_error_list isl9238c_resume(int chgnum) return EC_SUCCESS; } -#endif /* CONFIG_CHARGER_ISL9238C */ /*****************************************************************************/ |