linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] regulator/tps*: Constify static regulator ops
@ 2020-08-29 22:10 Rikard Falkeborn
  2020-08-29 22:11 ` [PATCH 8/8] regulator: tps65910: Constify static regulator_ops Rikard Falkeborn
  2020-09-01 14:50 ` [PATCH 0/8] regulator/tps*: Constify static regulator ops Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Rikard Falkeborn @ 2020-08-29 22:10 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, linux-kernel, Rikard Falkeborn, Tony Lindgren, linux-omap

Constify static instances of struct regulator_ops to allow the compiler
to put them in read-only memory. Patches are independent. Compile-tested
only.

Rikard Falkeborn (8):
  regulator: tps51632: Constify tps51632_dcdc_ops
  regulator: tps6105x: Constify tps6105x_regulator_ops
  regulator: tps62360: Constify tps62360_dcdc_ops
  regulator: tps65086: Constify static regulator_ops
  regulator: tps65090: constify static regulator_ops
  regulator: tps6586x: Constify static regulator_ops
  regulator: tps65912: Constify static regulator_ops
  regulator: tps65910: Constify static regulator_ops

 drivers/regulator/tps51632-regulator.c |  2 +-
 drivers/regulator/tps6105x-regulator.c |  2 +-
 drivers/regulator/tps62360-regulator.c |  2 +-
 drivers/regulator/tps65086-regulator.c |  4 ++--
 drivers/regulator/tps65090-regulator.c |  8 ++++----
 drivers/regulator/tps6586x-regulator.c |  8 ++++----
 drivers/regulator/tps65910-regulator.c | 10 +++++-----
 drivers/regulator/tps65912-regulator.c |  4 ++--
 8 files changed, 20 insertions(+), 20 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 8/8] regulator: tps65910: Constify static regulator_ops
  2020-08-29 22:10 [PATCH 0/8] regulator/tps*: Constify static regulator ops Rikard Falkeborn
@ 2020-08-29 22:11 ` Rikard Falkeborn
  2020-09-01 14:50 ` [PATCH 0/8] regulator/tps*: Constify static regulator ops Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Rikard Falkeborn @ 2020-08-29 22:11 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, linux-kernel, Rikard Falkeborn, Tony Lindgren, linux-omap

The only usage of these is to assign their address to the ops field in
the regulator_desc struct, which is a const pointer. Make them const to
allow the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/regulator/tps65910-regulator.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 4eb5b19d2344..faa5b3538167 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -757,7 +757,7 @@ static int tps65911_list_voltage(struct regulator_dev *dev, unsigned selector)
 }
 
 /* Regulator ops (except VRTC) */
-static struct regulator_ops tps65910_ops_dcdc = {
+static const struct regulator_ops tps65910_ops_dcdc = {
 	.is_enabled		= regulator_is_enabled_regmap,
 	.enable			= regulator_enable_regmap,
 	.disable		= regulator_disable_regmap,
@@ -770,7 +770,7 @@ static struct regulator_ops tps65910_ops_dcdc = {
 	.map_voltage		= regulator_map_voltage_ascend,
 };
 
-static struct regulator_ops tps65910_ops_vdd3 = {
+static const struct regulator_ops tps65910_ops_vdd3 = {
 	.is_enabled		= regulator_is_enabled_regmap,
 	.enable			= regulator_enable_regmap,
 	.disable		= regulator_disable_regmap,
@@ -781,7 +781,7 @@ static struct regulator_ops tps65910_ops_vdd3 = {
 	.map_voltage		= regulator_map_voltage_ascend,
 };
 
-static struct regulator_ops tps65910_ops_vbb = {
+static const struct regulator_ops tps65910_ops_vbb = {
 	.is_enabled		= regulator_is_enabled_regmap,
 	.enable			= regulator_enable_regmap,
 	.disable		= regulator_disable_regmap,
@@ -793,7 +793,7 @@ static struct regulator_ops tps65910_ops_vbb = {
 	.map_voltage		= regulator_map_voltage_iterate,
 };
 
-static struct regulator_ops tps65910_ops = {
+static const struct regulator_ops tps65910_ops = {
 	.is_enabled		= regulator_is_enabled_regmap,
 	.enable			= regulator_enable_regmap,
 	.disable		= regulator_disable_regmap,
@@ -805,7 +805,7 @@ static struct regulator_ops tps65910_ops = {
 	.map_voltage		= regulator_map_voltage_ascend,
 };
 
-static struct regulator_ops tps65911_ops = {
+static const struct regulator_ops tps65911_ops = {
 	.is_enabled		= regulator_is_enabled_regmap,
 	.enable			= regulator_enable_regmap,
 	.disable		= regulator_disable_regmap,
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 0/8] regulator/tps*: Constify static regulator ops
  2020-08-29 22:10 [PATCH 0/8] regulator/tps*: Constify static regulator ops Rikard Falkeborn
  2020-08-29 22:11 ` [PATCH 8/8] regulator: tps65910: Constify static regulator_ops Rikard Falkeborn
@ 2020-09-01 14:50 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-09-01 14:50 UTC (permalink / raw)
  To: Rikard Falkeborn; +Cc: Tony Lindgren, linux-kernel, linux-omap, Liam Girdwood

On Sun, 30 Aug 2020 00:10:56 +0200, Rikard Falkeborn wrote:
> Constify static instances of struct regulator_ops to allow the compiler
> to put them in read-only memory. Patches are independent. Compile-tested
> only.
> 
> Rikard Falkeborn (8):
>   regulator: tps51632: Constify tps51632_dcdc_ops
>   regulator: tps6105x: Constify tps6105x_regulator_ops
>   regulator: tps62360: Constify tps62360_dcdc_ops
>   regulator: tps65086: Constify static regulator_ops
>   regulator: tps65090: constify static regulator_ops
>   regulator: tps6586x: Constify static regulator_ops
>   regulator: tps65912: Constify static regulator_ops
>   regulator: tps65910: Constify static regulator_ops
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/8] regulator: tps51632: Constify tps51632_dcdc_ops
      commit: dcb97c10f967c2cfea4c6316f026bc4a4a165f1e
[2/8] regulator: tps6105x: Constify tps6105x_regulator_ops
      commit: 55c81934e7040c1e0c26b72ee752203ccf190b51
[3/8] regulator: tps62360: Constify tps62360_dcdc_ops
      commit: 01167e88e9372f9748e94a7322b0d43ccb980d9f
[4/8] regulator: tps65086: Constify static regulator_ops
      commit: 2e6d9db83ac7c65b986d3037620dc735dee7383f
[5/8] regulator: tps65090: constify static regulator_ops
      commit: 7d844ac3b5a8a97ae4a05d9f545346a4fca77cea
[6/8] regulator: tps6586x: Constify static regulator_ops
      commit: 25c8044502ca9fb684fe7a0612985069e27e01eb
[7/8] regulator: tps65912: Constify static regulator_ops
      commit: e92b8ef87a8a4a95056d6b5852bd4b5288f34540
[8/8] regulator: tps65910: Constify static regulator_ops
      commit: 385d41d7edbc37d6b30197672b744021ce3baccf

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-01 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 22:10 [PATCH 0/8] regulator/tps*: Constify static regulator ops Rikard Falkeborn
2020-08-29 22:11 ` [PATCH 8/8] regulator: tps65910: Constify static regulator_ops Rikard Falkeborn
2020-09-01 14:50 ` [PATCH 0/8] regulator/tps*: Constify static regulator ops Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).