Skip to contentSkip to conversation

ASoC: Intel: bytcht_es8316: fix cast warning

PATCH In review Anders Roxell 2 participants 3 messages Apr 24, 2019 – Apr 25, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: bytcht_es8316: fix cast warning

When building bytcht_es8316 the following warning shows up:

../sound/soc/intel/boards/bytcht_es8316.c: In function ‘snd_byt_cht_es8316_mc_probe’:
../sound/soc/intel/boards/bytcht_es8316.c:508:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

   quirk = (int)dmi_id->driver_data;
           ^

Rework to use uintptr_t instead of int.

Fixes a8d218f4fe81 ("ASoC: Intel: bytcht_es8316: Add quirk for the Teclast X98+ II")
---
 sound/soc/intel/boards/bytcht_es8316.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/bytcht_es8316.c +1 -1
index 38975827e276..68136ba1519e 100644
@@ -505,7 +505,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
 	/* Check for BYTCR or other platform and setup quirks */
 	dmi_id = dmi_first_match(byt_cht_es8316_quirk_table);
 	if (dmi_id) {
-		quirk = (int)dmi_id->driver_data;
+		quirk = (uintptr_t)dmi_id->driver_data;
 	} else if (x86_match_cpu(baytrail_cpu_ids) &&
 	    mach->mach_params.acpi_ipc_irq_index == 0) {
 		/* On BYTCR default to SSP0, internal-mic-in2-map, mono-spk */
Signature · 1 line
2.20.1
#1 lore raw
Quoted 11 lines · Anders Roxell

When building bytcht_es8316 the following warning shows up:

../sound/soc/intel/boards/bytcht_es8316.c: In function ‘snd_byt_cht_es8316_mc_probe’:
../sound/soc/intel/boards/bytcht_es8316.c:508:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

    quirk = (int)dmi_id->driver_data;
            ^

Rework to use uintptr_t instead of int.

Fixes a8d218f4fe81 ("ASoC: Intel: bytcht_es8316: Add quirk for the Teclast X98+ II")

I submitted an alternate fix last Friday to alsa-devel, along with 2 additional patches to handle the quirk_override in the same way between machine drivers.

#2 lore raw
Quoted 9 lines · Pierre-Louis Bossart
Quoted 7 lines · Anders Roxell

When building bytcht_es8316 the following warning shows up:

../sound/soc/intel/boards/bytcht_es8316.c: In function ‘snd_byt_cht_es8316_mc_probe’:
../sound/soc/intel/boards/bytcht_es8316.c:508:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

    quirk = (int)dmi_id->driver_data;
            ^
Quoted 8 lines
Quoted 4 lines

Rework to use uintptr_t instead of int.

Fixes a8d218f4fe81 ("ASoC: Intel: bytcht_es8316: Add quirk for the Teclast X98+ II")

I submitted an alternate fix last Friday to alsa-devel, along with 2 additional patches to handle the quirk_override in the same way between machine drivers.

OK, yes your patch address the problem.

Cheers,
Anders