ASoC: SOF/Intel: fix and remove Sparse warnings
Subsystems (4)
cover ASoC: SOF/Intel: fix and remove Sparse warnings
We updated our SOF CI settings last week (see below) to use more options for Sparse, and sure enough it detected one nasty single-character bug in one of my previous patches, along with more trivial issues with string/integer sizes and signed/unsigned confusions.
export ARCH=x86_64
export CF="-Wsparse-error -Wsparse-all -Wno-bitwise-pointer -Wno-pointer-arith -Wno-typesign -Wnoshadow" make -k sound/soc/sof/ C=2
make -k sound/soc/intel/common/ C=2
make -k sound/soc/intel/boards/ C=2
make -k drivers/soundwire/ C=2
Pierre-Louis Bossart (9):
ASoC: SOF: Intel: hda: fix index used in inner loop
ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters
ASoC: Intel: sof_cs42l42: shrink platform id below 20 characters
ASoC: Intel: bxt_da7219_max98357a: shrink platform_id below 20
characters
ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20
characters
ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20
characters
ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20
characters
ASoC: Intel: sof_sdw: fix signed/unsigned warning
ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values
sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 +++--- sound/soc/intel/boards/glk_rt5682_max98357a.c | 4 +- sound/soc/intel/boards/kbl_da7219_max98357a.c | 4 +- sound/soc/intel/boards/sof_cs42l42.c | 2 +- sound/soc/intel/boards/sof_da7219_max98373.c | 8 ++-- sound/soc/intel/boards/sof_rt5682.c | 20 +++++----- sound/soc/intel/boards/sof_sdw.c | 2 +- .../intel/common/soc-acpi-intel-adl-match.c | 28 +++++++------- .../intel/common/soc-acpi-intel-bxt-match.c | 2 +- .../intel/common/soc-acpi-intel-cml-match.c | 22 +++++------ .../intel/common/soc-acpi-intel-cnl-match.c | 2 +- .../intel/common/soc-acpi-intel-glk-match.c | 6 +-- .../intel/common/soc-acpi-intel-icl-match.c | 12 +++--- .../intel/common/soc-acpi-intel-jsl-match.c | 6 +-- .../intel/common/soc-acpi-intel-kbl-match.c | 2 +- .../intel/common/soc-acpi-intel-tgl-match.c | 38 +++++++++---------- sound/soc/sof/intel/hda.c | 2 +- 17 files changed, 86 insertions(+), 86 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/9 ASoC: SOF: Intel: hda: fix index used in inner loop
With more warnings than the default, Sparse throws the following warning:
sound/soc/sof/intel/hda.c:1127:49: error: self-comparison always evaluates to truesound/soc/sof/intel/hda.c:1128:49: error: self-comparison always evaluates to truesound/soc/sof/intel/hda.c:1129:48: error: self-comparison always evaluates to true
This looks like an obvious error, with a likely copy-pasted line leading to the use of the wrong index in an inner loop. One of the worst single-character bugs in a long time.
This problem was not detected in our tests since in practice SoundWire platforms only have identical devices per link and the index mistake did not change the results.
--- sound/soc/sof/intel/hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/intel/hda.c +1 -1
@@ -1067,7 +1067,7 @@ static bool link_slaves_found(struct snd_sof_dev *sdev,/* find out how many identical parts are expected */ for (k =0 ; k < link->num_adr; k++) { -u64 adr2 = link->adr_d[i].adr; +u64 adr2 = link->adr_d[k].adr;unsigned int part_id2, link_id2, mfg_id2; mfg_id2 =SDW_MFG_ID (adr2);
Signature · 1 line
2.25.1
PATCH 2/9 ASoC: Intel: sof_rt5682: shrink platform_id names below 20 characters
In reply to Pierre-Louis BossartSome Chromebooks machine driver aliases exceed 20 characters, which leads to sparse warnings:
sound/soc/intel/boards/sof_rt5682.c:959:25: error: too long initializer-string for array of char(no space for nul char)
sound/soc/intel/boards/sof_rt5682.c:989:25: error: too long initializer-string for array of char(no space for nul char)
sound/soc/intel/boards/sof_rt5682.c:1039:25: error: too long initializer-string for array of char(no space for nul char)
Fix by using the 'mx' shortcut for Maxim platforms (already used in platform firmware)
--- sound/soc/intel/boards/sof_rt5682.c | 20 +++++++++---------- .../intel/common/soc-acpi-intel-adl-match.c | 4 ++-- .../intel/common/soc-acpi-intel-jsl-match.c | 2 +- .../intel/common/soc-acpi-intel-tgl-match.c | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-)
sound/soc/intel/boards/sof_rt5682.c +10 -10
@@ -956,7 +956,7 @@ static const struct platform_device_id board_ids[] = { .name = "sof_rt5682", }, { - .name = "tgl_max98357a_rt5682", + .name = "tgl_mx98357a_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | SOF_RT5682_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT |
@@ -975,7 +975,7 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(1)), }, { - .name = "tgl_max98373_rt5682", + .name = "tgl_mx98373_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | SOF_RT5682_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT |
@@ -986,7 +986,7 @@ static const struct platform_device_id board_ids[] = { SOF_SSP_BT_OFFLOAD_PRESENT), }, { - .name = "jsl_rt5682_max98360a", + .name = "jsl_rt5682_mx98360a", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | SOF_RT5682_MCLK_24MHZ | SOF_RT5682_SSP_CODEC(0) |
@@ -1025,7 +1025,7 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(1)), }, { - .name = "adl_max98373_rt5682", + .name = "adl_mx98373_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | SOF_RT5682_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT |
@@ -1036,7 +1036,7 @@ static const struct platform_device_id board_ids[] = { SOF_SSP_BT_OFFLOAD_PRESENT), }, { - .name = "adl_max98357a_rt5682", + .name = "adl_mx98357a_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | SOF_RT5682_SSP_CODEC(0) | SOF_SPEAKER_AMP_PRESENT |
@@ -1063,14 +1063,14 @@ MODULE_AUTHOR("Sathya Prakash M R <[email protected]>");MODULE_AUTHOR ("Brent Lu <[email protected]>" );MODULE_LICENSE ("GPL v2" );MODULE_ALIAS ("platform:sof_rt5682" ); -MODULE_ALIAS ("platform:tgl_max98357a_rt5682" ); +MODULE_ALIAS ("platform:tgl_mx98357a_rt5682" );MODULE_ALIAS ("platform:jsl_rt5682_rt1015" ); -MODULE_ALIAS ("platform:tgl_max98373_rt5682" ); -MODULE_ALIAS ("platform:jsl_rt5682_max98360a" ); +MODULE_ALIAS ("platform:tgl_mx98373_rt5682" ); +MODULE_ALIAS ("platform:jsl_rt5682_mx98360a" );MODULE_ALIAS ("platform:cml_rt1015_rt5682" );MODULE_ALIAS ("platform:tgl_rt1011_rt5682" );MODULE_ALIAS ("platform:jsl_rt5682_rt1015p" ); -MODULE_ALIAS ("platform:adl_max98373_rt5682" ); -MODULE_ALIAS ("platform:adl_max98357a_rt5682" ); +MODULE_ALIAS ("platform:adl_mx98373_rt5682" ); +MODULE_ALIAS ("platform:adl_mx98357a_rt5682" );MODULE_IMPORT_NS (SND_SOC_INTEL_HDA_DSP_COMMON );MODULE_IMPORT_NS (SND_SOC_INTEL_SOF_MAXIM_COMMON );
sound/soc/intel/common/soc-acpi-intel-adl-match.c +2 -2
@@ -245,7 +245,7 @@ static const struct snd_soc_acpi_codecs adl_max98357a_amp = {struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { { .id ="10EC5682" , - .drv_name ="adl_max98373_rt5682" , + .drv_name ="adl_mx98373_rt5682" , .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &adl_max98373_amp, .sof_fw_filename ="sof-adl.ri" ,
@@ -253,7 +253,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { }, { .id = "10EC5682", - .drv_name = "adl_max98357a_rt5682", + .drv_name = "adl_mx98357a_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &adl_max98357a_amp, .sof_fw_filename = "sof-adl.ri",
sound/soc/intel/common/soc-acpi-intel-jsl-match.c +1 -1
@@ -67,7 +67,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { }, { .id = "10EC5682", - .drv_name = "jsl_rt5682_max98360a", + .drv_name = "jsl_rt5682_mx98360a", .sof_fw_filename = "sof-jsl.ri", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &mx98360a_spk,
sound/soc/intel/common/soc-acpi-intel-tgl-match.c +2 -2
@@ -323,7 +323,7 @@ static const struct snd_soc_acpi_codecs tgl_rt1011_amp = {struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { { .id ="10EC5682" , - .drv_name ="tgl_max98357a_rt5682" , + .drv_name ="tgl_mx98357a_rt5682" , .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &tgl_codecs, .sof_fw_filename ="sof-tgl.ri" ,
@@ -331,7 +331,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = { }, { .id = "10EC5682", - .drv_name = "tgl_max98373_rt5682", + .drv_name = "tgl_mx98373_rt5682", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &tgl_max98373_amp, .sof_fw_filename = "sof-tgl.ri",
Signature · 1 line
2.25.1
PATCH 3/9 ASoC: Intel: sof_cs42l42: shrink platform id below 20 characters
In reply to Pierre-Louis BossartThe platform_id is too long and is flagged by a sparse warning:
sound/soc/intel/boards/sof_cs42l42.c:483:25: error: too long initializer-string for array of char(no space for nul char)
fix by using the 'mx' acronym for Maxim
--- sound/soc/intel/boards/sof_cs42l42.c | 2 +- sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/boards/sof_cs42l42.c +1 -1
@@ -480,7 +480,7 @@ static int sof_audio_probe(struct platform_device *pdev)static const struct platform_device_id board_ids[] = { { - .name ="glk_cs4242_max98357a" , + .name ="glk_cs4242_mx98357a" , .driver_data = (kernel_ulong_t)(SOF_CS42L42_SSP_CODEC(2) | SOF_SPEAKER_AMP_PRESENT | SOF_MAX98357A_SPEAKER_AMP_PRESENT |
sound/soc/intel/common/soc-acpi-intel-glk-match.c +1 -1
@@ -42,7 +42,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = { }, { .id = "10134242", - .drv_name = "glk_cs4242_max98357a", + .drv_name = "glk_cs4242_mx98357a", .fw_filename = "intel/dsp_fw_glk.bin", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &glk_codecs,
Signature · 1 line
2.25.1
PATCH 4/9 ASoC: Intel: bxt_da7219_max98357a: shrink platform_id below 20 characters
In reply to Pierre-Louis BossartSparse throwns the following warnings:
sound/soc/intel/boards/bxt_da7219_max98357a.c:843:19: error: too long initializer-string for array of char(no space for nul char)
sound/soc/intel/boards/bxt_da7219_max98357a.c:844:19: error: too long initializer-string for array of char(no space for nul char)
sound/soc/intel/boards/bxt_da7219_max98357a.c:845:19: error: too long initializer-string for array of char(no space for nul char)
Fix by using the 'mx' acronyn for Maxim
--- sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-cml-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
sound/soc/intel/boards/bxt_da7219_max98357a.c +6 -6
@@ -840,9 +840,9 @@ static int broxton_audio_probe(struct platform_device *pdev) }static const struct platform_device_id bxt_board_ids[] = { - { .name ="bxt_da7219_max98357a" }, - { .name ="glk_da7219_max98357a" }, - { .name ="cml_da7219_max98357a" }, + { .name ="bxt_da7219_mx98357a" }, + { .name ="glk_da7219_mx98357a" }, + { .name ="cml_da7219_mx98357a" }, { } };
@@ -866,7 +866,7 @@ MODULE_AUTHOR("Naveen Manohar <[email protected]>");MODULE_AUTHOR ("Mac Chiang <[email protected]>" );MODULE_AUTHOR ("Brent Lu <[email protected]>" );MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:bxt_da7219_max98357a" ); -MODULE_ALIAS ("platform:glk_da7219_max98357a" ); -MODULE_ALIAS ("platform:cml_da7219_max98357a" ); +MODULE_ALIAS ("platform:bxt_da7219_mx98357a" ); +MODULE_ALIAS ("platform:glk_da7219_mx98357a" ); +MODULE_ALIAS ("platform:cml_da7219_mx98357a" );MODULE_IMPORT_NS (SND_SOC_INTEL_HDA_DSP_COMMON );
sound/soc/intel/common/soc-acpi-intel-bxt-match.c +1 -1
@@ -56,7 +56,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = { }, { .id = "DLGS7219", - .drv_name = "bxt_da7219_max98357a", + .drv_name = "bxt_da7219_mx98357a", .fw_filename = "intel/dsp_fw_bxtn.bin", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &bxt_codecs,
sound/soc/intel/common/soc-acpi-intel-cml-match.c +1 -1
@@ -67,7 +67,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = { }, { .id = "DLGS7219", - .drv_name = "cml_da7219_max98357a", + .drv_name = "cml_da7219_mx98357a", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &max98357a_spk_codecs, .sof_fw_filename = "sof-cml.ri",
sound/soc/intel/common/soc-acpi-intel-glk-match.c +1 -1
@@ -24,7 +24,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = { }, { .id = "DLGS7219", - .drv_name = "glk_da7219_max98357a", + .drv_name = "glk_da7219_mx98357a", .fw_filename = "intel/dsp_fw_glk.bin", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &glk_codecs,
Signature · 1 line
2.25.1
PATCH 5/9 ASoC: Intel: glk_rt5682_max98357a: shrink platform_id below 20 characters
In reply to Pierre-Louis BossartSparse throws the following warning:
sound/soc/intel/boards/glk_rt5682_max98357a.c:622:25: error: too long initializer-string for array of char(no space for nul char)
Fix by using the 'mx' acronym for Maxim
--- sound/soc/intel/boards/glk_rt5682_max98357a.c | 4 ++-- sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/boards/glk_rt5682_max98357a.c +2 -2
@@ -619,7 +619,7 @@ static int geminilake_audio_probe(struct platform_device *pdev)static const struct platform_device_id glk_board_ids[] = { { - .name ="glk_rt5682_max98357a" , + .name ="glk_rt5682_mx98357a" , .driver_data = (kernel_ulong_t)&glk_audio_card_rt5682_m98357a, },
@@ -641,5 +641,5 @@ MODULE_DESCRIPTION("Geminilake Audio Machine driver-RT5682 & MAX98357A in I2S moMODULE_AUTHOR ("Naveen Manohar <[email protected]>" );MODULE_AUTHOR ("Harsha Priya <[email protected]>" );MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:glk_rt5682_max98357a" ); +MODULE_ALIAS ("platform:glk_rt5682_mx98357a" );MODULE_IMPORT_NS (SND_SOC_INTEL_HDA_DSP_COMMON );
sound/soc/intel/common/soc-acpi-intel-glk-match.c +1 -1
@@ -33,7 +33,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = { }, { .id = "10EC5682", - .drv_name = "glk_rt5682_max98357a", + .drv_name = "glk_rt5682_mx98357a", .fw_filename = "intel/dsp_fw_glk.bin", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &glk_codecs,
Signature · 1 line
2.25.1
PATCH 6/9 ASoC: Intel: kbl_da7219_max98357a: shrink platform_id below 20 characters
In reply to Pierre-Louis BossartSparse throws the following warnings:
sound/soc/intel/boards/kbl_da7219_max98357a.c:647:25: error: too long initializer-string for array of char(no space for nul char)
Fix by using the 'mx' acronym for Maxim.
--- sound/soc/intel/boards/kbl_da7219_max98357a.c | 4 ++-- sound/soc/intel/common/soc-acpi-intel-kbl-match.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/boards/kbl_da7219_max98357a.c +2 -2
@@ -644,7 +644,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)static const struct platform_device_id kbl_board_ids[] = { { - .name ="kbl_da7219_max98357a" , + .name ="kbl_da7219_mx98357a" , .driver_data = (kernel_ulong_t)&kabylake_audio_card_da7219_m98357a, },
@@ -666,4 +666,4 @@ module_platform_driver(kabylake_audio)MODULE_DESCRIPTION ("Audio Machine driver-DA7219 & MAX98357A in I2S mode" );MODULE_AUTHOR ("Naveen Manohar <[email protected]>" );MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:kbl_da7219_max98357a" ); +MODULE_ALIAS ("platform:kbl_da7219_mx98357a" );
sound/soc/intel/common/soc-acpi-intel-kbl-match.c +1 -1
@@ -113,7 +113,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_kbl_machines[] = { }, { .id = "DLGS7219", - .drv_name = "kbl_da7219_max98373", + .drv_name = "kbl_da7219_mx98373", .fw_filename = "intel/dsp_fw_kbl.bin", .machine_quirk = snd_soc_acpi_codec_list, .quirk_data = &kbl_7219_98373_codecs,
Signature · 1 line
2.25.1
PATCH 7/9 ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters
In reply to Pierre-Louis BossartSparse throws the following warning:
sound/soc/intel/boards/sof_da7219_max98373.c:438:25: error: too long initializer-string for array of char(no space for nul char)
Fix by using 'mx' acronym for Maxim.
--- sound/soc/intel/boards/sof_da7219_max98373.c | 8 ++++---- sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/intel/boards/sof_da7219_max98373.c +4 -4
@@ -431,11 +431,11 @@ static int audio_probe(struct platform_device *pdev)static const struct platform_device_id board_ids[] = { { - .name ="sof_da7219_max98373" , + .name ="sof_da7219_mx98373" , .driver_data = (kernel_ulong_t)&card_da7219_m98373, }, { - .name ="sof_da7219_max98360a" , + .name ="sof_da7219_mx98360a" , .driver_data = (kernel_ulong_t)&card_da7219_m98360a, }, { }
@@ -455,6 +455,6 @@ module_platform_driver(audio)MODULE_DESCRIPTION ("ASoC Intel(R) SOF Machine driver" );MODULE_AUTHOR ("Yong Zhi <[email protected]>" );MODULE_LICENSE ("GPL v2" ); -MODULE_ALIAS ("platform:sof_da7219_max98360a" ); -MODULE_ALIAS ("platform:sof_da7219_max98373" ); +MODULE_ALIAS ("platform:sof_da7219_mx98360a" ); +MODULE_ALIAS ("platform:sof_da7219_mx98373" );MODULE_IMPORT_NS (SND_SOC_INTEL_HDA_DSP_COMMON );
sound/soc/intel/common/soc-acpi-intel-jsl-match.c +2 -2
@@ -37,7 +37,7 @@ static struct snd_soc_acpi_codecs mx98360a_spk = {struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { { .id ="DLGS7219" , - .drv_name ="sof_da7219_max98373" , + .drv_name ="sof_da7219_mx98373" , .sof_fw_filename ="sof-jsl.ri" , .sof_tplg_filename ="sof-jsl-da7219.tplg" , .machine_quirk = snd_soc_acpi_codec_list,
@@ -45,7 +45,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = { }, { .id = "DLGS7219", - .drv_name = "sof_da7219_max98360a", + .drv_name = "sof_da7219_mx98360a", .sof_fw_filename = "sof-jsl.ri", .sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg", },
Signature · 1 line
2.25.1
PATCH 8/9 ASoC: Intel: sof_sdw: fix signed/unsigned warning
In reply to Pierre-Louis BossartSparse throws the following warning:
sound/soc/intel/boards/sof_sdw.c:796:31: error: incorrect type in argument 6 (different signedness)sound/soc/intel/boards/sof_sdw.c:796:31: expected int *group_idsound/soc/intel/boards/sof_sdw.c:796:31: got unsigned int *
The group_id cannot be negative, use unsigned int.
--- sound/soc/intel/boards/sof_sdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/sof_sdw.c +1 -1
@@ -669,7 +669,7 @@ static int set_codec_init_func(const struct snd_soc_acpi_link_adr *link,*/ static int get_slave_info (const struct snd_soc_acpi_link_adr *adr_link,struct device *dev,int *cpu_dai_id,int *cpu_dai_num, -int *codec_num,int *group_id, +int *codec_num,unsigned int *group_id,bool *group_generated) {const struct snd_soc_acpi_adr_device *adr_d;
Signature · 1 line
2.25.1
PATCH 9/9 ASoC: Intel: soc-acpi: add ull suffix for SoundWire _ADR values
In reply to Pierre-Louis BossartSparse throws the following type of warnings:
sound/soc/intel/common/soc-acpi-intel-adl-match.c:34:24: error:
constant 0x000020025D071100 is so big it is long
Let's add the 'ull' suffix to make this go away and find real issues.
--- .../intel/common/soc-acpi-intel-adl-match.c | 24 ++++++------- .../intel/common/soc-acpi-intel-cml-match.c | 20 +++++------ .../intel/common/soc-acpi-intel-cnl-match.c | 2 +- .../intel/common/soc-acpi-intel-icl-match.c | 12 +++---- .../intel/common/soc-acpi-intel-tgl-match.c | 34 +++++++++---------- 5 files changed, 46 insertions(+), 46 deletions(-)
sound/soc/intel/common/soc-acpi-intel-adl-match.c +12 -12
@@ -31,7 +31,7 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { { - .adr =0x000020025D071100 , + .adr =0x000020025D071100ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -40,7 +40,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1308-1"
@@ -49,7 +49,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { { - .adr =0x000220025D130800 , + .adr =0x000220025D130800ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1308-2"
@@ -58,7 +58,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { { - .adr =0x000320025D071500 , + .adr =0x000320025D071500ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt715"
@@ -67,7 +67,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { { - .adr =0x000030025D071101 , + .adr =0x000030025D071101ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -76,7 +76,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { { - .adr =0x000131025D131601 ,/* unique ID is set for some reason */ + .adr =0x000131025D131601ull ,/* unique ID is set for some reason */ .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1316-1"
@@ -85,7 +85,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { { - .adr =0x000230025D131601 , + .adr =0x000230025D131601ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1316-2"
@@ -94,7 +94,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { { - .adr =0x000330025D131601 , + .adr =0x000330025D131601ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1316-2"
@@ -103,7 +103,7 @@ static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_2_single_adr[] = { { - .adr =0x000230025D131601 , + .adr =0x000230025D131601ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt1316-1"
@@ -112,7 +112,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_single_adr[] = {static const struct snd_soc_acpi_adr_device rt714_0_adr[] = { { - .adr =0x000030025D071401 , + .adr =0x000030025D071401ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt714"
@@ -121,7 +121,7 @@ static const struct snd_soc_acpi_adr_device rt714_0_adr[] = {static const struct snd_soc_acpi_adr_device rt714_2_adr[] = { { - .adr =0x000230025D071401 , + .adr =0x000230025D071401ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt714"
@@ -130,7 +130,7 @@ static const struct snd_soc_acpi_adr_device rt714_2_adr[] = {static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { { - .adr =0x000330025D071401 , + .adr =0x000330025D071401ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt714"
sound/soc/intel/common/soc-acpi-intel-cml-match.c +10 -10
@@ -108,7 +108,7 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {static const struct snd_soc_acpi_adr_device rt700_1_adr[] = { { - .adr =0x000110025D070000 , + .adr =0x000110025D070000ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt700"
@@ -126,7 +126,7 @@ static const struct snd_soc_acpi_link_adr cml_rvp[] = {static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { { - .adr =0x000020025D071100 , + .adr =0x000020025D071100ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -135,7 +135,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt1308-1"
@@ -144,7 +144,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1308-1"
@@ -153,7 +153,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { { - .adr =0x000220025D130800 , + .adr =0x000220025D130800ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1308-2"
@@ -162,7 +162,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { { - .adr =0x000320025D071500 , + .adr =0x000320025D071500ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt715"
@@ -171,7 +171,7 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { { - .adr =0x000030025D071101 , + .adr =0x000030025D071101ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -180,7 +180,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { { - .adr =0x000131025D131601 ,/* unique ID is set for some reason */ + .adr =0x000131025D131601ull ,/* unique ID is set for some reason */ .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1316-1"
@@ -189,7 +189,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { { - .adr =0x000230025D131601 , + .adr =0x000230025D131601ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1316-2"
@@ -198,7 +198,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { { - .adr =0x000330025D071401 , + .adr =0x000330025D071401ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt714"
sound/soc/intel/common/soc-acpi-intel-cnl-match.c +1 -1
@@ -36,7 +36,7 @@ static const struct snd_soc_acpi_endpoint single_endpoint = {static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = { { - .adr =0x000220025D568200 , + .adr =0x000220025D568200ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt5682"
sound/soc/intel/common/soc-acpi-intel-icl-match.c +6 -6
@@ -56,7 +56,7 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {static const struct snd_soc_acpi_adr_device rt700_0_adr[] = { { - .adr =0x000010025D070000 , + .adr =0x000010025D070000ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt700"
@@ -74,7 +74,7 @@ static const struct snd_soc_acpi_link_adr icl_rvp[] = {static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { { - .adr =0x000020025D071100 , + .adr =0x000020025D071100ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -83,7 +83,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt1308-1"
@@ -92,7 +92,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1308-1"
@@ -101,7 +101,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { { - .adr =0x000220025D130800 , + .adr =0x000220025D130800ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1308-2"
@@ -110,7 +110,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { { - .adr =0x000320025D071500 , + .adr =0x000320025D071500ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt715"
sound/soc/intel/common/soc-acpi-intel-tgl-match.c +17 -17
@@ -37,7 +37,7 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = {static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { { - .adr =0x000020025D071100 , + .adr =0x000020025D071100ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -46,7 +46,7 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {static const struct snd_soc_acpi_adr_device rt711_1_adr[] = { { - .adr =0x000120025D071100 , + .adr =0x000120025D071100ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -55,13 +55,13 @@ static const struct snd_soc_acpi_adr_device rt711_1_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1308-1" }, { - .adr =0x000122025D130800 , + .adr =0x000122025D130800ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1308-2"
@@ -70,7 +70,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt1308-1"
@@ -79,7 +79,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_2_single_adr[] = { { - .adr =0x000220025D130800 , + .adr =0x000220025D130800ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt1308-1"
@@ -88,7 +88,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_single_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = { { - .adr =0x000120025D130800 , + .adr =0x000120025D130800ull , .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1308-1"
@@ -97,7 +97,7 @@ static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = { { - .adr =0x000220025D130800 , + .adr =0x000220025D130800ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1308-2"
@@ -106,7 +106,7 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt715_0_adr[] = { { - .adr =0x000021025D071500 , + .adr =0x000021025D071500ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt715"
@@ -115,7 +115,7 @@ static const struct snd_soc_acpi_adr_device rt715_0_adr[] = {static const struct snd_soc_acpi_adr_device rt715_3_adr[] = { { - .adr =0x000320025D071500 , + .adr =0x000320025D071500ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt715"
@@ -124,13 +124,13 @@ static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = { { - .adr =0x000123019F837300 , + .adr =0x000123019F837300ull , .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="Right" }, { - .adr =0x000127019F837300 , + .adr =0x000127019F837300ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="Left"
@@ -139,7 +139,7 @@ static const struct snd_soc_acpi_adr_device mx8373_1_adr[] = {static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = { { - .adr =0x000021025D568200 , + .adr =0x000021025D568200ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt5682"
@@ -148,7 +148,7 @@ static const struct snd_soc_acpi_adr_device rt5682_0_adr[] = {static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { { - .adr =0x000030025D071101 , + .adr =0x000030025D071101ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt711"
@@ -157,7 +157,7 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = { { - .adr =0x000131025D131601 ,/* unique ID is set for some reason */ + .adr =0x000131025D131601ull ,/* unique ID is set for some reason */ .num_endpoints =1 , .endpoints = &spk_l_endpoint, .name_prefix ="rt1316-1"
@@ -166,7 +166,7 @@ static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { { - .adr =0x000230025D131601 , + .adr =0x000230025D131601ull , .num_endpoints =1 , .endpoints = &spk_r_endpoint, .name_prefix ="rt1316-2"
@@ -175,7 +175,7 @@ static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = {static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { { - .adr =0x000330025D071401 , + .adr =0x000330025D071401ull , .num_endpoints =1 , .endpoints = &single_endpoint, .name_prefix ="rt714"
Signature · 1 line
2.25.1
Mark Brown
maintainerQuoted 5 lines · Pierre-Louis Bossart
We updated our SOF CI settings last week (see below) to use more options for Sparse, and sure enough it detected one nasty single-character bug in one of my previous patches, along with more trivial issues with string/integer sizes and signed/unsigned confusions.
Quoted 8 lines
export ARCH=x86_64
export CF="-Wsparse-error -Wsparse-all -Wno-bitwise-pointer -Wno-pointer-arith -Wno-typesign -Wnoshadow" make -ksound/soc/sof/C=2
make -ksound/soc/intel/common/C=2
make -ksound/soc/intel/boards/C=2
make -kdrivers/soundwire/C=2[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/9] ASoC: SOF: Intel: hda: fix index used in inner loop
commit: ad839121dd4cece991b995a4bbe83fdeac45ccd0
[3/9] ASoC: Intel: sof_cs42l42: shrink platform id below 20 characters
commit: 48a7e6e5b2c90abf06c7c299f2ba94c7415bb8ea
[4/9] ASoC: Intel: bxt_da7219_max98357a: shrink platform_id below 20 characters
commit: 24e46fb811e991f56d5694b10ae7ceb8d2b8c846All 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