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