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>
This commit is contained in:
committed by
Takashi Iwai
parent
88b27fdac8
commit
fea952e5cc
@ -190,9 +190,10 @@ static int snd_mixer_oss_get_recsrc(struct snd_mixer_oss_file *fmixer)
|
||||
return -EIO;
|
||||
if (mixer->put_recsrc && mixer->get_recsrc) { /* exclusive */
|
||||
int err;
|
||||
if ((err = mixer->get_recsrc(fmixer, &result)) < 0)
|
||||
unsigned int index;
|
||||
if ((err = mixer->get_recsrc(fmixer, &index)) < 0)
|
||||
return err;
|
||||
result = 1 << result;
|
||||
result = 1 << index;
|
||||
} else {
|
||||
struct snd_mixer_oss_slot *pslot;
|
||||
int chn;
|
||||
@ -214,6 +215,7 @@ static int snd_mixer_oss_set_recsrc(struct snd_mixer_oss_file *fmixer, int recsr
|
||||
struct snd_mixer_oss *mixer = fmixer->mixer;
|
||||
struct snd_mixer_oss_slot *pslot;
|
||||
int chn, active;
|
||||
unsigned int index;
|
||||
int result = 0;
|
||||
|
||||
if (mixer == NULL)
|
||||
@ -222,8 +224,8 @@ static int snd_mixer_oss_set_recsrc(struct snd_mixer_oss_file *fmixer, int recsr
|
||||
if (recsrc & ~mixer->oss_recsrc)
|
||||
recsrc &= ~mixer->oss_recsrc;
|
||||
mixer->put_recsrc(fmixer, ffz(~recsrc));
|
||||
mixer->get_recsrc(fmixer, &result);
|
||||
result = 1 << result;
|
||||
mixer->get_recsrc(fmixer, &index);
|
||||
result = 1 << index;
|
||||
}
|
||||
for (chn = 0; chn < 31; chn++) {
|
||||
pslot = &mixer->slots[chn];
|
||||
|
Reference in New Issue
Block a user