diff options
| author | Mahesh Sivasubramanian <msivasub@codeaurora.org> | 2016-02-01 17:10:05 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:07:23 -0700 |
| commit | 7e976bc2a6d09e956580e4ac8a9deadfd520974c (patch) | |
| tree | 72e77e81ef1c1c4da5b04a5c8cb27d42ff7035db /drivers/regulator | |
| parent | b3445ac6ea92f4751ba5f5671aa2c3fce6b6e55b (diff) | |
regulator: Fix miscellaneous warnings in regulator driver
Fix compiler warnings in regulator code
Change-Id: I8670b5a9591727a8215c6bc56fcdb70e473dd9d8
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Diffstat (limited to 'drivers/regulator')
| -rw-r--r-- | drivers/regulator/cpr3-hmss-regulator.c | 2 | ||||
| -rw-r--r-- | drivers/regulator/cpr3-regulator.c | 5 | ||||
| -rw-r--r-- | drivers/regulator/kryo-regulator.c | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/regulator/cpr3-hmss-regulator.c b/drivers/regulator/cpr3-hmss-regulator.c index 8c8761576bbc..f907a71d4a95 100644 --- a/drivers/regulator/cpr3-hmss-regulator.c +++ b/drivers/regulator/cpr3-hmss-regulator.c @@ -1421,7 +1421,7 @@ static int cpr3_hmss_init_aging(struct cpr3_controller *ctrl) } } - if (!ctrl->aging_required || !fuse) + if (!ctrl->aging_required || !fuse || !vreg) return 0; rc = cpr3_parse_array_property(vreg, "qcom,cpr-aging-ro-scaling-factor", diff --git a/drivers/regulator/cpr3-regulator.c b/drivers/regulator/cpr3-regulator.c index d5c8a782a569..88ddf939d08c 100644 --- a/drivers/regulator/cpr3-regulator.c +++ b/drivers/regulator/cpr3-regulator.c @@ -2127,7 +2127,7 @@ static int cpr3_regulator_measure_aging(struct cpr3_controller *ctrl, u32 mask, reg, result, quot_min, quot_max, sel_min, sel_max; u32 quot_min_scaled, quot_max_scaled; u32 gcnt, gcnt_ref, gcnt0_restore, gcnt1_restore, irq_restore; - u32 cont_dly_restore, up_down_dly_restore; + u32 cont_dly_restore, up_down_dly_restore = 0; int quot_delta, quot_delta_scaled, quot_delta_scaled_sum; int *quot_delta_results; int rc, i, aging_measurement_count, filtered_count; @@ -2438,7 +2438,7 @@ static int cpr3_regulator_aging_adjust(struct cpr3_controller *ctrl) struct cpr3_corner *corner; int *restore_current_corner; bool *restore_vreg_enabled; - int i, j, id, rc, rc2, vreg_count, aging_volt, max_aging_volt; + int i, j, id, rc, rc2, vreg_count, aging_volt, max_aging_volt = 0; u32 reg; if (!ctrl->aging_required || !ctrl->cpr_enabled @@ -2521,7 +2521,6 @@ static int cpr3_regulator_aging_adjust(struct cpr3_controller *ctrl) } /* Perform aging measurement on all aging sensors */ - max_aging_volt = 0; for (i = 0; i < ctrl->aging_sensor_count; i++) { for (j = 0; j < CPR3_AGING_RETRY_COUNT; j++) { rc = cpr3_regulator_measure_aging(ctrl, diff --git a/drivers/regulator/kryo-regulator.c b/drivers/regulator/kryo-regulator.c index dea71b975f3e..0d0b2702b3d4 100644 --- a/drivers/regulator/kryo-regulator.c +++ b/drivers/regulator/kryo-regulator.c @@ -811,7 +811,7 @@ static int kryo_regulator_retention_init(struct kryo_regulator *kvreg, struct device *dev = &pdev->dev; struct regulator_init_data *init_data; struct regulator_config reg_config = {}; - int rc; + int rc = 0; init_data = of_get_regulator_init_data(dev, ret_node, &kvreg->retention_desc); |
