aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-04-04 12:09:08 -0400
committerTakashi Iwai <tiwai@suse.de>2014-04-04 12:20:10 -0400
commit3af5d0524aac70a6df638d6558f4b60dbf0216e7 (patch)
tree9979437b11678a58498634e1400cf15a4c7cef56 /sound
parent6ea0cae73d3b5ee963bea9348220b61fd8960743 (diff)
sound/oss: Remove uncompilable DBG macro use
Most of it duplicates function tracing and one of them has an uncompilable printf %P use. Others have format/argument mismatches. Remove unused DBG1 macro definition Neaten uart401.c use of ok test around this DBG macro removal. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/ad1848.c4
-rw-r--r--sound/oss/opl3.c3
-rw-r--r--sound/oss/pas2_mixer.c9
-rw-r--r--sound/oss/pas2_pcm.c18
-rw-r--r--sound/oss/sb_common.c4
-rw-r--r--sound/oss/sb_ess.c4
-rw-r--r--sound/oss/sequencer.c6
-rw-r--r--sound/oss/sound_config.h4
-rw-r--r--sound/oss/soundcard.c6
-rw-r--r--sound/oss/uart401.c11
10 files changed, 2 insertions, 67 deletions
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index 4918b7145b73..ec1ee07df59d 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -50,8 +50,6 @@
50#include <linux/pnp.h> 50#include <linux/pnp.h>
51#include <linux/spinlock.h> 51#include <linux/spinlock.h>
52 52
53#define DEB(x)
54#define DEB1(x)
55#include "sound_config.h" 53#include "sound_config.h"
56 54
57#include "ad1848.h" 55#include "ad1848.h"
@@ -1016,8 +1014,6 @@ static void ad1848_close(int dev)
1016 ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; 1014 ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc;
1017 ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc; 1015 ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc;
1018 1016
1019 DEB(printk("ad1848_close(void)\n"));
1020
1021 devc->intr_active = 0; 1017 devc->intr_active = 0;
1022 ad1848_halt(dev); 1018 ad1848_halt(dev);
1023 1019
diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c
index c5c24409ceb0..4709e592e2cc 100644
--- a/sound/oss/opl3.c
+++ b/sound/oss/opl3.c
@@ -275,7 +275,6 @@ static int opl3_kill_note (int devno, int voice, int note, int velocity)
275 devc->v_alloc->map[voice] = 0; 275 devc->v_alloc->map[voice] = 0;
276 276
277 map = &pv_map[devc->lv_map[voice]]; 277 map = &pv_map[devc->lv_map[voice]];
278 DEB(printk("Kill note %d\n", voice));
279 278
280 if (map->voice_mode == 0) 279 if (map->voice_mode == 0)
281 return 0; 280 return 0;
@@ -873,8 +872,6 @@ static void opl3_aftertouch(int dev, int voice, int pressure)
873 872
874 map = &pv_map[devc->lv_map[voice]]; 873 map = &pv_map[devc->lv_map[voice]];
875 874
876 DEB(printk("Aftertouch %d\n", voice));
877
878 if (map->voice_mode == 0) 875 if (map->voice_mode == 0)
879 return; 876 return;
880 877
diff --git a/sound/oss/pas2_mixer.c b/sound/oss/pas2_mixer.c
index a0bcb85c3904..50b5bd501247 100644
--- a/sound/oss/pas2_mixer.c
+++ b/sound/oss/pas2_mixer.c
@@ -21,10 +21,6 @@
21 21
22#include "pas2.h" 22#include "pas2.h"
23 23
24#ifndef DEB
25#define DEB(what) /* (what) */
26#endif
27
28extern int pas_translate_code; 24extern int pas_translate_code;
29extern char pas_model; 25extern char pas_model;
30extern int *pas_osp; 26extern int *pas_osp;
@@ -120,8 +116,6 @@ pas_mixer_set(int whichDev, unsigned int level)
120{ 116{
121 int left, right, devmask, changed, i, mixer = 0; 117 int left, right, devmask, changed, i, mixer = 0;
122 118
123 DEB(printk("static int pas_mixer_set(int whichDev = %d, unsigned int level = %X)\n", whichDev, level));
124
125 left = level & 0x7f; 119 left = level & 0x7f;
126 right = (level & 0x7f00) >> 8; 120 right = (level & 0x7f00) >> 8;
127 121
@@ -207,8 +201,6 @@ pas_mixer_reset(void)
207{ 201{
208 int foo; 202 int foo;
209 203
210 DEB(printk("pas2_mixer.c: void pas_mixer_reset(void)\n"));
211
212 for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) 204 for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++)
213 pas_mixer_set(foo, levels[foo]); 205 pas_mixer_set(foo, levels[foo]);
214 206
@@ -220,7 +212,6 @@ static int pas_mixer_ioctl(int dev, unsigned int cmd, void __user *arg)
220 int level,v ; 212 int level,v ;
221 int __user *p = (int __user *)arg; 213 int __user *p = (int __user *)arg;
222 214
223 DEB(printk("pas2_mixer.c: int pas_mixer_ioctl(unsigned int cmd = %X, unsigned int arg = %X)\n", cmd, arg));
224 if (cmd == SOUND_MIXER_PRIVATE1) { /* Set loudness bit */ 215 if (cmd == SOUND_MIXER_PRIVATE1) { /* Set loudness bit */
225 if (get_user(level, p)) 216 if (get_user(level, p))
226 return -EFAULT; 217 return -EFAULT;
diff --git a/sound/oss/pas2_pcm.c b/sound/oss/pas2_pcm.c
index 6f13ab4afc6b..474803b52f7d 100644
--- a/sound/oss/pas2_pcm.c
+++ b/sound/oss/pas2_pcm.c
@@ -22,10 +22,6 @@
22 22
23#include "pas2.h" 23#include "pas2.h"
24 24
25#ifndef DEB
26#define DEB(WHAT)
27#endif
28
29#define PAS_PCM_INTRBITS (0x08) 25#define PAS_PCM_INTRBITS (0x08)
30/* 26/*
31 * Sample buffer timer interrupt enable 27 * Sample buffer timer interrupt enable
@@ -156,8 +152,6 @@ static int pas_audio_ioctl(int dev, unsigned int cmd, void __user *arg)
156 int val, ret; 152 int val, ret;
157 int __user *p = arg; 153 int __user *p = arg;
158 154
159 DEB(printk("pas2_pcm.c: static int pas_audio_ioctl(unsigned int cmd = %X, unsigned int arg = %X)\n", cmd, arg));
160
161 switch (cmd) 155 switch (cmd)
162 { 156 {
163 case SOUND_PCM_WRITE_RATE: 157 case SOUND_PCM_WRITE_RATE:
@@ -204,8 +198,6 @@ static int pas_audio_ioctl(int dev, unsigned int cmd, void __user *arg)
204 198
205static void pas_audio_reset(int dev) 199static void pas_audio_reset(int dev)
206{ 200{
207 DEB(printk("pas2_pcm.c: static void pas_audio_reset(void)\n"));
208
209 pas_write(pas_read(0xF8A) & ~0x40, 0xF8A); /* Disable PCM */ 201 pas_write(pas_read(0xF8A) & ~0x40, 0xF8A); /* Disable PCM */
210} 202}
211 203
@@ -214,8 +206,6 @@ static int pas_audio_open(int dev, int mode)
214 int err; 206 int err;
215 unsigned long flags; 207 unsigned long flags;
216 208
217 DEB(printk("pas2_pcm.c: static int pas_audio_open(int mode = %X)\n", mode));
218
219 spin_lock_irqsave(&pas_lock, flags); 209 spin_lock_irqsave(&pas_lock, flags);
220 if (pcm_busy) 210 if (pcm_busy)
221 { 211 {
@@ -239,8 +229,6 @@ static void pas_audio_close(int dev)
239{ 229{
240 unsigned long flags; 230 unsigned long flags;
241 231
242 DEB(printk("pas2_pcm.c: static void pas_audio_close(void)\n"));
243
244 spin_lock_irqsave(&pas_lock, flags); 232 spin_lock_irqsave(&pas_lock, flags);
245 233
246 pas_audio_reset(dev); 234 pas_audio_reset(dev);
@@ -256,8 +244,6 @@ static void pas_audio_output_block(int dev, unsigned long buf, int count,
256{ 244{
257 unsigned long flags, cnt; 245 unsigned long flags, cnt;
258 246
259 DEB(printk("pas2_pcm.c: static void pas_audio_output_block(char *buf = %P, int count = %X)\n", buf, count));
260
261 cnt = count; 247 cnt = count;
262 if (audio_devs[dev]->dmap_out->dma > 3) 248 if (audio_devs[dev]->dmap_out->dma > 3)
263 cnt >>= 1; 249 cnt >>= 1;
@@ -303,8 +289,6 @@ static void pas_audio_start_input(int dev, unsigned long buf, int count,
303 unsigned long flags; 289 unsigned long flags;
304 int cnt; 290 int cnt;
305 291
306 DEB(printk("pas2_pcm.c: static void pas_audio_start_input(char *buf = %P, int count = %X)\n", buf, count));
307
308 cnt = count; 292 cnt = count;
309 if (audio_devs[dev]->dmap_out->dma > 3) 293 if (audio_devs[dev]->dmap_out->dma > 3)
310 cnt >>= 1; 294 cnt >>= 1;
@@ -388,8 +372,6 @@ static struct audio_driver pas_audio_driver =
388 372
389void __init pas_pcm_init(struct address_info *hw_config) 373void __init pas_pcm_init(struct address_info *hw_config)
390{ 374{
391 DEB(printk("pas2_pcm.c: long pas_pcm_init()\n"));
392
393 pcm_bitsok = 8; 375 pcm_bitsok = 8;
394 if (pas_read(0xEF8B) & 0x08) 376 if (pas_read(0xEF8B) & 0x08)
395 pcm_bitsok |= 16; 377 pcm_bitsok |= 16;
diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c
index 851a1da46be1..3d50fb4236ed 100644
--- a/sound/oss/sb_common.c
+++ b/sound/oss/sb_common.c
@@ -226,8 +226,6 @@ int sb_dsp_reset(sb_devc * devc)
226{ 226{
227 int loopc; 227 int loopc;
228 228
229 DEB(printk("Entered sb_dsp_reset()\n"));
230
231 if (devc->model == MDL_ESS) return ess_dsp_reset (devc); 229 if (devc->model == MDL_ESS) return ess_dsp_reset (devc);
232 230
233 /* This is only for non-ESS chips */ 231 /* This is only for non-ESS chips */
@@ -246,8 +244,6 @@ int sb_dsp_reset(sb_devc * devc)
246 return 0; /* Sorry */ 244 return 0; /* Sorry */
247 } 245 }
248 246
249 DEB(printk("sb_dsp_reset() OK\n"));
250
251 return 1; 247 return 1;
252} 248}
253 249
diff --git a/sound/oss/sb_ess.c b/sound/oss/sb_ess.c
index 0e7254bde4c2..b47a69026f1b 100644
--- a/sound/oss/sb_ess.c
+++ b/sound/oss/sb_ess.c
@@ -865,8 +865,6 @@ printk(KERN_INFO "FKS: ess_dsp_reset 1\n");
865ess_show_mixerregs (devc); 865ess_show_mixerregs (devc);
866#endif 866#endif
867 867
868 DEB(printk("Entered ess_dsp_reset()\n"));
869
870 outb(3, DSP_RESET); /* Reset FIFO too */ 868 outb(3, DSP_RESET); /* Reset FIFO too */
871 869
872 udelay(10); 870 udelay(10);
@@ -881,8 +879,6 @@ ess_show_mixerregs (devc);
881 } 879 }
882 ess_extended (devc); 880 ess_extended (devc);
883 881
884 DEB(printk("sb_dsp_reset() OK\n"));
885
886#ifdef FKS_LOGGING 882#ifdef FKS_LOGGING
887printk(KERN_INFO "FKS: dsp_reset 2\n"); 883printk(KERN_INFO "FKS: dsp_reset 2\n");
888ess_show_mixerregs (devc); 884ess_show_mixerregs (devc);
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index 9b9f7d385134..c0eea1dfe90f 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -216,8 +216,6 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun
216 216
217 dev = dev >> 4; 217 dev = dev >> 4;
218 218
219 DEB(printk("sequencer_write(dev=%d, count=%d)\n", dev, count));
220
221 if (mode == OPEN_READ) 219 if (mode == OPEN_READ)
222 return -EIO; 220 return -EIO;
223 221
@@ -959,8 +957,6 @@ int sequencer_open(int dev, struct file *file)
959 dev = dev >> 4; 957 dev = dev >> 4;
960 mode = translate_mode(file); 958 mode = translate_mode(file);
961 959
962 DEB(printk("sequencer_open(dev=%d)\n", dev));
963
964 if (!sequencer_ok) 960 if (!sequencer_ok)
965 { 961 {
966/* printk("Sound card: sequencer not initialized\n");*/ 962/* printk("Sound card: sequencer not initialized\n");*/
@@ -1133,8 +1129,6 @@ void sequencer_release(int dev, struct file *file)
1133 1129
1134 dev = dev >> 4; 1130 dev = dev >> 4;
1135 1131
1136 DEB(printk("sequencer_release(dev=%d)\n", dev));
1137
1138 /* 1132 /*
1139 * Wait until the queue is empty (if we don't have nonblock) 1133 * Wait until the queue is empty (if we don't have nonblock)
1140 */ 1134 */
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h
index 9d35c4c65b9b..f2554ab78f5e 100644
--- a/sound/oss/sound_config.h
+++ b/sound/oss/sound_config.h
@@ -123,10 +123,6 @@ static inline int translate_mode(struct file *file)
123#include "sound_calls.h" 123#include "sound_calls.h"
124#include "dev_table.h" 124#include "dev_table.h"
125 125
126#ifndef DEB
127#define DEB(x)
128#endif
129
130#ifndef DDB 126#ifndef DDB
131#define DDB(x) do {} while (0) 127#define DDB(x) do {} while (0)
132#endif 128#endif
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index e7780349cc55..b70c7c8f9c5d 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -154,7 +154,6 @@ static ssize_t sound_read(struct file *file, char __user *buf, size_t count, lof
154 154
155 mutex_lock(&soundcard_mutex); 155 mutex_lock(&soundcard_mutex);
156 156
157 DEB(printk("sound_read(dev=%d, count=%d)\n", dev, count));
158 switch (dev & 0x0f) { 157 switch (dev & 0x0f) {
159 case SND_DEV_DSP: 158 case SND_DEV_DSP:
160 case SND_DEV_DSP16: 159 case SND_DEV_DSP16:
@@ -180,7 +179,6 @@ static ssize_t sound_write(struct file *file, const char __user *buf, size_t cou
180 int ret = -EINVAL; 179 int ret = -EINVAL;
181 180
182 mutex_lock(&soundcard_mutex); 181 mutex_lock(&soundcard_mutex);
183 DEB(printk("sound_write(dev=%d, count=%d)\n", dev, count));
184 switch (dev & 0x0f) { 182 switch (dev & 0x0f) {
185 case SND_DEV_SEQ: 183 case SND_DEV_SEQ:
186 case SND_DEV_SEQ2: 184 case SND_DEV_SEQ2:
@@ -206,7 +204,6 @@ static int sound_open(struct inode *inode, struct file *file)
206 int dev = iminor(inode); 204 int dev = iminor(inode);
207 int retval; 205 int retval;
208 206
209 DEB(printk("sound_open(dev=%d)\n", dev));
210 if ((dev >= SND_NDEVS) || (dev < 0)) { 207 if ((dev >= SND_NDEVS) || (dev < 0)) {
211 printk(KERN_ERR "Invalid minor device %d\n", dev); 208 printk(KERN_ERR "Invalid minor device %d\n", dev);
212 return -ENXIO; 209 return -ENXIO;
@@ -257,7 +254,6 @@ static int sound_release(struct inode *inode, struct file *file)
257 int dev = iminor(inode); 254 int dev = iminor(inode);
258 255
259 mutex_lock(&soundcard_mutex); 256 mutex_lock(&soundcard_mutex);
260 DEB(printk("sound_release(dev=%d)\n", dev));
261 switch (dev & 0x0f) { 257 switch (dev & 0x0f) {
262 case SND_DEV_CTL: 258 case SND_DEV_CTL:
263 module_put(mixer_devs[dev >> 4]->owner); 259 module_put(mixer_devs[dev >> 4]->owner);
@@ -351,7 +347,6 @@ static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
351 if (!access_ok(VERIFY_WRITE, p, len)) 347 if (!access_ok(VERIFY_WRITE, p, len))
352 return -EFAULT; 348 return -EFAULT;
353 } 349 }
354 DEB(printk("sound_ioctl(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg));
355 if (cmd == OSS_GETVERSION) 350 if (cmd == OSS_GETVERSION)
356 return __put_user(SOUND_VERSION, (int __user *)p); 351 return __put_user(SOUND_VERSION, (int __user *)p);
357 352
@@ -409,7 +404,6 @@ static unsigned int sound_poll(struct file *file, poll_table * wait)
409 struct inode *inode = file_inode(file); 404 struct inode *inode = file_inode(file);
410 int dev = iminor(inode); 405 int dev = iminor(inode);
411 406
412 DEB(printk("sound_poll(dev=%d)\n", dev));
413 switch (dev & 0x0f) { 407 switch (dev & 0x0f) {
414 case SND_DEV_SEQ: 408 case SND_DEV_SEQ:
415 case SND_DEV_SEQ2: 409 case SND_DEV_SEQ2:
diff --git a/sound/oss/uart401.c b/sound/oss/uart401.c
index 5433c6f5eca2..62b8869f5a4c 100644
--- a/sound/oss/uart401.c
+++ b/sound/oss/uart401.c
@@ -274,19 +274,12 @@ static int reset_uart401(uart401_devc * devc)
274 } 274 }
275 } 275 }
276 276
277 277 /* Flush input before enabling interrupts */
278 if (ok) 278 if (ok)
279 { 279 uart401_input_loop(devc);
280 DEB(printk("Reset UART401 OK\n"));
281 }
282 else 280 else
283 DDB(printk("Reset UART401 failed - No hardware detected.\n")); 281 DDB(printk("Reset UART401 failed - No hardware detected.\n"));
284 282
285 if (ok)
286 uart401_input_loop(devc); /*
287 * Flush input before enabling interrupts
288 */
289
290 return ok; 283 return ok;
291} 284}
292 285