netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq()
@ 2024-09-03 14:31 Li Zetao
  2024-09-03 16:36 ` Brett Creeley
  2024-09-05  0:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Li Zetao @ 2024-09-03 14:31 UTC (permalink / raw)
  To: shannon.nelson, brett.creeley, davem, edumazet, kuba, pabeni,
	kalesh-anakkur.purayil
  Cc: lizetao1, netdev

Since the debugfs_create_dir() never returns a null pointer, checking
the return value for a null pointer is redundant, and using IS_ERR is
safe enough.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
index 59e5a9f21105..c98b4e75e288 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
@@ -123,7 +123,7 @@ void ionic_debugfs_add_qcq(struct ionic_lif *lif, struct ionic_qcq *qcq)
 	struct ionic_cq *cq = &qcq->cq;
 
 	qcq_dentry = debugfs_create_dir(q->name, lif->dentry);
-	if (IS_ERR_OR_NULL(qcq_dentry))
+	if (IS_ERR(qcq_dentry))
 		return;
 	qcq->dentry = qcq_dentry;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq()
  2024-09-03 14:31 [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq() Li Zetao
@ 2024-09-03 16:36 ` Brett Creeley
  2024-09-05  0:00   ` Jakub Kicinski
  2024-09-05  0:10 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Brett Creeley @ 2024-09-03 16:36 UTC (permalink / raw)
  To: Li Zetao, shannon.nelson, brett.creeley, davem, edumazet, kuba,
	pabeni, kalesh-anakkur.purayil
  Cc: netdev



On 9/3/2024 7:31 AM, Li Zetao wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> Since the debugfs_create_dir() never returns a null pointer, checking
> the return value for a null pointer is redundant, and using IS_ERR is
> safe enough.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
> ---
>   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> index 59e5a9f21105..c98b4e75e288 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> @@ -123,7 +123,7 @@ void ionic_debugfs_add_qcq(struct ionic_lif *lif, struct ionic_qcq *qcq)
>          struct ionic_cq *cq = &qcq->cq;
> 
>          qcq_dentry = debugfs_create_dir(q->name, lif->dentry);
> -       if (IS_ERR_OR_NULL(qcq_dentry))
> +       if (IS_ERR(qcq_dentry))
>                  return;

For the patch contents this LGTM.

However, the patch subject prefix should be "[PATCH net-next]" for the 
first version. Specifically, replace "-next" with "net-next".

Thanks,

Brett

>          qcq->dentry = qcq_dentry;
> 
> --
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq()
  2024-09-03 16:36 ` Brett Creeley
@ 2024-09-05  0:00   ` Jakub Kicinski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2024-09-05  0:00 UTC (permalink / raw)
  To: Brett Creeley, Li Zetao
  Cc: shannon.nelson, brett.creeley, davem, edumazet, pabeni,
	kalesh-anakkur.purayil, netdev

On Tue, 3 Sep 2024 09:36:22 -0700 Brett Creeley wrote:
> For the patch contents this LGTM.
> 
> However, the patch subject prefix should be "[PATCH net-next]" for the 
> first version. Specifically, replace "-next" with "net-next".

That's right, Li Zetao please follow this advice going forward.
Since it looks like CI guessed the tree correctly I'll apply v1.
-- 
pv-bot: tree

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq()
  2024-09-03 14:31 [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq() Li Zetao
  2024-09-03 16:36 ` Brett Creeley
@ 2024-09-05  0:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-05  0:10 UTC (permalink / raw)
  To: Li Zetao
  Cc: shannon.nelson, brett.creeley, davem, edumazet, kuba, pabeni,
	kalesh-anakkur.purayil, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 3 Sep 2024 22:31:49 +0800 you wrote:
> Since the debugfs_create_dir() never returns a null pointer, checking
> the return value for a null pointer is redundant, and using IS_ERR is
> safe enough.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
> ---
>  drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [-next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq()
    https://git.kernel.org/netdev/net-next/c/4614ac219e3f

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:[~2024-09-05  0:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 14:31 [PATCH -next] ionic: Remove redundant null pointer checks in ionic_debugfs_add_qcq() Li Zetao
2024-09-03 16:36 ` Brett Creeley
2024-09-05  0:00   ` Jakub Kicinski
2024-09-05  0:10 ` 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).