![](https://secure.gravatar.com/avatar/de6791ca2d7e9b55758163fc44293d33.jpg?s=120&d=mm&r=g)
27 Jul
2024
27 Jul
'24
12:46 p.m.
On Thu, Jul 25, 2024 at 01:23:43PM GMT, Krzysztof Kozlowski wrote:
Two arrays (with 'struct sdw_dpn_prop' and 'struct sdw_port_config') store configuration of Soundwire ports, thus each of their element is indexed according to the port number (enum wsa_port_ids, e.g. WSA881X_PORT_DAC). Except the indexing, they also store port number offset by one in member 'num'.
Entire code depends on that correlation between array index and port number, thus make it explicit by using designators. The code is functionally the same, but more obvious for reading.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
sound/soc/codecs/wsa881x.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-)
Reviewed-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org
--
With best wishes
Dmitry