mbox series

[0/8] ASoC: codecs: More const and unused member cleanups

Message ID 20250528-asoc-const-unused-v1-0-19a5d07b9d5c@linaro.org
Headers show
Series ASoC: codecs: More const and unused member cleanups | expand

Message

Krzysztof Kozlowski May 28, 2025, 7:59 p.m. UTC
Make static data const for code safety and drop some unused fields in
structs.

This is based on for-v6.16 branch in ASoC tree for context in wcd938x
driver.

Best regards,
Krzysztof

---
Krzysztof Kozlowski (8):
      ASoC: codecs: Constify regmap configuration static variables
      ASoC: fsl: Constify reg_default array
      ASoC: codecs: wcd9335: Drop unused sido_input_src field
      ASoC: codecs: wcd934x: Drop unused num_rx_port/num_tx_port fields
      ASoC: codecs: wcd937x: Drop unused 'struct wcd937x_priv' fields
      ASoC: codecs: wcd938x: Drop unused 'struct wcd938x_priv' fields
      ASoC: codecs: wcd938x: Drop unused variant field
      ASoC: codecs: wcd939x: Drop unused 'struct wcd939x_priv' fields

 sound/soc/codecs/cs35l36.c        |  2 +-
 sound/soc/codecs/da7218.c         |  2 +-
 sound/soc/codecs/da7219.c         |  4 ++--
 sound/soc/codecs/es8375.c         |  2 +-
 sound/soc/codecs/max98363.c       |  2 +-
 sound/soc/codecs/max98373-i2c.c   |  2 +-
 sound/soc/codecs/max98373-sdw.c   |  2 +-
 sound/soc/codecs/max98388.c       |  2 +-
 sound/soc/codecs/max98390.c       |  2 +-
 sound/soc/codecs/max98396.c       |  4 ++--
 sound/soc/codecs/max98504.c       |  2 +-
 sound/soc/codecs/max98520.c       |  2 +-
 sound/soc/codecs/max98927.c       |  2 +-
 sound/soc/codecs/rt722-sdca-sdw.c |  2 +-
 sound/soc/codecs/wcd9335.c        |  5 -----
 sound/soc/codecs/wcd934x.c        |  4 ----
 sound/soc/codecs/wcd937x.c        |  2 --
 sound/soc/codecs/wcd938x.c        | 18 ++++++++----------
 sound/soc/codecs/wcd939x.c        |  2 --
 sound/soc/codecs/wsa881x.c        |  4 ++--
 sound/soc/codecs/wsa883x.c        |  2 +-
 sound/soc/codecs/wsa884x.c        |  2 +-
 sound/soc/fsl/fsl_asrc.c          |  2 +-
 sound/soc/fsl/fsl_sai.c           |  4 ++--
 24 files changed, 31 insertions(+), 46 deletions(-)
---
base-commit: 22d449bcd69e66f25fe847b678738950dcf9301e
change-id: 20250528-asoc-const-unused-1e39b434e427
prerequisite-change-id: 20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-0ce64398f9cc:v1
prerequisite-patch-id: 104000f7254b9cc81be49af9ca584544718e52f1
prerequisite-patch-id: 230fcd1b712c5a3199e7c9d8250e98e5d55c0a40
prerequisite-patch-id: ecdbe74955eb7b710f72af1e3cf32ccac52890d5

Best regards,

Comments

Krzysztof Kozlowski May 29, 2025, 9:38 a.m. UTC | #1
On 29/05/2025 11:33, Srinivas Kandagatla wrote:
> 
> 
> On 5/28/25 8:59 PM, Krzysztof Kozlowski wrote:
>> Make static data const for code safety and drop some unused fields in
>> structs.
>>
>> This is based on for-v6.16 branch in ASoC tree for context in wcd938x
>> driver.
>>
>> Best regards,
>> Krzysztof
>>
>> ---
>> Krzysztof Kozlowski (8):
>>       ASoC: codecs: Constify regmap configuration static variables
>>       ASoC: fsl: Constify reg_default array
>>       ASoC: codecs: wcd9335: Drop unused sido_input_src field
>>       ASoC: codecs: wcd934x: Drop unused num_rx_port/num_tx_port fields
>>       ASoC: codecs: wcd937x: Drop unused 'struct wcd937x_priv' fields
>>       ASoC: codecs: wcd938x: Drop unused 'struct wcd938x_priv' fields
>>       ASoC: codecs: wcd938x: Drop unused variant field
>>       ASoC: codecs: wcd939x: Drop unused 'struct wcd939x_priv' fields
> 
> 
> Thanks Krzysztof for the cleanups, its surprising to see so many unused
> stuct members in qcom codecs. Did you use any static analysis tool to do
> this or was this manually done?

No, only the tool between seat and keyboard. I should find something
better (more automated), because every 3 months I discover a new unused
field. :) I think now I cleaned them for good, but some new cases are
added when some code is dropped or simplified.

Best regards,
Krzysztof
Mark Brown June 9, 2025, 9 p.m. UTC | #2
On Wed, 28 May 2025 21:59:54 +0200, Krzysztof Kozlowski wrote:
> Make static data const for code safety and drop some unused fields in
> structs.
> 
> This is based on for-v6.16 branch in ASoC tree for context in wcd938x
> driver.
> 
> Best regards,
> Krzysztof
> 
> [...]

Applied to

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

Thanks!

[1/8] ASoC: codecs: Constify regmap configuration static variables
      commit: 0045b902ad27f2676c2a5b6444494a8287b80072
[2/8] ASoC: fsl: Constify reg_default array
      commit: 239dab898b739f49b1bda8d65163fe4f5c773468
[3/8] ASoC: codecs: wcd9335: Drop unused sido_input_src field
      commit: 620d9687004ce877b340041b8213da166f329367
[4/8] ASoC: codecs: wcd934x: Drop unused num_rx_port/num_tx_port fields
      commit: 9afc53569d800f5e3caf9401d49ad2d89f340a54
[5/8] ASoC: codecs: wcd937x: Drop unused 'struct wcd937x_priv' fields
      commit: 87a2270fd1f560dbfc1b26391ff3b37f56d2a1a3
[6/8] ASoC: codecs: wcd938x: Drop unused 'struct wcd938x_priv' fields
      commit: fd32bd4467c13254cb52188034fce242f0f6340d
[7/8] ASoC: codecs: wcd938x: Drop unused variant field
      commit: ff228b6b9ed8f5d7ef418b6cbece772c6617d789
[8/8] ASoC: codecs: wcd939x: Drop unused 'struct wcd939x_priv' fields
      commit: ece5d881004f041c2e1493436409dbcbea3ad5f8

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