ASoC: Use named initializers for platform_device_id arrays
Subsystems (14)
v2 cover ASoC: Use named initializers for platform_device_id arrays
Hello,
the objective of this series is still to prepare making struct platform_device_id::driver_data an anonymous union. See
https://lore.kernel.org/all/[email protected]/
for the details about that.
If you consider the last patch mostly churn, just drop it.
v1 of this series can be found at
https://lore.kernel.org/linux-sound/[email protected].
Changes since then:
- Rebase to current next
- Some grammar improvements in the commit log for patch #1
- Split the changes to sound/soc/amd/acp in separate changes.
- The 2nd patch used to be "ASoC: renesas: fsi: Simplify driver_data handling" which removed fsi_id_table[0].driver_data, but with commit 38d3273075d6 ("ASoC: renesas: fsi: remove platform data style support") that needed to change.
- The last patch now touches a few more files. (I didn't check if these are new offenders or if I failed to catch them in v1.) I didn't add Cezary Rojewski's ack because of that.
If splitting off the amd/acp changes was requested because they go in via a separate tree: That's possible, in fact each file is touched only once, so the patches can be reordered freely and applied via different trees if needed.
Best regards
Uwe
Uwe Kleine-König (The Capable Hub) (6):
ASoC: codecs: mt6357: Drop unused assignment of platform_device_id
driver data
ASoC: renesas: fsi: Drop platform probing metadata
ASoC: amd: acp: Use named initializers for platform_device_id arrays
ASoC: amd: acp: Unify code style for platform_device_id array
ASoC: Use named initializers for platform_device_id arrays
ASOC: Unify code style for platform_device_id arrays
sound/soc/amd/acp/acp-sdw-legacy-mach.c | 4 ++-- sound/soc/amd/acp/acp-sdw-sof-mach.c | 4 ++-- sound/soc/amd/acp/acp-sof-mach.c | 14 +++++++------- sound/soc/au1x/db1200.c | 2 +- sound/soc/codecs/adau7118-hw.c | 2 +- sound/soc/codecs/bt-sco.c | 10 +++------- sound/soc/codecs/cs40l50-codec.c | 4 ++-- sound/soc/codecs/cs42l43.c | 4 ++-- sound/soc/codecs/mt6357.c | 4 ++-- sound/soc/codecs/wcd934x.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 +++--- sound/soc/intel/avs/boards/da7219.c | 6 ++---- sound/soc/intel/avs/boards/dmic.c | 6 ++---- sound/soc/intel/avs/boards/es8336.c | 6 ++---- sound/soc/intel/avs/boards/hdaudio.c | 6 ++---- sound/soc/intel/avs/boards/i2s_test.c | 6 ++---- sound/soc/intel/avs/boards/max98357a.c | 6 ++---- sound/soc/intel/avs/boards/max98373.c | 6 ++---- sound/soc/intel/avs/boards/max98927.c | 6 ++---- sound/soc/intel/avs/boards/nau8825.c | 6 ++---- sound/soc/intel/avs/boards/pcm3168a.c | 6 ++---- sound/soc/intel/avs/boards/probe.c | 2 +- sound/soc/intel/avs/boards/rt274.c | 2 +- sound/soc/intel/avs/boards/rt286.c | 2 +- sound/soc/intel/avs/boards/rt298.c | 2 +- sound/soc/intel/avs/boards/rt5514.c | 2 +- sound/soc/intel/avs/boards/rt5640.c | 2 +- sound/soc/intel/avs/boards/rt5663.c | 2 +- sound/soc/intel/avs/boards/rt5682.c | 2 +- sound/soc/intel/avs/boards/ssm4567.c | 2 +- sound/soc/intel/boards/sof_sdw.c | 4 ++-- sound/soc/renesas/fsi.c | 4 ++-- sound/soc/samsung/i2s.c | 2 +- 33 files changed, 61 insertions(+), 87 deletions(-)
base-commit: 0718283ab28bc3907e10b61a6b4be6fefa1cbb2f
Signature · 1 line
2.55.0.11.g153666a7d9bb
PATCH v2 1/6 ASoC: codecs: mt6357: Drop unused assignment of platform_device_id driver data
The driver explicitly sets the .driver_data member of struct platform_device_id to zero without relying on that value. Drop this unused assignment.
While touching this array unify spacing, use a named initializer for .name and drop a trailing comma after the list terminator.
--- sound/soc/codecs/mt6357.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/mt6357.c +2 -2
@@ -1834,8 +1834,8 @@ static int mt6357_platform_driver_probe(struct platform_device *pdev) }static const struct platform_device_id mt6357_platform_ids[] = { - {"mt6357-sound" ,0 }, - {/* sentinel */ }, + { .name ="mt6357-sound" }, + {/* sentinel */ } };MODULE_DEVICE_TABLE (platform, mt6357_platform_ids);
Signature · 1 line
2.55.0.11.g153666a7d9bb
PATCH v2 2/6 ASoC: renesas: fsi: Drop platform probing metadata
In reply to Uwe Kleine-König (The Capable Hub)Since commit 38d3273075d6 ("ASoC: renesas: fsi: remove platform data style support") probing using the traditional platform bus matching isn't supported any more.
Drop the platform_device_id entries that should have been removed in the above commit. Note that keeping the empty array results in the driver not matching on "fsi-pcm-audio" (i.e. the driver name).
While touching that array, use a single space and no trailing comma for the list terminator, which is the most used style for this.
---
I was unsure about keeping the array. Also dropping MODULE_DEVICE_TABLE() if keeping it might be worth a thought.
--- sound/soc/renesas/fsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/renesas/fsi.c +2 -2
@@ -1979,8 +1979,8 @@ static const struct of_device_id fsi_of_match[] = {MODULE_DEVICE_TABLE (of, fsi_of_match);static const struct platform_device_id fsi_id_table[] = { - {"sh_fsi" , (kernel_ulong_t)&fsi1_core }, - {}, +/* an array with no valid entry prevents matching on driver name */ + { } };MODULE_DEVICE_TABLE (platform, fsi_id_table);
Signature · 1 line
2.55.0.11.g153666a7d9bb
Kuninori Morimoto
maintainerRe: [PATCH v2 2/6] ASoC: renesas: fsi: Drop platform probing metadata
Hi Uwe
Thank you for the patch
Quoted 4 lines
Since commit
38d3273075d6("ASoC: renesas: fsi: remove platform data style support") probing using the traditional platform bus matching isn't supported any more.
Quoted 8 lines
Drop the
platform_device_identries that should have been removed in the above commit. Note that keeping the empty array results in the driver not matching on "fsi-pcm-audio" (i.e. the driver name).While touching that array, use a single space and no trailing comma for the list terminator, which is the most used style for this.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Yes, indeed. id_table is no longer needed
Quoted 2 lines
I was unsure about keeping the array. Also dropping
MODULE_DEVICE_TABLE()if keeping it might be worth a thought.
Yeah.
Because it doesn't support platform data style, id_table itself is no longer needed. Our other driver which support DT style only doesn't have id_table.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
PATCH v2 3/6 ASoC: amd: acp: Use named initializers for platform_device_id arrays
In reply to Uwe Kleine-König (The Capable Hub)Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct platform_device_id replacing .driver_data by an anonymous union.
While touching these arrays unify spacing and usage of commas.
--- sound/soc/amd/acp/acp-sdw-legacy-mach.c | 4 ++-- sound/soc/amd/acp/acp-sdw-sof-mach.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/amd/acp/acp-sdw-legacy-mach.c +2 -2
@@ -580,8 +580,8 @@ static void mc_remove(struct platform_device *pdev) }static const struct platform_device_id mc_id_table[] = { - {"amd_sdw" , }, - {} + { .name ="amd_sdw" }, + { } };MODULE_DEVICE_TABLE (platform, mc_id_table);
sound/soc/amd/acp/acp-sdw-sof-mach.c +2 -2
@@ -438,8 +438,8 @@ static void mc_remove(struct platform_device *pdev) }static const struct platform_device_id mc_id_table[] = { - {"amd_sof_sdw" , }, - {} + { .name ="amd_sof_sdw" }, + { } };MODULE_DEVICE_TABLE (platform, mc_id_table);
Signature · 1 line
2.55.0.11.g153666a7d9bb
Re: [PATCH v2 3/6] ASoC: amd: acp: Use named initializers for platform_device_id arrays
Quoted 9 lines · Uwe Kleine-König (The Capable Hub)
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct
platform_device_idreplacing .driver_data by an anonymous union.While touching these arrays unify spacing and usage of commas.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Quoted 38 lines
--- sound/soc/amd/acp/acp-sdw-legacy-mach.c | 4 ++-- sound/soc/amd/acp/acp-sdw-sof-mach.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)sound/soc/amd/acp/acp-sdw-legacy-mach.c +2
-2@@ -580,8 +580,8 @@ static void mc_remove(struct platform_device *pdev) }static const struct platform_device_id mc_id_table[] = { - {"amd_sdw" , }, - {} + { .name ="amd_sdw" }, + { } };MODULE_DEVICE_TABLE (platform, mc_id_table);sound/soc/amd/acp/acp-sdw-sof-mach.c +2
-3@@ -438,8 +438,8 @@ static void mc_remove(struct platform_device *pdev) }static const struct platform_device_id mc_id_table[] = { - {"amd_sof_sdw" , }, - {} + { .name ="amd_sof_sdw" }, + { } };MODULE_DEVICE_TABLE (platform, mc_id_table); --2.55.0.11.g153666a7d9bb
PATCH v2 4/6 ASoC: amd: acp: Unify code style for platform_device_id array
In reply to Uwe Kleine-König (The Capable Hub) - Add a trailing comma for initializers unless the closing brace is on the same line and for the list terminator;
- Use a single space in the list terminator;
--- sound/soc/amd/acp/acp-sof-mach.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
sound/soc/amd/acp/acp-sof-mach.c +7 -7
@@ -128,31 +128,31 @@ static int acp_sof_probe(struct platform_device *pdev)static const struct platform_device_id board_ids[] = { { .name ="rt5682-rt1019" , - .driver_data = (kernel_ulong_t)&sof_rt5682_rt1019_data + .driver_data = (kernel_ulong_t)&sof_rt5682_rt1019_data, }, { .name ="rt5682-max" , - .driver_data = (kernel_ulong_t)&sof_rt5682_max_data + .driver_data = (kernel_ulong_t)&sof_rt5682_max_data, }, { .name ="rt5682s-max" , - .driver_data = (kernel_ulong_t)&sof_rt5682s_max_data + .driver_data = (kernel_ulong_t)&sof_rt5682s_max_data, }, { .name ="rt5682s-rt1019" , - .driver_data = (kernel_ulong_t)&sof_rt5682s_rt1019_data + .driver_data = (kernel_ulong_t)&sof_rt5682s_rt1019_data, }, { .name ="nau8825-max" , - .driver_data = (kernel_ulong_t)&sof_nau8825_data + .driver_data = (kernel_ulong_t)&sof_nau8825_data, }, { .name ="rt5682s-hs-rt1019" , - .driver_data = (kernel_ulong_t)&sof_rt5682s_hs_rt1019_data + .driver_data = (kernel_ulong_t)&sof_rt5682s_hs_rt1019_data, }, { .name ="nau8821-max" , - .driver_data = (kernel_ulong_t)&sof_nau8821_max98388_data + .driver_data = (kernel_ulong_t)&sof_nau8821_max98388_data, }, { } };
Signature · 1 line
2.55.0.11.g153666a7d9bb
Cezary Rojewski
maintainerRe: [PATCH v2 4/6] ASoC: amd: acp: Unify code style for platform_device_id array
Quoted 5 lines · Uwe Kleine-König (The Capable Hub)
- Add a trailing comma for initializers unless the closing brace is on
the same line and for the list terminator;- Use a single space in the list terminator;
Acked-by Cezary Rojewski <[email protected]>
Perhaps I should have been more clear in my previous response [1] - I expected the sound/soc/intel/avs changes be separated and then ACK tag can be freely added _only_ to those (avs-driver) changes. I do not ACK non-Intel patches.
[1]: https://lore.kernel.org/linux-sound/[email protected]/
Quoted 1 line
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Re: [PATCH v2 4/6] ASoC: amd: acp: Unify code style for platform_device_id array
Quoted 11 lines · Cezary Rojewski
Quoted 5 lines · Uwe Kleine-König (The Capable Hub)
- Add a trailing comma for initializers unless the closing brace is on
the same line and for the list terminator;- Use a single space in the list terminator;
Acked-by Cezary Rojewski <[email protected]>Perhaps I should have been more clear in my previous response [1] - I expected the
sound/soc/intel/avschanges be separated and then ACK tag can be freely added _only_ to those (avs-driver) changes. I do not ACK non-Intel patches.
Ah, I didn't revisit that after collecting the review tags using b4. One way to express that in a way that b4 handles is to write:
Acked-yb: Cezary Rojewski <[email protected]> # for sound/soc/intel/avs
(typo made deliberately to make b4 skip this example).
Will adapt for v3 (if it comes to that).
Best regards
Uwe
Re: [PATCH v2 4/6] ASoC: amd: acp: Unify code style for platform_device_id array
In reply to Uwe Kleine-König (The Capable Hub)Quoted 8 lines · Uwe Kleine-König (The Capable Hub)
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
- Add a trailing comma for initializers unless the closing brace is on the same line and for the list terminator;
- Use a single space in the list terminator;Acked-by Cezary Rojewski <[email protected]>Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Quoted 50 lines
--- sound/soc/amd/acp/acp-sof-mach.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)sound/soc/amd/acp/acp-sof-mach.c +7
-8@@ -128,31 +128,31 @@ static int acp_sof_probe(struct platform_device *pdev)static const struct platform_device_id board_ids[] = { { .name ="rt5682-rt1019" , - .driver_data = (kernel_ulong_t)&sof_rt5682_rt1019_data + .driver_data = (kernel_ulong_t)&sof_rt5682_rt1019_data, }, { .name ="rt5682-max" , - .driver_data = (kernel_ulong_t)&sof_rt5682_max_data + .driver_data = (kernel_ulong_t)&sof_rt5682_max_data, }, { .name ="rt5682s-max" , - .driver_data = (kernel_ulong_t)&sof_rt5682s_max_data + .driver_data = (kernel_ulong_t)&sof_rt5682s_max_data, }, { .name ="rt5682s-rt1019" , - .driver_data = (kernel_ulong_t)&sof_rt5682s_rt1019_data + .driver_data = (kernel_ulong_t)&sof_rt5682s_rt1019_data, }, { .name ="nau8825-max" , - .driver_data = (kernel_ulong_t)&sof_nau8825_data + .driver_data = (kernel_ulong_t)&sof_nau8825_data, }, { .name ="rt5682s-hs-rt1019" , - .driver_data = (kernel_ulong_t)&sof_rt5682s_hs_rt1019_data + .driver_data = (kernel_ulong_t)&sof_rt5682s_hs_rt1019_data, }, { .name ="nau8821-max" , - .driver_data = (kernel_ulong_t)&sof_nau8821_max98388_data + .driver_data = (kernel_ulong_t)&sof_nau8821_max98388_data, }, { } }; --2.55.0.11.g153666a7d9bb
PATCH v2 5/6 ASoC: Use named initializers for platform_device_id arrays
In reply to Uwe Kleine-König (The Capable Hub)Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct platform_device_id replacing .driver_data by an anonymous union.
While touching these arrays unify spacing and usage of commas.
--- sound/soc/codecs/cs40l50-codec.c | 4 ++-- sound/soc/codecs/cs42l43.c | 4 ++-- sound/soc/intel/boards/sof_sdw.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/cs40l50-codec.c +2 -2
@@ -288,8 +288,8 @@ static int cs40l50_codec_driver_probe(struct platform_device *pdev) }static const struct platform_device_id cs40l50_id[] = { - {"cs40l50-codec" , }, - {} + { .name ="cs40l50-codec" }, + { } };MODULE_DEVICE_TABLE (platform, cs40l50_id);
sound/soc/codecs/cs42l43.c +2 -2
@@ -2935,8 +2935,8 @@ static const struct dev_pm_ops cs42l43_codec_pm_ops = { };static const struct platform_device_id cs42l43_codec_id_table[] = { - {"cs42l43-codec" , }, - {} + { .name ="cs42l43-codec" }, + { } };MODULE_DEVICE_TABLE (platform, cs42l43_codec_id_table);
sound/soc/intel/boards/sof_sdw.c +2 -2
@@ -1542,8 +1542,8 @@ static void mc_remove(struct platform_device *pdev) }static const struct platform_device_id mc_id_table[] = { - {"sof_sdw" , }, - {} + { .name ="sof_sdw" }, + { } };MODULE_DEVICE_TABLE (platform, mc_id_table);
Signature · 1 line
2.55.0.11.g153666a7d9bb
Quoted 8 lines · Uwe Kleine-König (The Capable Hub)
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct
platform_device_idreplacing .driver_data by an anonymous union.While touching these arrays unify spacing and usage of commas.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>---
Thanks,
Charles
Quoted 7 lines · Uwe Kleine-König (The Capable Hub)
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct
platform_device_idreplacing .driver_data by an anonymous union.While touching these arrays unify spacing and usage of commas.
Signed-off-by Uwe Kleine-König (The Capable Hub) <[email protected]>
Quoted 51 lines
--- sound/soc/codecs/cs40l50-codec.c | 4 ++-- sound/soc/codecs/cs42l43.c | 4 ++-- sound/soc/intel/boards/sof_sdw.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)sound/soc/codecs/cs40l50-codec.c +2
-2@@ -288,8 +288,8 @@ static int cs40l50_codec_driver_probe(struct platform_device *pdev) }static const struct platform_device_id cs40l50_id[] = { - {"cs40l50-codec" , }, - {} + { .name ="cs40l50-codec" }, + { } };MODULE_DEVICE_TABLE (platform, cs40l50_id);sound/soc/codecs/cs42l43.c +2
-2@@ -2935,8 +2935,8 @@ static const struct dev_pm_ops cs42l43_codec_pm_ops = { };static const struct platform_device_id cs42l43_codec_id_table[] = { - {"cs42l43-codec" , }, - {} + { .name ="cs42l43-codec" }, + { } };MODULE_DEVICE_TABLE (platform, cs42l43_codec_id_table);sound/soc/intel/boards/sof_sdw.c +2
-2@@ -1542,8 +1542,8 @@ static void mc_remove(struct platform_device *pdev) }static const struct platform_device_id mc_id_table[] = { - {"sof_sdw" , }, - {} + { .name ="sof_sdw" }, + { } };MODULE_DEVICE_TABLE (platform, mc_id_table);
Signature · 1 line
Péter
PATCH v2 6/6 ASOC: Unify code style for platform_device_id arrays
In reply to Uwe Kleine-König (The Capable Hub) - Add a trailing comma for initializers unless the closing brace is on the same line and for the list terminator;
- Use a single space in the list terminator;
- Use compact one-line style for small entries;
- s/\t=/ =/ were the tab is only one char wide anyhow;
--- sound/soc/au1x/db1200.c | 2 +- sound/soc/codecs/adau7118-hw.c | 2 +- sound/soc/codecs/bt-sco.c | 10 +++------- sound/soc/codecs/wcd934x.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 +++--- sound/soc/intel/avs/boards/da7219.c | 6 ++---- sound/soc/intel/avs/boards/dmic.c | 6 ++---- sound/soc/intel/avs/boards/es8336.c | 6 ++---- sound/soc/intel/avs/boards/hdaudio.c | 6 ++---- sound/soc/intel/avs/boards/i2s_test.c | 6 ++---- sound/soc/intel/avs/boards/max98357a.c | 6 ++---- sound/soc/intel/avs/boards/max98373.c | 6 ++---- sound/soc/intel/avs/boards/max98927.c | 6 ++---- sound/soc/intel/avs/boards/nau8825.c | 6 ++---- sound/soc/intel/avs/boards/pcm3168a.c | 6 ++---- sound/soc/intel/avs/boards/probe.c | 2 +- sound/soc/intel/avs/boards/rt274.c | 2 +- sound/soc/intel/avs/boards/rt286.c | 2 +- sound/soc/intel/avs/boards/rt298.c | 2 +- sound/soc/intel/avs/boards/rt5514.c | 2 +- sound/soc/intel/avs/boards/rt5640.c | 2 +- sound/soc/intel/avs/boards/rt5663.c | 2 +- sound/soc/intel/avs/boards/rt5682.c | 2 +- sound/soc/intel/avs/boards/ssm4567.c | 2 +- sound/soc/samsung/i2s.c | 2 +- 25 files changed, 40 insertions(+), 66 deletions(-)
sound/soc/au1x/db1200.c +1 -1
@@ -42,7 +42,7 @@ static const struct platform_device_id db1200_pids[] = { .name = "db1550-i2s", .driver_data = 5, }, - {}, + { } };MODULE_DEVICE_TABLE (platform, db1200_pids);
sound/soc/codecs/adau7118-hw.c +1 -1
@@ -22,7 +22,7 @@ static const struct of_device_id adau7118_of_match[] = {MODULE_DEVICE_TABLE (of, adau7118_of_match);static const struct platform_device_id adau7118_id[] = { - { .name ="adau7118" }, + { .name ="adau7118" }, { } };MODULE_DEVICE_TABLE (platform, adau7118_id);
sound/soc/codecs/bt-sco.c +3 -7
@@ -85,13 +85,9 @@ static int bt_sco_probe(struct platform_device *pdev) }static const struct platform_device_id bt_sco_driver_ids[] = { - { - .name ="dfbmcs320" , - }, - { - .name ="bt-sco" , - }, - {}, + { .name ="dfbmcs320" }, + { .name ="bt-sco" }, + { } };MODULE_DEVICE_TABLE (platform, bt_sco_driver_ids);
sound/soc/codecs/wcd934x.c +2 -4
@@ -5899,10 +5899,8 @@ static int wcd934x_codec_probe(struct platform_device *pdev) }static const struct platform_device_id wcd934x_driver_id[] = { - { - .name ="wcd934x-codec" , - }, - {}, + { .name ="wcd934x-codec" }, + { } };MODULE_DEVICE_TABLE (platform, wcd934x_driver_id);
sound/soc/fsl/imx-pcm-rpmsg.c +3 -3
@@ -810,9 +810,9 @@ static const struct dev_pm_ops imx_rpmsg_pcm_pm_ops = { };static const struct platform_device_id imx_rpmsg_pcm_id_table[] = { - { .name ="rpmsg-audio-channel" }, - { .name ="rpmsg-micfil-channel" }, - { }, + { .name ="rpmsg-audio-channel" }, + { .name ="rpmsg-micfil-channel" }, + { } };MODULE_DEVICE_TABLE (platform, imx_rpmsg_pcm_id_table);
sound/soc/intel/avs/boards/da7219.c +2 -4
@@ -259,10 +259,8 @@ static int avs_da7219_probe(struct platform_device *pdev) }static const struct platform_device_id avs_da7219_driver_ids[] = { - { - .name ="avs_da7219" , - }, - {}, + { .name ="avs_da7219" }, + { } };MODULE_DEVICE_TABLE (platform, avs_da7219_driver_ids);
sound/soc/intel/avs/boards/dmic.c +2 -4
@@ -104,10 +104,8 @@ static int avs_dmic_probe(struct platform_device *pdev) }static const struct platform_device_id avs_dmic_driver_ids[] = { - { - .name ="avs_dmic" , - }, - {}, + { .name ="avs_dmic" }, + { } };MODULE_DEVICE_TABLE (platform, avs_dmic_driver_ids);
sound/soc/intel/avs/boards/es8336.c +2 -4
@@ -309,10 +309,8 @@ static int avs_es8336_probe(struct platform_device *pdev) }static const struct platform_device_id avs_es8336_driver_ids[] = { - { - .name ="avs_es8336" , - }, - {}, + { .name ="avs_es8336" }, + { } };MODULE_DEVICE_TABLE (platform, avs_es8336_driver_ids);
sound/soc/intel/avs/boards/hdaudio.c +2 -4
@@ -231,10 +231,8 @@ static int avs_hdaudio_probe(struct platform_device *pdev) }static const struct platform_device_id avs_hdaudio_driver_ids[] = { - { - .name ="avs_hdaudio" , - }, - {}, + { .name ="avs_hdaudio" }, + { } };MODULE_DEVICE_TABLE (platform, avs_hdaudio_driver_ids);
sound/soc/intel/avs/boards/i2s_test.c +2 -4
@@ -107,10 +107,8 @@ static int avs_i2s_test_probe(struct platform_device *pdev) }static const struct platform_device_id avs_i2s_test_driver_ids[] = { - { - .name ="avs_i2s_test" , - }, - {}, + { .name ="avs_i2s_test" }, + { } };MODULE_DEVICE_TABLE (platform, avs_i2s_test_driver_ids);
sound/soc/intel/avs/boards/max98357a.c +2 -4
@@ -136,10 +136,8 @@ static int avs_max98357a_probe(struct platform_device *pdev) }static const struct platform_device_id avs_max98357a_driver_ids[] = { - { - .name ="avs_max98357a" , - }, - {}, + { .name ="avs_max98357a" }, + { } };MODULE_DEVICE_TABLE (platform, avs_max98357a_driver_ids);
sound/soc/intel/avs/boards/max98373.c +2 -4
@@ -191,10 +191,8 @@ static int avs_max98373_probe(struct platform_device *pdev) }static const struct platform_device_id avs_max98373_driver_ids[] = { - { - .name ="avs_max98373" , - }, - {}, + { .name ="avs_max98373" }, + { } };MODULE_DEVICE_TABLE (platform, avs_max98373_driver_ids);
sound/soc/intel/avs/boards/max98927.c +2 -4
@@ -188,10 +188,8 @@ static int avs_max98927_probe(struct platform_device *pdev) }static const struct platform_device_id avs_max98927_driver_ids[] = { - { - .name ="avs_max98927" , - }, - {}, + { .name ="avs_max98927" }, + { } };MODULE_DEVICE_TABLE (platform, avs_max98927_driver_ids);
sound/soc/intel/avs/boards/nau8825.c +2 -4
@@ -293,10 +293,8 @@ static int avs_nau8825_probe(struct platform_device *pdev) }static const struct platform_device_id avs_nau8825_driver_ids[] = { - { - .name ="avs_nau8825" , - }, - {}, + { .name ="avs_nau8825" }, + { } };MODULE_DEVICE_TABLE (platform, avs_nau8825_driver_ids);
sound/soc/intel/avs/boards/pcm3168a.c +2 -4
@@ -132,10 +132,8 @@ static int avs_pcm3168a_probe(struct platform_device *pdev) }static const struct platform_device_id avs_pcm3168a_driver_ids[] = { - { - .name ="avs_pcm3168a" , - }, - {}, + { .name ="avs_pcm3168a" }, + { } };MODULE_DEVICE_TABLE (platform, avs_pcm3168a_driver_ids);
sound/soc/intel/avs/boards/probe.c +1 -1
@@ -64,7 +64,7 @@ static const struct platform_device_id avs_probe_mb_driver_ids[] = { { .name = "avs_probe_mb", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_probe_mb_driver_ids);
sound/soc/intel/avs/boards/rt274.c +1 -1
@@ -261,7 +261,7 @@ static const struct platform_device_id avs_rt274_driver_ids[] = { { .name = "avs_rt274", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt274_driver_ids);
sound/soc/intel/avs/boards/rt286.c +1 -1
@@ -231,7 +231,7 @@ static const struct platform_device_id avs_rt286_driver_ids[] = { { .name = "avs_rt286", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt286_driver_ids);
sound/soc/intel/avs/boards/rt298.c +1 -1
@@ -250,7 +250,7 @@ static const struct platform_device_id avs_rt298_driver_ids[] = { { .name = "avs_rt298", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt298_driver_ids);
sound/soc/intel/avs/boards/rt5514.c +1 -1
@@ -178,7 +178,7 @@ static const struct platform_device_id avs_rt5514_driver_ids[] = { { .name = "avs_rt5514", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt5514_driver_ids);
sound/soc/intel/avs/boards/rt5640.c +1 -1
@@ -252,7 +252,7 @@ static const struct platform_device_id avs_rt5640_driver_ids[] = { { .name = "avs_rt5640", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt5640_driver_ids);
sound/soc/intel/avs/boards/rt5663.c +1 -1
@@ -249,7 +249,7 @@ static const struct platform_device_id avs_rt5663_driver_ids[] = { { .name = "avs_rt5663", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt5663_driver_ids);
sound/soc/intel/avs/boards/rt5682.c +1 -1
@@ -325,7 +325,7 @@ static const struct platform_device_id avs_rt5682_driver_ids[] = { { .name = "avs_rt5682", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_rt5682_driver_ids);
sound/soc/intel/avs/boards/ssm4567.c +1 -1
@@ -180,7 +180,7 @@ static const struct platform_device_id avs_ssm4567_driver_ids[] = { { .name = "avs_ssm4567", }, - {}, + { } };MODULE_DEVICE_TABLE (platform, avs_ssm4567_driver_ids);
sound/soc/samsung/i2s.c +1 -1
@@ -1675,7 +1675,7 @@ static const struct platform_device_id samsung_i2s_driver_ids[] = { .name = "samsung-i2s", .driver_data = (kernel_ulong_t)&i2sv3_dai_type, }, - {}, + { } };MODULE_DEVICE_TABLE (platform, samsung_i2s_driver_ids);
Signature · 1 line
2.55.0.11.g153666a7d9bb
[email protected]
AI reviewRe: [PATCH v2 6/6] ASOC: Unify code style for platform_device_id arrays
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The commit introduces a style inconsistency by missing several small platform_device_id arrays…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The commit introduces a style inconsistency by missing several small platform_device_id arrays during its mechanical refactoring, despite the commit message claiming to use a 'compact one-line style for small entries'. --
--- Patch [6]: [PATCH v2 6/6] ASOC: Unify code style for platform_device_id arrays --- commit 03434ab8a73c8818fd87d755c26c0b8e9e4f5807
Author: Uwe Kleine-König (The Capable Hub) <[email protected]>
ASOC: Unify code style for platform_device_id arrays
This commit unifies the code style of platform_device_id arrays across various ASoC drivers. It updates list terminators to use a single space and attempts to use a compact one-line style for small entries.
[ ... ]
sound/soc/intel/avs/boards/probe.c static const struct platform_device_id avs_probe_mb_driver_ids[] = { · line 67
Quoted 10 lines
sound/soc/intel/avs/boards/probe.c +1
-1@@ -64,7 +64,7 @@ static const struct platform_device_id avs_probe_mb_driver_ids[] = { { .name = "avs_probe_mb", }, - {}, + { }
[Severity: Low]
This isn't a bug, but should this entry also use the compact one-line style mentioned in the commit message? It seems like this array missed the single line styling update that was applied to files like da7219.c.
Quoted 2 lines
sound/soc/intel/avs/boards/probe.c +0
-0};MODULE_DEVICE_TABLE (platform, avs_probe_mb_driver_ids);
[ ... ]
sound/soc/intel/avs/boards/rt274.c static const struct platform_device_id avs_rt274_driver_ids[] = { · line 264
Quoted 10 lines
sound/soc/intel/avs/boards/rt274.c +1
-1@@ -261,7 +261,7 @@ static const struct platform_device_id avs_rt274_driver_ids[] = { { .name = "avs_rt274", }, - {}, + { }
[Severity: Low]
This isn't a bug, but similar to the probe.c file above, should this entry be compacted to a single line? There are several other files in this directory (rt286.c, rt298.c, rt5514.c, etc.) that also seem to have missed the compact one-line style update.
Quoted 3 lines
sound/soc/intel/avs/boards/rt274.c +0
-0};MODULE_DEVICE_TABLE (platform, avs_rt274_driver_ids);
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
Cezary Rojewski
maintainerRe: [PATCH v2 6/6] ASOC: Unify code style for platform_device_id arrays
In reply to Uwe Kleine-König (The Capable Hub)Quoted 17 lines · Uwe Kleine-König (The Capable Hub)
sound/soc/au1x/db1200.c | 2 +- sound/soc/codecs/adau7118-hw.c | 2 +- sound/soc/codecs/bt-sco.c | 10 +++------- sound/soc/codecs/wcd934x.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 +++--- sound/soc/intel/avs/boards/da7219.c | 6 ++---- sound/soc/intel/avs/boards/dmic.c | 6 ++---- sound/soc/intel/avs/boards/es8336.c | 6 ++---- sound/soc/intel/avs/boards/hdaudio.c | 6 ++---- sound/soc/intel/avs/boards/i2s_test.c | 6 ++---- sound/soc/intel/avs/boards/max98357a.c | 6 ++---- sound/soc/intel/avs/boards/max98373.c | 6 ++---- sound/soc/intel/avs/boards/max98927.c | 6 ++---- sound/soc/intel/avs/boards/nau8825.c | 6 ++---- sound/soc/intel/avs/boards/pcm3168a.c | 6 ++---- sound/soc/intel/avs/boards/probe.c | 2 +- sound/soc/intel/avs/boards/rt274.c | 2 +-
Quoted 8 lines
sound/soc/intel/avs/boards/rt286.c | 2 +- sound/soc/intel/avs/boards/rt298.c | 2 +- sound/soc/intel/avs/boards/rt5514.c | 2 +- sound/soc/intel/avs/boards/rt5640.c | 2 +- sound/soc/intel/avs/boards/rt5663.c | 2 +- sound/soc/intel/avs/boards/rt5682.c | 2 +- sound/soc/intel/avs/boards/ssm4567.c | 2 +- sound/soc/samsung/i2s.c | 2 +-
This change is outstanding when compared to patches 1-4 which follow the
per-driver approach. I'd expect one driver per scope e.g.: Intel's
avs split away from the rest.
Nitpick: s/ASOC/ASoC/
If it comes to v3, I'd appreciate having a separate patch for the avs-driver components with the following title applied:
ASoC: Intel: avs:
Re: [PATCH v2 6/6] ASOC: Unify code style for platform_device_id arrays
Hello Cezary,
Quoted 28 lines · Cezary Rojewski
Quoted 17 lines · Uwe Kleine-König (The Capable Hub)
sound/soc/au1x/db1200.c | 2 +- sound/soc/codecs/adau7118-hw.c | 2 +- sound/soc/codecs/bt-sco.c | 10 +++------- sound/soc/codecs/wcd934x.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 +++--- sound/soc/intel/avs/boards/da7219.c | 6 ++---- sound/soc/intel/avs/boards/dmic.c | 6 ++---- sound/soc/intel/avs/boards/es8336.c | 6 ++---- sound/soc/intel/avs/boards/hdaudio.c | 6 ++---- sound/soc/intel/avs/boards/i2s_test.c | 6 ++---- sound/soc/intel/avs/boards/max98357a.c | 6 ++---- sound/soc/intel/avs/boards/max98373.c | 6 ++---- sound/soc/intel/avs/boards/max98927.c | 6 ++---- sound/soc/intel/avs/boards/nau8825.c | 6 ++---- sound/soc/intel/avs/boards/pcm3168a.c | 6 ++---- sound/soc/intel/avs/boards/probe.c | 2 +- sound/soc/intel/avs/boards/rt274.c | 2 +-Quoted 8 lines
sound/soc/intel/avs/boards/rt286.c | 2 +- sound/soc/intel/avs/boards/rt298.c | 2 +- sound/soc/intel/avs/boards/rt5514.c | 2 +- sound/soc/intel/avs/boards/rt5640.c | 2 +- sound/soc/intel/avs/boards/rt5663.c | 2 +- sound/soc/intel/avs/boards/rt5682.c | 2 +- sound/soc/intel/avs/boards/ssm4567.c | 2 +- sound/soc/samsung/i2s.c | 2 +-
Quoted 3 lines
This change is outstanding when compared to patches 1-4 which follow the per-driver approach. I'd expect one driver per scope e.g.: Intel's avs split away from the rest.
Well, patches 1 and 2 primarily follow the one patch per type of change approach that happen to only affect one driver each. In the v1 thread I was asked to split out split out the amd/acp bits which resulted in patches 3 and 4. (And just now I notice you also replied and asked to split out intel/avs, too, which I missed. Sorry!)
Conceptually I think one commit per driver is the right approach[1] but most maintainers/reviewers seem to favour one commit adapting one thing for all drivers in a subsystem. And in my experience no matter how you make it, you get a reply to change.
Will split out intel/avs for v3 and maybe hit the sweet spot then.
Quoted 1 line
Nitpick: s/ASOC/ASoC/
Fixed in my tree, so will be correct in v3.
Best regards
Uwe
[1] My reason for that is the "one atomic change per patch" philosophy that allows to document who reviewed/acked what in a fine-grained way and allows selective reverting and backporting as needed. The downside is that the number of patches explodes, but git is able to handle that just fine in my experience. "commit count" is missing in https://markcarrigan.net/2026/06/18/the-museum-of-meaningless-metrics/
Cezary Rojewski
maintainerRe: [PATCH v2 6/6] ASOC: Unify code style for platform_device_id arrays
Quoted 41 lines · Uwe Kleine-König (The Capable Hub)
Hello Cezary,
Quoted 28 lines · Cezary Rojewski
Quoted 17 lines · Uwe Kleine-König (The Capable Hub)
sound/soc/au1x/db1200.c | 2 +- sound/soc/codecs/adau7118-hw.c | 2 +- sound/soc/codecs/bt-sco.c | 10 +++------- sound/soc/codecs/wcd934x.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 +++--- sound/soc/intel/avs/boards/da7219.c | 6 ++---- sound/soc/intel/avs/boards/dmic.c | 6 ++---- sound/soc/intel/avs/boards/es8336.c | 6 ++---- sound/soc/intel/avs/boards/hdaudio.c | 6 ++---- sound/soc/intel/avs/boards/i2s_test.c | 6 ++---- sound/soc/intel/avs/boards/max98357a.c | 6 ++---- sound/soc/intel/avs/boards/max98373.c | 6 ++---- sound/soc/intel/avs/boards/max98927.c | 6 ++---- sound/soc/intel/avs/boards/nau8825.c | 6 ++---- sound/soc/intel/avs/boards/pcm3168a.c | 6 ++---- sound/soc/intel/avs/boards/probe.c | 2 +- sound/soc/intel/avs/boards/rt274.c | 2 +-Quoted 8 lines
sound/soc/intel/avs/boards/rt286.c | 2 +- sound/soc/intel/avs/boards/rt298.c | 2 +- sound/soc/intel/avs/boards/rt5514.c | 2 +- sound/soc/intel/avs/boards/rt5640.c | 2 +- sound/soc/intel/avs/boards/rt5663.c | 2 +- sound/soc/intel/avs/boards/rt5682.c | 2 +- sound/soc/intel/avs/boards/ssm4567.c | 2 +- sound/soc/samsung/i2s.c | 2 +-Quoted 3 lines
This change is outstanding when compared to patches 1-4 which follow the per-driver approach. I'd expect one driver per scope e.g.: Intel's avs split away from the rest.
Well, patches 1 and 2 primarily follow the one patch per type of change approach that happen to only affect one driver each. In the v1 thread I was asked to split out split out the amd/acp bits which resulted in patches 3 and 4. (And just now I notice you also replied and asked to split out intel/avs, too, which I missed. Sorry!)
Quoted 4 lines
Conceptually I think one commit per driver is the right approach[1] but most maintainers/reviewers seem to favour one commit adapting one thing for all drivers in a subsystem. And in my experience no matter how you make it, you get a reply to change.
Couldn't agree more with the last one. Happens to us all :)
Quoted 1 line
Will split out intel/avs for v3 and maybe hit the sweet spot then.
Thank you.
Mark Brown
maintainerQuoted 10 lines · Uwe Kleine-König (The Capable Hub)
ASoC: Use named initializers for
platform_device_idarraysHello,
the objective of this series is still to prepare making struct
platform_device_id::driver_dataan anonymous union. See
https://lore.kernel.org/all/[email protected]/
for the details about that.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/6] ASoC: codecs: mt6357: Drop unused assignment of platform_device_id driver data
https://git.kernel.org/broonie/sound/c/c7a6909de856 [2/6] ASoC: renesas: fsi: Drop platform probing metadata https://git.kernel.org/broonie/sound/c/0ca8f65516a9 [3/6] ASoC: amd: acp: Use named initializers for platform_device_id arrays https://git.kernel.org/broonie/sound/c/2b26d06fd3d8 [4/6] ASoC: amd: acp: Unify code style for platform_device_id array https://git.kernel.org/broonie/sound/c/4bed1074db1e [5/6] ASoC: Use named initializers for platform_device_id arrays https://git.kernel.org/broonie/sound/c/232725a0e386 [6/6] ASOC: Unify code style for platform_device_id arrays https://git.kernel.org/broonie/sound/c/e4dc03df1f71
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
Cezary Rojewski
maintainerQuoted 19 lines · Mark Brown
Quoted 10 lines · Uwe Kleine-König (The Capable Hub)
ASoC: Use named initializers for
platform_device_idarraysHello,
the objective of this series is still to prepare making struct
platform_device_id::driver_dataan anonymous union. See
https://lore.kernel.org/all/[email protected]/
for the details about that.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/6] ASoC: codecs: mt6357: Drop unused assignment of
platform_device_iddriver data
Quoted 11 lines
https://git.kernel.org/broonie/sound/c/c7a6909de856 [2/6] ASoC: renesas: fsi: Drop platform probing metadata https://git.kernel.org/broonie/sound/c/0ca8f65516a9 [3/6] ASoC: amd: acp: Use named initializers for platform_device_id arrays https://git.kernel.org/broonie/sound/c/2b26d06fd3d8 [4/6] ASoC: amd: acp: Unify code style for platform_device_id array https://git.kernel.org/broonie/sound/c/4bed1074db1e [5/6] ASoC: Use named initializers for platform_device_id arrays https://git.kernel.org/broonie/sound/c/232725a0e386 [6/6] ASOC: Unify code style for platform_device_id arrays https://git.kernel.org/broonie/sound/c/e4dc03df1f71
I'd at least expect my Acked-by: tag replaced with Reviewed-by: for the AMD's patch 4/6. Perhaps it does not matter in a long run but I feel better pointing this out (it has been pointed during the review).
Kind regards,
Czarek