Commit 3af5d0524aac70a6df638d6558f4b60dbf0216e7
Committed by
Takashi Iwai
1 parent
6ea0cae73d
Exists in
master
and in
13 other branches
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>
Showing 10 changed files with 2 additions and 67 deletions Side-by-side Diff
sound/oss/ad1848.c
| ... | ... | @@ -50,8 +50,6 @@ |
| 50 | 50 | #include <linux/pnp.h> |
| 51 | 51 | #include <linux/spinlock.h> |
| 52 | 52 | |
| 53 | -#define DEB(x) | |
| 54 | -#define DEB1(x) | |
| 55 | 53 | #include "sound_config.h" |
| 56 | 54 | |
| 57 | 55 | #include "ad1848.h" |
| ... | ... | @@ -1015,8 +1013,6 @@ |
| 1015 | 1013 | unsigned long flags; |
| 1016 | 1014 | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
| 1017 | 1015 | ad1848_port_info *portc = (ad1848_port_info *) audio_devs[dev]->portc; |
| 1018 | - | |
| 1019 | - DEB(printk("ad1848_close(void)\n")); | |
| 1020 | 1016 | |
| 1021 | 1017 | devc->intr_active = 0; |
| 1022 | 1018 | ad1848_halt(dev); |
sound/oss/opl3.c
| ... | ... | @@ -275,7 +275,6 @@ |
| 275 | 275 | devc->v_alloc->map[voice] = 0; |
| 276 | 276 | |
| 277 | 277 | map = &pv_map[devc->lv_map[voice]]; |
| 278 | - DEB(printk("Kill note %d\n", voice)); | |
| 279 | 278 | |
| 280 | 279 | if (map->voice_mode == 0) |
| 281 | 280 | return 0; |
| ... | ... | @@ -872,8 +871,6 @@ |
| 872 | 871 | return; |
| 873 | 872 | |
| 874 | 873 | map = &pv_map[devc->lv_map[voice]]; |
| 875 | - | |
| 876 | - DEB(printk("Aftertouch %d\n", voice)); | |
| 877 | 874 | |
| 878 | 875 | if (map->voice_mode == 0) |
| 879 | 876 | return; |
sound/oss/pas2_mixer.c
| ... | ... | @@ -21,10 +21,6 @@ |
| 21 | 21 | |
| 22 | 22 | #include "pas2.h" |
| 23 | 23 | |
| 24 | -#ifndef DEB | |
| 25 | -#define DEB(what) /* (what) */ | |
| 26 | -#endif | |
| 27 | - | |
| 28 | 24 | extern int pas_translate_code; |
| 29 | 25 | extern char pas_model; |
| 30 | 26 | extern int *pas_osp; |
| ... | ... | @@ -120,8 +116,6 @@ |
| 120 | 116 | { |
| 121 | 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 | 119 | left = level & 0x7f; |
| 126 | 120 | right = (level & 0x7f00) >> 8; |
| 127 | 121 | |
| ... | ... | @@ -207,8 +201,6 @@ |
| 207 | 201 | { |
| 208 | 202 | int foo; |
| 209 | 203 | |
| 210 | - DEB(printk("pas2_mixer.c: void pas_mixer_reset(void)\n")); | |
| 211 | - | |
| 212 | 204 | for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) |
| 213 | 205 | pas_mixer_set(foo, levels[foo]); |
| 214 | 206 | |
| ... | ... | @@ -220,7 +212,6 @@ |
| 220 | 212 | int level,v ; |
| 221 | 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 | 215 | if (cmd == SOUND_MIXER_PRIVATE1) { /* Set loudness bit */ |
| 225 | 216 | if (get_user(level, p)) |
| 226 | 217 | return -EFAULT; |
sound/oss/pas2_pcm.c
| ... | ... | @@ -22,10 +22,6 @@ |
| 22 | 22 | |
| 23 | 23 | #include "pas2.h" |
| 24 | 24 | |
| 25 | -#ifndef DEB | |
| 26 | -#define DEB(WHAT) | |
| 27 | -#endif | |
| 28 | - | |
| 29 | 25 | #define PAS_PCM_INTRBITS (0x08) |
| 30 | 26 | /* |
| 31 | 27 | * Sample buffer timer interrupt enable |
| ... | ... | @@ -156,8 +152,6 @@ |
| 156 | 152 | int val, ret; |
| 157 | 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 | 155 | switch (cmd) |
| 162 | 156 | { |
| 163 | 157 | case SOUND_PCM_WRITE_RATE: |
| ... | ... | @@ -204,8 +198,6 @@ |
| 204 | 198 | |
| 205 | 199 | static void pas_audio_reset(int dev) |
| 206 | 200 | { |
| 207 | - DEB(printk("pas2_pcm.c: static void pas_audio_reset(void)\n")); | |
| 208 | - | |
| 209 | 201 | pas_write(pas_read(0xF8A) & ~0x40, 0xF8A); /* Disable PCM */ |
| 210 | 202 | } |
| 211 | 203 | |
| ... | ... | @@ -214,8 +206,6 @@ |
| 214 | 206 | int err; |
| 215 | 207 | unsigned long flags; |
| 216 | 208 | |
| 217 | - DEB(printk("pas2_pcm.c: static int pas_audio_open(int mode = %X)\n", mode)); | |
| 218 | - | |
| 219 | 209 | spin_lock_irqsave(&pas_lock, flags); |
| 220 | 210 | if (pcm_busy) |
| 221 | 211 | { |
| ... | ... | @@ -239,8 +229,6 @@ |
| 239 | 229 | { |
| 240 | 230 | unsigned long flags; |
| 241 | 231 | |
| 242 | - DEB(printk("pas2_pcm.c: static void pas_audio_close(void)\n")); | |
| 243 | - | |
| 244 | 232 | spin_lock_irqsave(&pas_lock, flags); |
| 245 | 233 | |
| 246 | 234 | pas_audio_reset(dev); |
| ... | ... | @@ -256,8 +244,6 @@ |
| 256 | 244 | { |
| 257 | 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 | 247 | cnt = count; |
| 262 | 248 | if (audio_devs[dev]->dmap_out->dma > 3) |
| 263 | 249 | cnt >>= 1; |
| ... | ... | @@ -303,8 +289,6 @@ |
| 303 | 289 | unsigned long flags; |
| 304 | 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 | 292 | cnt = count; |
| 309 | 293 | if (audio_devs[dev]->dmap_out->dma > 3) |
| 310 | 294 | cnt >>= 1; |
| ... | ... | @@ -388,8 +372,6 @@ |
| 388 | 372 | |
| 389 | 373 | void __init pas_pcm_init(struct address_info *hw_config) |
| 390 | 374 | { |
| 391 | - DEB(printk("pas2_pcm.c: long pas_pcm_init()\n")); | |
| 392 | - | |
| 393 | 375 | pcm_bitsok = 8; |
| 394 | 376 | if (pas_read(0xEF8B) & 0x08) |
| 395 | 377 | pcm_bitsok |= 16; |
sound/oss/sb_common.c
| ... | ... | @@ -226,8 +226,6 @@ |
| 226 | 226 | { |
| 227 | 227 | int loopc; |
| 228 | 228 | |
| 229 | - DEB(printk("Entered sb_dsp_reset()\n")); | |
| 230 | - | |
| 231 | 229 | if (devc->model == MDL_ESS) return ess_dsp_reset (devc); |
| 232 | 230 | |
| 233 | 231 | /* This is only for non-ESS chips */ |
| ... | ... | @@ -245,8 +243,6 @@ |
| 245 | 243 | DDB(printk("sb: No response to RESET\n")); |
| 246 | 244 | return 0; /* Sorry */ |
| 247 | 245 | } |
| 248 | - | |
| 249 | - DEB(printk("sb_dsp_reset() OK\n")); | |
| 250 | 246 | |
| 251 | 247 | return 1; |
| 252 | 248 | } |
sound/oss/sb_ess.c
| ... | ... | @@ -865,8 +865,6 @@ |
| 865 | 865 | ess_show_mixerregs (devc); |
| 866 | 866 | #endif |
| 867 | 867 | |
| 868 | - DEB(printk("Entered ess_dsp_reset()\n")); | |
| 869 | - | |
| 870 | 868 | outb(3, DSP_RESET); /* Reset FIFO too */ |
| 871 | 869 | |
| 872 | 870 | udelay(10); |
| ... | ... | @@ -880,8 +878,6 @@ |
| 880 | 878 | return 0; /* Sorry */ |
| 881 | 879 | } |
| 882 | 880 | ess_extended (devc); |
| 883 | - | |
| 884 | - DEB(printk("sb_dsp_reset() OK\n")); | |
| 885 | 881 | |
| 886 | 882 | #ifdef FKS_LOGGING |
| 887 | 883 | printk(KERN_INFO "FKS: dsp_reset 2\n"); |
sound/oss/sequencer.c
| ... | ... | @@ -216,8 +216,6 @@ |
| 216 | 216 | |
| 217 | 217 | dev = dev >> 4; |
| 218 | 218 | |
| 219 | - DEB(printk("sequencer_write(dev=%d, count=%d)\n", dev, count)); | |
| 220 | - | |
| 221 | 219 | if (mode == OPEN_READ) |
| 222 | 220 | return -EIO; |
| 223 | 221 | |
| ... | ... | @@ -959,8 +957,6 @@ |
| 959 | 957 | dev = dev >> 4; |
| 960 | 958 | mode = translate_mode(file); |
| 961 | 959 | |
| 962 | - DEB(printk("sequencer_open(dev=%d)\n", dev)); | |
| 963 | - | |
| 964 | 960 | if (!sequencer_ok) |
| 965 | 961 | { |
| 966 | 962 | /* printk("Sound card: sequencer not initialized\n");*/ |
| ... | ... | @@ -1132,8 +1128,6 @@ |
| 1132 | 1128 | int mode = translate_mode(file); |
| 1133 | 1129 | |
| 1134 | 1130 | dev = dev >> 4; |
| 1135 | - | |
| 1136 | - DEB(printk("sequencer_release(dev=%d)\n", dev)); | |
| 1137 | 1131 | |
| 1138 | 1132 | /* |
| 1139 | 1133 | * Wait until the queue is empty (if we don't have nonblock) |
sound/oss/sound_config.h
sound/oss/soundcard.c
| ... | ... | @@ -154,7 +154,6 @@ |
| 154 | 154 | |
| 155 | 155 | mutex_lock(&soundcard_mutex); |
| 156 | 156 | |
| 157 | - DEB(printk("sound_read(dev=%d, count=%d)\n", dev, count)); | |
| 158 | 157 | switch (dev & 0x0f) { |
| 159 | 158 | case SND_DEV_DSP: |
| 160 | 159 | case SND_DEV_DSP16: |
| ... | ... | @@ -180,7 +179,6 @@ |
| 180 | 179 | int ret = -EINVAL; |
| 181 | 180 | |
| 182 | 181 | mutex_lock(&soundcard_mutex); |
| 183 | - DEB(printk("sound_write(dev=%d, count=%d)\n", dev, count)); | |
| 184 | 182 | switch (dev & 0x0f) { |
| 185 | 183 | case SND_DEV_SEQ: |
| 186 | 184 | case SND_DEV_SEQ2: |
| ... | ... | @@ -206,7 +204,6 @@ |
| 206 | 204 | int dev = iminor(inode); |
| 207 | 205 | int retval; |
| 208 | 206 | |
| 209 | - DEB(printk("sound_open(dev=%d)\n", dev)); | |
| 210 | 207 | if ((dev >= SND_NDEVS) || (dev < 0)) { |
| 211 | 208 | printk(KERN_ERR "Invalid minor device %d\n", dev); |
| 212 | 209 | return -ENXIO; |
| ... | ... | @@ -257,7 +254,6 @@ |
| 257 | 254 | int dev = iminor(inode); |
| 258 | 255 | |
| 259 | 256 | mutex_lock(&soundcard_mutex); |
| 260 | - DEB(printk("sound_release(dev=%d)\n", dev)); | |
| 261 | 257 | switch (dev & 0x0f) { |
| 262 | 258 | case SND_DEV_CTL: |
| 263 | 259 | module_put(mixer_devs[dev >> 4]->owner); |
| ... | ... | @@ -351,7 +347,6 @@ |
| 351 | 347 | if (!access_ok(VERIFY_WRITE, p, len)) |
| 352 | 348 | return -EFAULT; |
| 353 | 349 | } |
| 354 | - DEB(printk("sound_ioctl(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg)); | |
| 355 | 350 | if (cmd == OSS_GETVERSION) |
| 356 | 351 | return __put_user(SOUND_VERSION, (int __user *)p); |
| 357 | 352 | |
| ... | ... | @@ -409,7 +404,6 @@ |
| 409 | 404 | struct inode *inode = file_inode(file); |
| 410 | 405 | int dev = iminor(inode); |
| 411 | 406 | |
| 412 | - DEB(printk("sound_poll(dev=%d)\n", dev)); | |
| 413 | 407 | switch (dev & 0x0f) { |
| 414 | 408 | case SND_DEV_SEQ: |
| 415 | 409 | case SND_DEV_SEQ2: |
sound/oss/uart401.c
| ... | ... | @@ -274,18 +274,11 @@ |
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | - | |
| 277 | + /* Flush input before enabling interrupts */ | |
| 278 | 278 | if (ok) |
| 279 | - { | |
| 280 | - DEB(printk("Reset UART401 OK\n")); | |
| 281 | - } | |
| 279 | + uart401_input_loop(devc); | |
| 282 | 280 | else |
| 283 | 281 | DDB(printk("Reset UART401 failed - No hardware detected.\n")); |
| 284 | - | |
| 285 | - if (ok) | |
| 286 | - uart401_input_loop(devc); /* | |
| 287 | - * Flush input before enabling interrupts | |
| 288 | - */ | |
| 289 | 282 | |
| 290 | 283 | return ok; |
| 291 | 284 | } |