From: Andrew Lunn <andrew@lunn.ch>
To: Jeff Layton <jlayton@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Qasim Ijaz <qasdev00@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/4] ref_tracker: add a top level debugfs directory for ref_tracker
Date: Tue, 15 Apr 2025 00:35:24 +0200 [thread overview]
Message-ID: <a6f00284-adfb-4589-a0fd-2c0ef13545ee@lunn.ch> (raw)
In-Reply-To: <20250414-reftrack-dbgfs-v1-1-f03585832203@kernel.org>
> +static int __init ref_tracker_debug_init(void)
> +{
> + ref_tracker_debug_dir = debugfs_create_dir("ref_tracker", NULL);
> + if (IS_ERR(ref_tracker_debug_dir)) {
I'm pretty sure GregKH will tell you not to check the return
code. Nothing bad should happen. Yes, it takes a while to get used to
this, but that is the way debugfs is designed.
> + pr_warn("ref_tracker: unable to create debugfs ref_tracker directory: %pe\n",
> + ref_tracker_debug_dir);
> + ref_tracker_debug_dir = NULL;
No need for this. All debugfs_ functions are happy to accept an err
pointer and do a NOP.
Andrew
next prev parent reply other threads:[~2025-04-14 22:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 14:45 [PATCH 0/4] ref_tracker: register debugfs files for each ref_tracker_dir Jeff Layton
2025-04-14 14:45 ` [PATCH 1/4] ref_tracker: add a top level debugfs directory for ref_tracker Jeff Layton
2025-04-14 22:35 ` Andrew Lunn [this message]
2025-04-14 14:45 ` [PATCH 2/4] ref_tracker: add ability to register a file in debugfs for a ref_tracker_dir Jeff Layton
2025-04-14 22:53 ` Andrew Lunn
2025-04-14 23:08 ` Andrew Lunn
2025-04-15 10:23 ` Jeff Layton
2025-04-15 12:54 ` Jeff Layton
2025-04-15 14:50 ` Jeff Layton
2025-04-14 14:45 ` [PATCH 3/4] net: add ref_tracker_dir_debugfs() calls for netns refcount tracking Jeff Layton
2025-04-14 14:45 ` [PATCH 4/4] net: register debugfs file for net_device refcnt tracker Jeff Layton
2025-04-14 22:27 ` Kuniyuki Iwashima
2025-04-14 23:16 ` Andrew Lunn
2025-04-15 1:56 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6f00284-adfb-4589-a0fd-2c0ef13545ee@lunn.ch \
--to=andrew@lunn.ch \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jlayton@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=qasdev00@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®