Эх сурвалжийг харах

ALSA: emux - Add missing KERN_* prefix to printk

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 16 жил өмнө
parent
commit
42b0158bdb

+ 1 - 1
sound/synth/emux/emux_oss.c

@@ -132,7 +132,7 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
 	p = snd_emux_create_port(emu, tmpname, 32,
 	p = snd_emux_create_port(emu, tmpname, 32,
 				 1, &callback);
 				 1, &callback);
 	if (p == NULL) {
 	if (p == NULL) {
-		snd_printk("can't create port\n");
+		snd_printk(KERN_ERR "can't create port\n");
 		snd_emux_dec_count(emu);
 		snd_emux_dec_count(emu);
 		mutex_unlock(&emu->register_mutex);
 		mutex_unlock(&emu->register_mutex);
 		return -ENOMEM;
 		return -ENOMEM;

+ 8 - 8
sound/synth/emux/emux_seq.c

@@ -74,15 +74,15 @@ snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
 	emu->client = snd_seq_create_kernel_client(card, index,
 	emu->client = snd_seq_create_kernel_client(card, index,
 						   "%s WaveTable", emu->name);
 						   "%s WaveTable", emu->name);
 	if (emu->client < 0) {
 	if (emu->client < 0) {
-		snd_printk("can't create client\n");
+		snd_printk(KERN_ERR "can't create client\n");
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
 	if (emu->num_ports < 0) {
 	if (emu->num_ports < 0) {
-		snd_printk("seqports must be greater than zero\n");
+		snd_printk(KERN_WARNING "seqports must be greater than zero\n");
 		emu->num_ports = 1;
 		emu->num_ports = 1;
 	} else if (emu->num_ports >= SNDRV_EMUX_MAX_PORTS) {
 	} else if (emu->num_ports >= SNDRV_EMUX_MAX_PORTS) {
-		snd_printk("too many ports."
+		snd_printk(KERN_WARNING "too many ports."
 			   "limited max. ports %d\n", SNDRV_EMUX_MAX_PORTS);
 			   "limited max. ports %d\n", SNDRV_EMUX_MAX_PORTS);
 		emu->num_ports = SNDRV_EMUX_MAX_PORTS;
 		emu->num_ports = SNDRV_EMUX_MAX_PORTS;
 	}
 	}
@@ -100,7 +100,7 @@ snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index)
 		p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS,
 		p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS,
 					 0, &pinfo);
 					 0, &pinfo);
 		if (p == NULL) {
 		if (p == NULL) {
-			snd_printk("can't create port\n");
+			snd_printk(KERN_ERR "can't create port\n");
 			return -ENOMEM;
 			return -ENOMEM;
 		}
 		}
 
 
@@ -147,12 +147,12 @@ snd_emux_create_port(struct snd_emux *emu, char *name,
 
 
 	/* Allocate structures for this channel */
 	/* Allocate structures for this channel */
 	if ((p = kzalloc(sizeof(*p), GFP_KERNEL)) == NULL) {
 	if ((p = kzalloc(sizeof(*p), GFP_KERNEL)) == NULL) {
-		snd_printk("no memory\n");
+		snd_printk(KERN_ERR "no memory\n");
 		return NULL;
 		return NULL;
 	}
 	}
 	p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL);
 	p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL);
 	if (p->chset.channels == NULL) {
 	if (p->chset.channels == NULL) {
-		snd_printk("no memory\n");
+		snd_printk(KERN_ERR "no memory\n");
 		kfree(p);
 		kfree(p);
 		return NULL;
 		return NULL;
 	}
 	}
@@ -376,12 +376,12 @@ int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card)
 			goto __error;
 			goto __error;
 		}
 		}
 		emu->vmidi[i] = rmidi;
 		emu->vmidi[i] = rmidi;
-		//snd_printk("virmidi %d ok\n", i);
+		/* snd_printk(KERN_DEBUG "virmidi %d ok\n", i); */
 	}
 	}
 	return 0;
 	return 0;
 
 
 __error:
 __error:
-	//snd_printk("error init..\n");
+	/* snd_printk(KERN_DEBUG "error init..\n"); */
 	snd_emux_delete_virmidi(emu);
 	snd_emux_delete_virmidi(emu);
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }

+ 4 - 2
sound/synth/emux/emux_synth.c

@@ -956,7 +956,8 @@ void snd_emux_lock_voice(struct snd_emux *emu, int voice)
 	if (emu->voices[voice].state == SNDRV_EMUX_ST_OFF)
 	if (emu->voices[voice].state == SNDRV_EMUX_ST_OFF)
 		emu->voices[voice].state = SNDRV_EMUX_ST_LOCKED;
 		emu->voices[voice].state = SNDRV_EMUX_ST_LOCKED;
 	else
 	else
-		snd_printk("invalid voice for lock %d (state = %x)\n",
+		snd_printk(KERN_WARNING
+			   "invalid voice for lock %d (state = %x)\n",
 			   voice, emu->voices[voice].state);
 			   voice, emu->voices[voice].state);
 	spin_unlock_irqrestore(&emu->voice_lock, flags);
 	spin_unlock_irqrestore(&emu->voice_lock, flags);
 }
 }
@@ -973,7 +974,8 @@ void snd_emux_unlock_voice(struct snd_emux *emu, int voice)
 	if (emu->voices[voice].state == SNDRV_EMUX_ST_LOCKED)
 	if (emu->voices[voice].state == SNDRV_EMUX_ST_LOCKED)
 		emu->voices[voice].state = SNDRV_EMUX_ST_OFF;
 		emu->voices[voice].state = SNDRV_EMUX_ST_OFF;
 	else
 	else
-		snd_printk("invalid voice for unlock %d (state = %x)\n",
+		snd_printk(KERN_WARNING
+			   "invalid voice for unlock %d (state = %x)\n",
 			   voice, emu->voices[voice].state);
 			   voice, emu->voices[voice].state);
 	spin_unlock_irqrestore(&emu->voice_lock, flags);
 	spin_unlock_irqrestore(&emu->voice_lock, flags);
 }
 }

+ 17 - 11
sound/synth/emux/soundfont.c

@@ -133,7 +133,7 @@ snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
 	int  rc;
 	int  rc;
 
 
 	if (count < (long)sizeof(patch)) {
 	if (count < (long)sizeof(patch)) {
-		snd_printk("patch record too small %ld\n", count);
+		snd_printk(KERN_ERR "patch record too small %ld\n", count);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (copy_from_user(&patch, data, sizeof(patch)))
 	if (copy_from_user(&patch, data, sizeof(patch)))
@@ -143,15 +143,16 @@ snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
 	data += sizeof(patch);
 	data += sizeof(patch);
 
 
 	if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) {
 	if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) {
-		snd_printk("'The wrong kind of patch' %x\n", patch.key);
+		snd_printk(KERN_ERR "The wrong kind of patch %x\n", patch.key);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (count < patch.len) {
 	if (count < patch.len) {
-		snd_printk("Patch too short %ld, need %d\n", count, patch.len);
+		snd_printk(KERN_ERR "Patch too short %ld, need %d\n",
+			   count, patch.len);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (patch.len < 0) {
 	if (patch.len < 0) {
-		snd_printk("poor length %d\n", patch.len);
+		snd_printk(KERN_ERR "poor length %d\n", patch.len);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -195,7 +196,8 @@ snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
 	case SNDRV_SFNT_REMOVE_INFO:
 	case SNDRV_SFNT_REMOVE_INFO:
 		/* patch must be opened */
 		/* patch must be opened */
 		if (!sflist->currsf) {
 		if (!sflist->currsf) {
-			snd_printk("soundfont: remove_info: patch not opened\n");
+			snd_printk(KERN_ERR "soundfont: remove_info: "
+				   "patch not opened\n");
 			rc = -EINVAL;
 			rc = -EINVAL;
 		} else {
 		} else {
 			int bank, instr;
 			int bank, instr;
@@ -531,7 +533,7 @@ load_info(struct snd_sf_list *sflist, const void __user *data, long count)
 		return -EINVAL;
 		return -EINVAL;
 
 
 	if (count < (long)sizeof(hdr)) {
 	if (count < (long)sizeof(hdr)) {
-		printk("Soundfont error: invalid patch zone length\n");
+		printk(KERN_ERR "Soundfont error: invalid patch zone length\n");
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (copy_from_user((char*)&hdr, data, sizeof(hdr)))
 	if (copy_from_user((char*)&hdr, data, sizeof(hdr)))
@@ -541,12 +543,14 @@ load_info(struct snd_sf_list *sflist, const void __user *data, long count)
 	count -= sizeof(hdr);
 	count -= sizeof(hdr);
 
 
 	if (hdr.nvoices <= 0 || hdr.nvoices >= 100) {
 	if (hdr.nvoices <= 0 || hdr.nvoices >= 100) {
-		printk("Soundfont error: Illegal voice number %d\n", hdr.nvoices);
+		printk(KERN_ERR "Soundfont error: Illegal voice number %d\n",
+		       hdr.nvoices);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	if (count < (long)sizeof(struct soundfont_voice_info) * hdr.nvoices) {
 	if (count < (long)sizeof(struct soundfont_voice_info) * hdr.nvoices) {
-		printk("Soundfont Error: patch length(%ld) is smaller than nvoices(%d)\n",
+		printk(KERN_ERR "Soundfont Error: "
+		       "patch length(%ld) is smaller than nvoices(%d)\n",
 		       count, hdr.nvoices);
 		       count, hdr.nvoices);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
@@ -952,7 +956,7 @@ load_guspatch(struct snd_sf_list *sflist, const char __user *data,
 	int rc;
 	int rc;
 
 
 	if (count < (long)sizeof(patch)) {
 	if (count < (long)sizeof(patch)) {
-		snd_printk("patch record too small %ld\n", count);
+		snd_printk(KERN_ERR "patch record too small %ld\n", count);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (copy_from_user(&patch, data, sizeof(patch)))
 	if (copy_from_user(&patch, data, sizeof(patch)))
@@ -1034,7 +1038,8 @@ load_guspatch(struct snd_sf_list *sflist, const char __user *data,
 	/* panning position; -128 - 127 => 0-127 */
 	/* panning position; -128 - 127 => 0-127 */
 	zone->v.pan = (patch.panning + 128) / 2;
 	zone->v.pan = (patch.panning + 128) / 2;
 #if 0
 #if 0
-	snd_printk("gus: basefrq=%d (ofs=%d) root=%d,tune=%d, range:%d-%d\n",
+	snd_printk(KERN_DEBUG
+		   "gus: basefrq=%d (ofs=%d) root=%d,tune=%d, range:%d-%d\n",
 		   (int)patch.base_freq, zone->v.rate_offset,
 		   (int)patch.base_freq, zone->v.rate_offset,
 		   zone->v.root, zone->v.tune, zone->v.low, zone->v.high);
 		   zone->v.root, zone->v.tune, zone->v.low, zone->v.high);
 #endif
 #endif
@@ -1068,7 +1073,8 @@ load_guspatch(struct snd_sf_list *sflist, const char __user *data,
 		zone->v.parm.volrelease = 0x8000 | snd_sf_calc_parm_decay(release);
 		zone->v.parm.volrelease = 0x8000 | snd_sf_calc_parm_decay(release);
 		zone->v.attenuation = calc_gus_attenuation(patch.env_offset[0]);
 		zone->v.attenuation = calc_gus_attenuation(patch.env_offset[0]);
 #if 0
 #if 0
-		snd_printk("gus: atkhld=%x, dcysus=%x, volrel=%x, att=%d\n",
+		snd_printk(KERN_DEBUG
+			   "gus: atkhld=%x, dcysus=%x, volrel=%x, att=%d\n",
 			   zone->v.parm.volatkhld,
 			   zone->v.parm.volatkhld,
 			   zone->v.parm.voldcysus,
 			   zone->v.parm.voldcysus,
 			   zone->v.parm.volrelease,
 			   zone->v.parm.volrelease,