Merge branch 'linus'
[powerpc.git] / sound / pci / rme9652 / hdspm.c
index 3dec616..980b9cd 100644 (file)
@@ -474,7 +474,7 @@ static inline unsigned int hdspm_read(struct hdspm * hdspm, unsigned int reg)
 static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan,
                                     unsigned int in)
 {
-       if (chan > HDSPM_MIXER_CHANNELS || in > HDSPM_MIXER_CHANNELS)
+       if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS)
                return 0;
 
        return hdspm->mixer->ch[chan].in[in];
@@ -483,7 +483,7 @@ static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan,
 static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan,
                                     unsigned int pb)
 {
-       if (chan > HDSPM_MIXER_CHANNELS || pb > HDSPM_MIXER_CHANNELS)
+       if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS)
                return 0;
        return hdspm->mixer->ch[chan].pb[pb];
 }
@@ -3324,11 +3324,11 @@ static int __devinit snd_hdspm_preallocate_memory(struct hdspm * hdspm)
                                                   snd_dma_pci_data(hdspm->pci),
                                                   wanted,
                                                   wanted)) < 0) {
-               snd_printdd("Could not preallocate % Bytes\n", wanted);
+               snd_printdd("Could not preallocate %zd Bytes\n", wanted);
 
                return err;
        } else
-               snd_printdd(" Preallocated % Bytes\n", wanted);
+               snd_printdd(" Preallocated %zd Bytes\n", wanted);
 
        return 0;
 }
@@ -3510,7 +3510,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp
 
        hdspm->monitor_outs = enable_monitor;
 
-       snd_printdd("kmalloc Mixer memory of %d Bytes\n",
+       snd_printdd("kmalloc Mixer memory of %zd Bytes\n",
                   sizeof(struct hdspm_mixer));
        if ((hdspm->mixer = kmalloc(sizeof(struct hdspm_mixer), GFP_KERNEL))
            == NULL) {