diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-02-14 11:00:47 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-14 17:10:11 +0100 |
commit | fea952e5cc23ea94b4677ca20774cdc3cea014e2 (patch) | |
tree | 0a5fac1e830e7f5eba9d52431088b1481c86eeb8 /sound/core/pcm.c | |
parent | 88b27fdac814c4926175ff0e740f98343ad77491 (diff) | |
download | kernel-common-fea952e5cc23ea94b4677ca20774cdc3cea014e2.tar.gz kernel-common-fea952e5cc23ea94b4677ca20774cdc3cea014e2.tar.bz2 kernel-common-fea952e5cc23ea94b4677ca20774cdc3cea014e2.zip |
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/pcm.c')
-rw-r--r-- | sound/core/pcm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 6b4b1287b314..ee9abb2d9001 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -211,9 +211,9 @@ static char *snd_pcm_format_names[] = { const char *snd_pcm_format_name(snd_pcm_format_t format) { - if (format >= ARRAY_SIZE(snd_pcm_format_names)) + if ((__force unsigned int)format >= ARRAY_SIZE(snd_pcm_format_names)) return "Unknown"; - return snd_pcm_format_names[format]; + return snd_pcm_format_names[(__force unsigned int)format]; } EXPORT_SYMBOL_GPL(snd_pcm_format_name); @@ -269,12 +269,12 @@ static const char *snd_pcm_stream_name(int stream) static const char *snd_pcm_access_name(snd_pcm_access_t access) { - return snd_pcm_access_names[access]; + return snd_pcm_access_names[(__force int)access]; } static const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat) { - return snd_pcm_subformat_names[subformat]; + return snd_pcm_subformat_names[(__force int)subformat]; } static const char *snd_pcm_tstamp_mode_name(int mode) @@ -284,7 +284,7 @@ static const char *snd_pcm_tstamp_mode_name(int mode) static const char *snd_pcm_state_name(snd_pcm_state_t state) { - return snd_pcm_state_names[state]; + return snd_pcm_state_names[(__force int)state]; } #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |