aboutsummaryrefslogtreecommitdiff
path: root/sound/core/oss/linear.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-02-14 11:00:47 +0100
committerTakashi Iwai <tiwai@suse.de>2011-02-14 17:10:11 +0100
commitfea952e5cc23ea94b4677ca20774cdc3cea014e2 (patch)
tree0a5fac1e830e7f5eba9d52431088b1481c86eeb8 /sound/core/oss/linear.c
parent88b27fdac814c4926175ff0e740f98343ad77491 (diff)
ALSA: core: sparse cleanups
Change the core code where sparse complains. In most cases, this means just adding annotations to confirm that we indeed want to do the dirty things we're doing. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/oss/linear.c')
-rw-r--r--sound/core/oss/linear.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/oss/linear.c b/sound/core/oss/linear.c
index 4c1d1682719..13b3f6f49fa 100644
--- a/sound/core/oss/linear.c
+++ b/sound/core/oss/linear.c
@@ -114,7 +114,8 @@ static snd_pcm_sframes_t linear_transfer(struct snd_pcm_plugin *plugin,
return frames;
}
-static void init_data(struct linear_priv *data, int src_format, int dst_format)
+static void init_data(struct linear_priv *data,
+ snd_pcm_format_t src_format, snd_pcm_format_t dst_format)
{
int src_le, dst_le, src_bytes, dst_bytes;
@@ -140,9 +141,9 @@ static void init_data(struct linear_priv *data, int src_format, int dst_format)
if (snd_pcm_format_signed(src_format) !=
snd_pcm_format_signed(dst_format)) {
if (dst_le)
- data->flip = cpu_to_le32(0x80000000);
+ data->flip = (__force u32)cpu_to_le32(0x80000000);
else
- data->flip = cpu_to_be32(0x80000000);
+ data->flip = (__force u32)cpu_to_be32(0x80000000);
}
}