Commit 2682ea32 authored by Zhen Lei's avatar Zhen Lei Committed by David S. Miller

mISDN: Remove obsolete PIPELINE_DEBUG debugging information

As Leon Romanovsky's tips:
The definition of macro PIPELINE_DEBUG is commented more than 10 years ago
and can be seen as a dead code that should be removed.
Suggested-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f844e4c
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
#include "dsp.h" #include "dsp.h"
#include "dsp_hwec.h" #include "dsp_hwec.h"
/* uncomment for debugging */
/*#define PIPELINE_DEBUG*/
struct dsp_pipeline_entry { struct dsp_pipeline_entry {
struct mISDN_dsp_element *elem; struct mISDN_dsp_element *elem;
void *p; void *p;
...@@ -104,10 +101,6 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem) ...@@ -104,10 +101,6 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)
} }
} }
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: %s registered\n", __func__, elem->name);
#endif
return 0; return 0;
err2: err2:
...@@ -129,10 +122,6 @@ void mISDN_dsp_element_unregister(struct mISDN_dsp_element *elem) ...@@ -129,10 +122,6 @@ void mISDN_dsp_element_unregister(struct mISDN_dsp_element *elem)
list_for_each_entry_safe(entry, n, &dsp_elements, list) list_for_each_entry_safe(entry, n, &dsp_elements, list)
if (entry->elem == elem) { if (entry->elem == elem) {
device_unregister(&entry->dev); device_unregister(&entry->dev);
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: %s unregistered\n",
__func__, elem->name);
#endif
return; return;
} }
printk(KERN_ERR "%s: element %s not in list.\n", __func__, elem->name); printk(KERN_ERR "%s: element %s not in list.\n", __func__, elem->name);
...@@ -145,10 +134,6 @@ int dsp_pipeline_module_init(void) ...@@ -145,10 +134,6 @@ int dsp_pipeline_module_init(void)
if (IS_ERR(elements_class)) if (IS_ERR(elements_class))
return PTR_ERR(elements_class); return PTR_ERR(elements_class);
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: dsp pipeline module initialized\n", __func__);
#endif
dsp_hwec_init(); dsp_hwec_init();
return 0; return 0;
...@@ -168,10 +153,6 @@ void dsp_pipeline_module_exit(void) ...@@ -168,10 +153,6 @@ void dsp_pipeline_module_exit(void)
__func__, entry->elem->name); __func__, entry->elem->name);
kfree(entry); kfree(entry);
} }
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: dsp pipeline module exited\n", __func__);
#endif
} }
int dsp_pipeline_init(struct dsp_pipeline *pipeline) int dsp_pipeline_init(struct dsp_pipeline *pipeline)
...@@ -181,10 +162,6 @@ int dsp_pipeline_init(struct dsp_pipeline *pipeline) ...@@ -181,10 +162,6 @@ int dsp_pipeline_init(struct dsp_pipeline *pipeline)
INIT_LIST_HEAD(&pipeline->list); INIT_LIST_HEAD(&pipeline->list);
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: dsp pipeline ready\n", __func__);
#endif
return 0; return 0;
} }
...@@ -210,15 +187,11 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline) ...@@ -210,15 +187,11 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline)
return; return;
_dsp_pipeline_destroy(pipeline); _dsp_pipeline_destroy(pipeline);
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: dsp pipeline destroyed\n", __func__);
#endif
} }
int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
{ {
int incomplete = 0, found = 0; int found = 0;
char *dup, *tok, *name, *args; char *dup, *tok, *name, *args;
struct dsp_element_entry *entry, *n; struct dsp_element_entry *entry, *n;
struct dsp_pipeline_entry *pipeline_entry; struct dsp_pipeline_entry *pipeline_entry;
...@@ -251,7 +224,6 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) ...@@ -251,7 +224,6 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
printk(KERN_ERR "%s: failed to add " printk(KERN_ERR "%s: failed to add "
"entry to pipeline: %s (out of " "entry to pipeline: %s (out of "
"memory)\n", __func__, elem->name); "memory)\n", __func__, elem->name);
incomplete = 1;
goto _out; goto _out;
} }
pipeline_entry->elem = elem; pipeline_entry->elem = elem;
...@@ -268,20 +240,12 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) ...@@ -268,20 +240,12 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
if (pipeline_entry->p) { if (pipeline_entry->p) {
list_add_tail(&pipeline_entry-> list_add_tail(&pipeline_entry->
list, &pipeline->list); list, &pipeline->list);
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: created "
"instance of %s%s%s\n",
__func__, name, args ?
" with args " : "", args ?
args : "");
#endif
} else { } else {
printk(KERN_ERR "%s: failed " printk(KERN_ERR "%s: failed "
"to add entry to pipeline: " "to add entry to pipeline: "
"%s (new() returned NULL)\n", "%s (new() returned NULL)\n",
__func__, elem->name); __func__, elem->name);
kfree(pipeline_entry); kfree(pipeline_entry);
incomplete = 1;
} }
} }
found = 1; found = 1;
...@@ -290,11 +254,9 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) ...@@ -290,11 +254,9 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
if (found) if (found)
found = 0; found = 0;
else { else
printk(KERN_ERR "%s: element not found, skipping: " printk(KERN_ERR "%s: element not found, skipping: "
"%s\n", __func__, name); "%s\n", __func__, name);
incomplete = 1;
}
} }
_out: _out:
...@@ -303,10 +265,6 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) ...@@ -303,10 +265,6 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
else else
pipeline->inuse = 0; pipeline->inuse = 0;
#ifdef PIPELINE_DEBUG
printk(KERN_DEBUG "%s: dsp pipeline built%s: %s\n",
__func__, incomplete ? " incomplete" : "", cfg);
#endif
kfree(dup); kfree(dup);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment