All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: brcm: fix dma_addr_t cast to pointer
@ 2020-04-08 18:55 ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-04-08 18:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arnd Bergmann, Kevin Li, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Florian Fainelli, bcm-kernel-feedback-list,
	Kuninori Morimoto, alsa-devel, linux-arm-kernel, linux-kernel

A dma_addr_t is not a pointer and a cast causes a warning when
the sizes are different:

sound/soc/bcm/bcm63xx-pcm-whistler.c: In function 'bcm63xx_pcm_pointer':
sound/soc/bcm/bcm63xx-pcm-whistler.c:184:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  184 |  if ((void *)prtd->dma_addr_next == NULL)

Change the comparison to NULL to an equivalent if() check that
does not warn.

Fixes: 88eb404ccc3e ("ASoC: brcm: Add DSL/PON SoC audio driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/bcm/bcm63xx-pcm-whistler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-pcm-whistler.c
index e46c390683e7..b7a1efc7406e 100644
--- a/sound/soc/bcm/bcm63xx-pcm-whistler.c
+++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c
@@ -181,7 +181,7 @@ bcm63xx_pcm_pointer(struct snd_soc_component *component,
 	snd_pcm_uframes_t x;
 	struct bcm63xx_runtime_data *prtd = substream->runtime->private_data;
 
-	if ((void *)prtd->dma_addr_next == NULL)
+	if (!prtd->dma_addr_next)
 		prtd->dma_addr_next = substream->runtime->dma_addr;
 
 	x = bytes_to_frames(substream->runtime,
-- 
2.26.0


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

* [PATCH] ASoC: brcm: fix dma_addr_t cast to pointer
@ 2020-04-08 18:55 ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-04-08 18:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Florian Fainelli, Kuninori Morimoto, Arnd Bergmann,
	linux-kernel, Takashi Iwai, Liam Girdwood, Kevin Li,
	bcm-kernel-feedback-list, linux-arm-kernel

A dma_addr_t is not a pointer and a cast causes a warning when
the sizes are different:

sound/soc/bcm/bcm63xx-pcm-whistler.c: In function 'bcm63xx_pcm_pointer':
sound/soc/bcm/bcm63xx-pcm-whistler.c:184:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  184 |  if ((void *)prtd->dma_addr_next == NULL)

Change the comparison to NULL to an equivalent if() check that
does not warn.

Fixes: 88eb404ccc3e ("ASoC: brcm: Add DSL/PON SoC audio driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/bcm/bcm63xx-pcm-whistler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-pcm-whistler.c
index e46c390683e7..b7a1efc7406e 100644
--- a/sound/soc/bcm/bcm63xx-pcm-whistler.c
+++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c
@@ -181,7 +181,7 @@ bcm63xx_pcm_pointer(struct snd_soc_component *component,
 	snd_pcm_uframes_t x;
 	struct bcm63xx_runtime_data *prtd = substream->runtime->private_data;
 
-	if ((void *)prtd->dma_addr_next == NULL)
+	if (!prtd->dma_addr_next)
 		prtd->dma_addr_next = substream->runtime->dma_addr;
 
 	x = bytes_to_frames(substream->runtime,
-- 
2.26.0


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

* [PATCH] ASoC: brcm: fix dma_addr_t cast to pointer
@ 2020-04-08 18:55 ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-04-08 18:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Florian Fainelli, Kuninori Morimoto, Arnd Bergmann,
	linux-kernel, Takashi Iwai, Liam Girdwood, Kevin Li,
	bcm-kernel-feedback-list, Jaroslav Kysela, linux-arm-kernel

A dma_addr_t is not a pointer and a cast causes a warning when
the sizes are different:

sound/soc/bcm/bcm63xx-pcm-whistler.c: In function 'bcm63xx_pcm_pointer':
sound/soc/bcm/bcm63xx-pcm-whistler.c:184:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  184 |  if ((void *)prtd->dma_addr_next == NULL)

Change the comparison to NULL to an equivalent if() check that
does not warn.

Fixes: 88eb404ccc3e ("ASoC: brcm: Add DSL/PON SoC audio driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/bcm/bcm63xx-pcm-whistler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-pcm-whistler.c
index e46c390683e7..b7a1efc7406e 100644
--- a/sound/soc/bcm/bcm63xx-pcm-whistler.c
+++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c
@@ -181,7 +181,7 @@ bcm63xx_pcm_pointer(struct snd_soc_component *component,
 	snd_pcm_uframes_t x;
 	struct bcm63xx_runtime_data *prtd = substream->runtime->private_data;
 
-	if ((void *)prtd->dma_addr_next == NULL)
+	if (!prtd->dma_addr_next)
 		prtd->dma_addr_next = substream->runtime->dma_addr;
 
 	x = bytes_to_frames(substream->runtime,
-- 
2.26.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-04-08 18:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 18:55 [PATCH] ASoC: brcm: fix dma_addr_t cast to pointer Arnd Bergmann
2020-04-08 18:55 ` Arnd Bergmann
2020-04-08 18:55 ` Arnd Bergmann

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.