After removing all uses of the range operations in a recent patch,
we get a warning about the symbol not being referenced anywhere:
drivers/regulator/rk808-regulator.c:306:29: 'rk808_reg_ops_ranges' defined but not used
This removes the now-unused structure along with the
rk808_set_suspend_voltage_range function that is only referenced from
rk808_reg_ops_ranges.
Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: afcd666d9db0 ("regulator: rk808: remove linear range definitions with a single range")
---
drivers/regulator/rk808-regulator.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c
index 964b95eed271..67f72feed815 100644
--- a/drivers/regulator/rk808-regulator.c
+++ b/drivers/regulator/rk808-regulator.c
@@ -238,21 +238,6 @@ static int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
sel);
}
-static int rk808_set_suspend_voltage_range(struct regulator_dev *rdev, int uv)
-{
- unsigned int reg;
- int sel = regulator_map_voltage_linear_range(rdev, uv, uv);
-
- if (sel < 0)
- return -EINVAL;
-
- reg = rdev->desc->vsel_reg + RK808_SLP_REG_OFFSET;
-
- return regmap_update_bits(rdev->regmap, reg,
- rdev->desc->vsel_mask,
- sel);
-}
-
static int rk808_set_suspend_enable(struct regulator_dev *rdev)
{
unsigned int reg;
@@ -303,19 +288,6 @@ static struct regulator_ops rk808_reg_ops = {
.set_suspend_disable = rk808_set_suspend_disable,
};
-static struct regulator_ops rk808_reg_ops_ranges = {
- .list_voltage = regulator_list_voltage_linear_range,
- .map_voltage = regulator_map_voltage_linear_range,
- .get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_sel = regulator_set_voltage_sel_regmap,
- .enable = regulator_enable_regmap,
- .disable = regulator_disable_regmap,
- .is_enabled = regulator_is_enabled_regmap,
- .set_suspend_voltage = rk808_set_suspend_voltage_range,
- .set_suspend_enable = rk808_set_suspend_enable,
- .set_suspend_disable = rk808_set_suspend_disable,
-};
-
static struct regulator_ops rk808_switch_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
--
2.7.0
Sorry for that.
I missed to add rk808_reg_ops_ranges in the LDO_REG3 desc
in patch afcd666d9db0
On 26.04.2016 11:19, Arnd Bergmann wrote:
> After removing all uses of the range operations in a recent patch,
> we get a warning about the symbol not being referenced anywhere:
>
> drivers/regulator/rk808-regulator.c:306:29: 'rk808_reg_ops_ranges' defined but not used
>
> This removes the now-unused structure along with the
> rk808_set_suspend_voltage_range function that is only referenced from
> rk808_reg_ops_ranges.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Fixes: afcd666d9db0 ("regulator: rk808: remove linear range definitions with a single range")
> ---
> drivers/regulator/rk808-regulator.c | 28 ----------------------------
> 1 file changed, 28 deletions(-)
>
> diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c
> index 964b95eed271..67f72feed815 100644
> --- a/drivers/regulator/rk808-regulator.c
> +++ b/drivers/regulator/rk808-regulator.c
> @@ -238,21 +238,6 @@ static int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
> sel);
> }
>
> -static int rk808_set_suspend_voltage_range(struct regulator_dev *rdev, int uv)
> -{
> - unsigned int reg;
> - int sel = regulator_map_voltage_linear_range(rdev, uv, uv);
> -
> - if (sel < 0)
> - return -EINVAL;
> -
> - reg = rdev->desc->vsel_reg + RK808_SLP_REG_OFFSET;
> -
> - return regmap_update_bits(rdev->regmap, reg,
> - rdev->desc->vsel_mask,
> - sel);
> -}
> -
> static int rk808_set_suspend_enable(struct regulator_dev *rdev)
> {
> unsigned int reg;
> @@ -303,19 +288,6 @@ static struct regulator_ops rk808_reg_ops = {
> .set_suspend_disable = rk808_set_suspend_disable,
> };
>
> -static struct regulator_ops rk808_reg_ops_ranges = {
> - .list_voltage = regulator_list_voltage_linear_range,
> - .map_voltage = regulator_map_voltage_linear_range,
> - .get_voltage_sel = regulator_get_voltage_sel_regmap,
> - .set_voltage_sel = regulator_set_voltage_sel_regmap,
> - .enable = regulator_enable_regmap,
> - .disable = regulator_disable_regmap,
> - .is_enabled = regulator_is_enabled_regmap,
> - .set_suspend_voltage = rk808_set_suspend_voltage_range,
> - .set_suspend_enable = rk808_set_suspend_enable,
> - .set_suspend_disable = rk808_set_suspend_disable,
> -};
> -
> static struct regulator_ops rk808_switch_ops = {
> .enable = regulator_enable_regmap,
> .disable = regulator_disable_regmap,
The patch
regulator: rk808: remove unused rk808_reg_ops_ranges
has been applied to the regulator tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 4a5ed8c1adc39f86a2887183c71b007bc962fdce Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Tue, 26 Apr 2016 11:19:26 +0200
Subject: [PATCH] regulator: rk808: remove unused rk808_reg_ops_ranges
After removing all uses of the range operations in a recent patch,
we get a warning about the symbol not being referenced anywhere:
drivers/regulator/rk808-regulator.c:306:29: 'rk808_reg_ops_ranges' defined but not used
This removes the now-unused structure along with the
rk808_set_suspend_voltage_range function that is only referenced from
rk808_reg_ops_ranges.
Fixes: afcd666d9db0 ("regulator: rk808: remove linear range definitions with a single range")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
---
drivers/regulator/rk808-regulator.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c
index 964b95eed271..67f72feed815 100644
--- a/drivers/regulator/rk808-regulator.c
+++ b/drivers/regulator/rk808-regulator.c
@@ -238,21 +238,6 @@ static int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
sel);
}
-static int rk808_set_suspend_voltage_range(struct regulator_dev *rdev, int uv)
-{
- unsigned int reg;
- int sel = regulator_map_voltage_linear_range(rdev, uv, uv);
-
- if (sel < 0)
- return -EINVAL;
-
- reg = rdev->desc->vsel_reg + RK808_SLP_REG_OFFSET;
-
- return regmap_update_bits(rdev->regmap, reg,
- rdev->desc->vsel_mask,
- sel);
-}
-
static int rk808_set_suspend_enable(struct regulator_dev *rdev)
{
unsigned int reg;
@@ -303,19 +288,6 @@ static struct regulator_ops rk808_reg_ops = {
.set_suspend_disable = rk808_set_suspend_disable,
};
-static struct regulator_ops rk808_reg_ops_ranges = {
- .list_voltage = regulator_list_voltage_linear_range,
- .map_voltage = regulator_map_voltage_linear_range,
- .get_voltage_sel = regulator_get_voltage_sel_regmap,
- .set_voltage_sel = regulator_set_voltage_sel_regmap,
- .enable = regulator_enable_regmap,
- .disable = regulator_disable_regmap,
- .is_enabled = regulator_is_enabled_regmap,
- .set_suspend_voltage = rk808_set_suspend_voltage_range,
- .set_suspend_enable = rk808_set_suspend_enable,
- .set_suspend_disable = rk808_set_suspend_disable,
-};
-
static struct regulator_ops rk808_switch_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
--
2.8.0.rc3
On Tuesday 26 April 2016 11:26:44 Mark Brown wrote:
> The patch
>
> regulator: rk808: remove unused rk808_reg_ops_ranges
>
> has been applied to the regulator tree at
>
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
As Wadim Egorov just said a few minutes earlier, my patch was apparently
not the correct fix for his mistake. This means he will now have to
submit another fix on top of mine, right?
Arnd
On Tue, Apr 26, 2016 at 12:38:43PM +0200, Arnd Bergmann wrote:
> As Wadim Egorov just said a few minutes earlier, my patch was apparently
> not the correct fix for his mistake. This means he will now have to
> submit another fix on top of mine, right?
Yes, he will have to re-add the removed variable if the user is added
but for now we don't get the warning.