All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: bytcht_es8316: fix cast warning
@ 2019-04-24 11:41 Anders Roxell
  2019-04-24 23:13 ` [alsa-devel] " Pierre-Louis Bossart
  0 siblings, 1 reply; 3+ messages in thread
From: Anders Roxell @ 2019-04-24 11:41 UTC (permalink / raw)
  To: pierre-louis.bossart, liam.r.girdwood, yang.jie, broonie, perex, tiwai
  Cc: alsa-devel, linux-kernel, 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")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 sound/soc/intel/boards/bytcht_es8316.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 38975827e276..68136ba1519e 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -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 */
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: Intel: bytcht_es8316: fix cast warning
  2019-04-24 11:41 [PATCH] ASoC: Intel: bytcht_es8316: fix cast warning Anders Roxell
@ 2019-04-24 23:13 ` Pierre-Louis Bossart
  2019-04-25  7:08   ` Anders Roxell
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Louis Bossart @ 2019-04-24 23:13 UTC (permalink / raw)
  To: Anders Roxell, liam.r.girdwood, yang.jie, broonie, perex, tiwai
  Cc: alsa-devel, linux-kernel

On 4/24/19 6:41 AM, Anders Roxell wrote:
> 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")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: Intel: bytcht_es8316: fix cast warning
  2019-04-24 23:13 ` [alsa-devel] " Pierre-Louis Bossart
@ 2019-04-25  7:08   ` Anders Roxell
  0 siblings, 0 replies; 3+ messages in thread
From: Anders Roxell @ 2019-04-25  7:08 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: liam.r.girdwood, yang.jie, Mark Brown, perex, tiwai, alsa-devel,
	Linux Kernel Mailing List

On Thu, 25 Apr 2019 at 01:13, Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
> On 4/24/19 6:41 AM, Anders Roxell wrote:
> > 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")
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-25  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 11:41 [PATCH] ASoC: Intel: bytcht_es8316: fix cast warning Anders Roxell
2019-04-24 23:13 ` [alsa-devel] " Pierre-Louis Bossart
2019-04-25  7:08   ` Anders Roxell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.