From 019d80db5727707faa2108fcd4fbbfac9defb3a6 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 29 Jan 2013 12:56:26 +0100 Subject: ALSA: Force a cast to silence a warning from "sparse" Some audio drivers are calling snd_dma_continuous_data(GFP_KERNEL) which makes "sparse" give a warning: $ make C=2 M=sound/usb modules ... sound/usb/6fire/pcm.c:625:25: warning: cast from restricted gfp_t sound/usb/caiaq/audio.c:845:41: warning: cast from restricted gfp_t sound/usb/usx2y/usbusx2yaudio.c:997:54: warning: cast from restricted gfp_t sound/usb/usx2y/usbusx2yaudio.c:1001:54: warning: cast from restricted gfp_t sound/usb/usx2y/usx2yhwdeppcm.c:774:54: warning: cast from restricted gfp_t sound/usb/usx2y/usx2yhwdeppcm.c:778:54: warning: cast from restricted gfp_t Add __force to the cast to silence the warning. Signed-off-by: Antonio Ospite Signed-off-by: Takashi Iwai --- include/sound/memalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 844af65..cf15b821 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -37,7 +37,7 @@ struct snd_dma_device { #ifndef snd_dma_pci_data #define snd_dma_pci_data(pci) (&(pci)->dev) #define snd_dma_isa_data() NULL -#define snd_dma_continuous_data(x) ((struct device *)(unsigned long)(x)) +#define snd_dma_continuous_data(x) ((struct device *)(__force unsigned long)(x)) #endif -- cgit v1.1