* [PATCH 0/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information
@ 2021-05-20 2:14 Zhen Lei
2021-05-20 2:14 ` [PATCH 1/1] " Zhen Lei
2021-05-20 20:10 ` [PATCH 0/1] " patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-20 2:14 UTC (permalink / raw)
To: Karsten Keil, Leon Romanovsky, netdev; +Cc: Zhen Lei
v1 --> v2:
Remove all obsolete PIPELINE_DEBUG debugging information.
v1:
Mark local variable 'incomplete' as __maybe_unused in dsp_pipeline_build()
Zhen Lei (1):
mISDN: Remove obsolete PIPELINE_DEBUG debugging information
drivers/isdn/mISDN/dsp_pipeline.c | 46 ++-----------------------------
1 file changed, 2 insertions(+), 44 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information
2021-05-20 2:14 [PATCH 0/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information Zhen Lei
@ 2021-05-20 2:14 ` Zhen Lei
2021-05-20 8:49 ` Leon Romanovsky
2021-05-20 20:10 ` [PATCH 0/1] " patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Zhen Lei @ 2021-05-20 2:14 UTC (permalink / raw)
To: Karsten Keil, Leon Romanovsky, netdev; +Cc: Zhen Lei
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: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/isdn/mISDN/dsp_pipeline.c | 46 ++-----------------------------
1 file changed, 2 insertions(+), 44 deletions(-)
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c
index 40588692cec7..e11ca6bbc7f4 100644
--- a/drivers/isdn/mISDN/dsp_pipeline.c
+++ b/drivers/isdn/mISDN/dsp_pipeline.c
@@ -17,9 +17,6 @@
#include "dsp.h"
#include "dsp_hwec.h"
-/* uncomment for debugging */
-/*#define PIPELINE_DEBUG*/
-
struct dsp_pipeline_entry {
struct mISDN_dsp_element *elem;
void *p;
@@ -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;
err2:
@@ -129,10 +122,6 @@ void mISDN_dsp_element_unregister(struct mISDN_dsp_element *elem)
list_for_each_entry_safe(entry, n, &dsp_elements, list)
if (entry->elem == elem) {
device_unregister(&entry->dev);
-#ifdef PIPELINE_DEBUG
- printk(KERN_DEBUG "%s: %s unregistered\n",
- __func__, elem->name);
-#endif
return;
}
printk(KERN_ERR "%s: element %s not in list.\n", __func__, elem->name);
@@ -145,10 +134,6 @@ int dsp_pipeline_module_init(void)
if (IS_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();
return 0;
@@ -168,10 +153,6 @@ void dsp_pipeline_module_exit(void)
__func__, entry->elem->name);
kfree(entry);
}
-
-#ifdef PIPELINE_DEBUG
- printk(KERN_DEBUG "%s: dsp pipeline module exited\n", __func__);
-#endif
}
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);
-#ifdef PIPELINE_DEBUG
- printk(KERN_DEBUG "%s: dsp pipeline ready\n", __func__);
-#endif
-
return 0;
}
@@ -210,15 +187,11 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline)
return;
_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 incomplete = 0, found = 0;
+ int found = 0;
char *dup, *tok, *name, *args;
struct dsp_element_entry *entry, *n;
struct dsp_pipeline_entry *pipeline_entry;
@@ -251,7 +224,6 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
printk(KERN_ERR "%s: failed to add "
"entry to pipeline: %s (out of "
"memory)\n", __func__, elem->name);
- incomplete = 1;
goto _out;
}
pipeline_entry->elem = elem;
@@ -268,20 +240,12 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
if (pipeline_entry->p) {
list_add_tail(&pipeline_entry->
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 {
printk(KERN_ERR "%s: failed "
"to add entry to pipeline: "
"%s (new() returned NULL)\n",
__func__, elem->name);
kfree(pipeline_entry);
- incomplete = 1;
}
}
found = 1;
@@ -290,11 +254,9 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
if (found)
found = 0;
- else {
+ else
printk(KERN_ERR "%s: element not found, skipping: "
"%s\n", __func__, name);
- incomplete = 1;
- }
}
_out:
@@ -303,10 +265,6 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
else
pipeline->inuse = 0;
-#ifdef PIPELINE_DEBUG
- printk(KERN_DEBUG "%s: dsp pipeline built%s: %s\n",
- __func__, incomplete ? " incomplete" : "", cfg);
-#endif
kfree(dup);
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information
2021-05-20 2:14 ` [PATCH 1/1] " Zhen Lei
@ 2021-05-20 8:49 ` Leon Romanovsky
0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2021-05-20 8:49 UTC (permalink / raw)
To: Zhen Lei; +Cc: Karsten Keil, netdev
On Thu, May 20, 2021 at 10:14:11AM +0800, Zhen Lei wrote:
> 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: Leon Romanovsky <leon@kernel.org>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> drivers/isdn/mISDN/dsp_pipeline.c | 46 ++-----------------------------
> 1 file changed, 2 insertions(+), 44 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information
2021-05-20 2:14 [PATCH 0/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information Zhen Lei
2021-05-20 2:14 ` [PATCH 1/1] " Zhen Lei
@ 2021-05-20 20:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-20 20:10 UTC (permalink / raw)
To: Zhen Lei; +Cc: isdn, leon, netdev
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 20 May 2021 10:14:10 +0800 you wrote:
> v1 --> v2:
> Remove all obsolete PIPELINE_DEBUG debugging information.
>
> v1:
> Mark local variable 'incomplete' as __maybe_unused in dsp_pipeline_build()
>
>
> [...]
Here is the summary with links:
- [1/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information
https://git.kernel.org/netdev/net-next/c/2682ea324b00
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-20 20:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 2:14 [PATCH 0/1] mISDN: Remove obsolete PIPELINE_DEBUG debugging information Zhen Lei
2021-05-20 2:14 ` [PATCH 1/1] " Zhen Lei
2021-05-20 8:49 ` Leon Romanovsky
2021-05-20 20:10 ` [PATCH 0/1] " patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).