* [PATCH v2] net: mvpp2: debugfs: remove redundant parameter check in three functions
@ 2023-07-17 2:55 Minjie Du
2023-07-17 12:18 ` Russell King (Oracle)
2023-07-19 1:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Minjie Du @ 2023-07-17 2:55 UTC (permalink / raw)
To: simon.horman, Marcin Wojtas, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni,
open list:MARVELL MVPP2 ETHERNET DRIVER, open list
Cc: opensource.kernel, Minjie Du
As per the comment above debugfs_create_dir(), it is not expected to
return an error, so an extra error check is not needed.
Drop the return check of debugfs_create_dir() in
mvpp2_dbgfs_c2_entry_init(), mvpp2_dbgfs_flow_tbl_entry_init()
and mvpp2_dbgfs_cls_init().
Fixes: b607cc61be41 ("net: mvpp2: debugfs: Allow reading the C2 engine table from debugfs")
Signed-off-by: Minjie Du <duminjie@vivo.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
index 75e83ea2a..0f9bc4f8e 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
@@ -593,8 +593,6 @@ static int mvpp2_dbgfs_c2_entry_init(struct dentry *parent,
sprintf(c2_entry_name, "%03d", id);
c2_entry_dir = debugfs_create_dir(c2_entry_name, parent);
- if (!c2_entry_dir)
- return -ENOMEM;
entry = &priv->dbgfs_entries->c2_entries[id];
@@ -626,8 +624,6 @@ static int mvpp2_dbgfs_flow_tbl_entry_init(struct dentry *parent,
sprintf(flow_tbl_entry_name, "%03d", id);
flow_tbl_entry_dir = debugfs_create_dir(flow_tbl_entry_name, parent);
- if (!flow_tbl_entry_dir)
- return -ENOMEM;
entry = &priv->dbgfs_entries->flt_entries[id];
@@ -646,12 +642,8 @@ static int mvpp2_dbgfs_cls_init(struct dentry *parent, struct mvpp2 *priv)
int i, ret;
cls_dir = debugfs_create_dir("classifier", parent);
- if (!cls_dir)
- return -ENOMEM;
c2_dir = debugfs_create_dir("c2", cls_dir);
- if (!c2_dir)
- return -ENOMEM;
for (i = 0; i < MVPP22_CLS_C2_N_ENTRIES; i++) {
ret = mvpp2_dbgfs_c2_entry_init(c2_dir, priv, i);
@@ -660,8 +652,6 @@ static int mvpp2_dbgfs_cls_init(struct dentry *parent, struct mvpp2 *priv)
}
flow_tbl_dir = debugfs_create_dir("flow_table", cls_dir);
- if (!flow_tbl_dir)
- return -ENOMEM;
for (i = 0; i < MVPP2_CLS_FLOWS_TBL_SIZE; i++) {
ret = mvpp2_dbgfs_flow_tbl_entry_init(flow_tbl_dir, priv, i);
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] net: mvpp2: debugfs: remove redundant parameter check in three functions
2023-07-17 2:55 [PATCH v2] net: mvpp2: debugfs: remove redundant parameter check in three functions Minjie Du
@ 2023-07-17 12:18 ` Russell King (Oracle)
2023-07-19 1:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2023-07-17 12:18 UTC (permalink / raw)
To: Minjie Du
Cc: simon.horman, Marcin Wojtas, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni,
open list:MARVELL MVPP2 ETHERNET DRIVER, open list,
opensource.kernel
On Mon, Jul 17, 2023 at 10:55:37AM +0800, Minjie Du wrote:
> As per the comment above debugfs_create_dir(), it is not expected to
> return an error, so an extra error check is not needed.
> Drop the return check of debugfs_create_dir() in
> mvpp2_dbgfs_c2_entry_init(), mvpp2_dbgfs_flow_tbl_entry_init()
> and mvpp2_dbgfs_cls_init().
>
> Fixes: b607cc61be41 ("net: mvpp2: debugfs: Allow reading the C2 engine table from debugfs")
> Signed-off-by: Minjie Du <duminjie@vivo.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] net: mvpp2: debugfs: remove redundant parameter check in three functions
2023-07-17 2:55 [PATCH v2] net: mvpp2: debugfs: remove redundant parameter check in three functions Minjie Du
2023-07-17 12:18 ` Russell King (Oracle)
@ 2023-07-19 1:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-19 1:00 UTC (permalink / raw)
To: Minjie Du
Cc: simon.horman, mw, linux, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, opensource.kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 17 Jul 2023 10:55:37 +0800 you wrote:
> As per the comment above debugfs_create_dir(), it is not expected to
> return an error, so an extra error check is not needed.
> Drop the return check of debugfs_create_dir() in
> mvpp2_dbgfs_c2_entry_init(), mvpp2_dbgfs_flow_tbl_entry_init()
> and mvpp2_dbgfs_cls_init().
>
> Fixes: b607cc61be41 ("net: mvpp2: debugfs: Allow reading the C2 engine table from debugfs")
> Signed-off-by: Minjie Du <duminjie@vivo.com>
>
> [...]
Here is the summary with links:
- [v2] net: mvpp2: debugfs: remove redundant parameter check in three functions
https://git.kernel.org/netdev/net-next/c/f8e343326c1d
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] 3+ messages in thread
end of thread, other threads:[~2023-07-19 1:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 2:55 [PATCH v2] net: mvpp2: debugfs: remove redundant parameter check in three functions Minjie Du
2023-07-17 12:18 ` Russell King (Oracle)
2023-07-19 1:00 ` 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).