diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-09-29 09:53:16 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-02 12:05:30 -0700 |
commit | 8e4657c60c2bbb9918b33e226458cce3e5fa1d8c (patch) | |
tree | 7440b616850524fd0d038ef8667282aad90d7841 /drivers/usb | |
parent | 355c74e55e9992126ec5e568a3edb8e280fe040d (diff) | |
download | linux-stable-8e4657c60c2bbb9918b33e226458cce3e5fa1d8c.tar.gz linux-stable-8e4657c60c2bbb9918b33e226458cce3e5fa1d8c.tar.bz2 linux-stable-8e4657c60c2bbb9918b33e226458cce3e5fa1d8c.zip |
usb: typec: remove set but not used variables 'snk_ma, min_mv'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/usb/typec/tcpm/tcpm.c: In function 'tcpm_pd_select_pps_apdo':
drivers/usb/typec/tcpm/tcpm.c:2212:39: warning:
variable 'snk_ma' set but not used [-Wunused-but-set-variable]
drivers/usb/typec/tcpm/tcpm.c: In function 'tcpm_pd_build_pps_request':
drivers/usb/typec/tcpm/tcpm.c:2405:37: warning:
variable 'min_mv' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index c11b3befa87f..b06eac8ad70d 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -2209,7 +2209,7 @@ static unsigned int tcpm_pd_select_pps_apdo(struct tcpm_port *port) { unsigned int i, j, max_mw = 0, max_mv = 0; unsigned int min_src_mv, max_src_mv, src_ma, src_mw; - unsigned int min_snk_mv, max_snk_mv, snk_ma; + unsigned int min_snk_mv, max_snk_mv; u32 pdo; unsigned int src_pdo = 0, snk_pdo = 0; @@ -2253,8 +2253,6 @@ static unsigned int tcpm_pd_select_pps_apdo(struct tcpm_port *port) pdo_pps_apdo_min_voltage(pdo); max_snk_mv = pdo_pps_apdo_max_voltage(pdo); - snk_ma = - pdo_pps_apdo_max_current(pdo); break; default: tcpm_log(port, @@ -2402,7 +2400,7 @@ static int tcpm_pd_send_request(struct tcpm_port *port) static int tcpm_pd_build_pps_request(struct tcpm_port *port, u32 *rdo) { - unsigned int out_mv, op_ma, op_mw, min_mv, max_mv, max_ma, flags; + unsigned int out_mv, op_ma, op_mw, max_mv, max_ma, flags; enum pd_pdo_type type; unsigned int src_pdo_index; u32 pdo; @@ -2420,7 +2418,6 @@ static int tcpm_pd_build_pps_request(struct tcpm_port *port, u32 *rdo) tcpm_log(port, "Invalid APDO selected!"); return -EINVAL; } - min_mv = port->pps_data.min_volt; max_mv = port->pps_data.max_volt; max_ma = port->pps_data.max_curr; out_mv = port->pps_data.out_volt; |