mbox series

[v2,0/3] soc: mediatek: pwrap: Constify some data and other improvements

Message ID cover.1720331018.git.christophe.jaillet@wanadoo.fr (mailing list archive)
Headers show
Series soc: mediatek: pwrap: Constify some data and other improvements | expand

Message

Christophe JAILLET July 7, 2024, 5:47 a.m. UTC
This series is motivated by patch 1. The 2 other patches are some
additionnal goodies spotted while looking at the code.

Patch 1 constifies struct pmic_wrapper_type to move some data to a
read-only section, in order to increase safety.

Patch 2 does the same for some int arrays. This helps move about 7 ko of
data to a read-only section. Not that bad!

Patch 3 simplifies code related to clk management. It also fixes an
issue if the driver is unloaded.

Christophe JAILLET (3):
  soc: mediatek: pwrap: Constify struct pmic_wrapper_type
  soc: mediatek: pwrap: Constify some struct int[]
  soc: mediatek: pwrap: Use devm_clk_bulk_get_all_enable()

 drivers/soc/mediatek/mtk-pmic-wrap.c | 118 +++++++--------------------
 1 file changed, 30 insertions(+), 88 deletions(-)

Comments

AngeloGioacchino Del Regno July 30, 2024, 8:57 a.m. UTC | #1
On Sun, 07 Jul 2024 07:47:19 +0200, Christophe JAILLET wrote:
> This series is motivated by patch 1. The 2 other patches are some
> additionnal goodies spotted while looking at the code.
> 
> Patch 1 constifies struct pmic_wrapper_type to move some data to a
> read-only section, in order to increase safety.
> 
> Patch 2 does the same for some int arrays. This helps move about 7 ko of
> data to a read-only section. Not that bad!
> 
> [...]

Applied to v6.11-next/soc, thanks!

[1/3] soc: mediatek: pwrap: Constify struct pmic_wrapper_type
      commit: ded525f8ac5db53286b0eabb679ecf7edb974eaa
[2/3] soc: mediatek: pwrap: Constify some struct int[]
      commit: 10c1ea1eaf4d107c323321e92237ba67848de291
[3/3] soc: mediatek: pwrap: Use devm_clk_bulk_get_all_enable()
      commit: 1c28c9452d521bf21dc5d2c50a47c2e43002728d

Cheers,
Angelo