[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6f00284-adfb-4589-a0fd-2c0ef13545ee@lunn.ch>
Date: Tue, 15 Apr 2025 00:35:24 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jeff Layton <jlayton@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Qasim Ijaz <qasdev00@...il.com>,
Nathan Chancellor <nathan@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 1/4] ref_tracker: add a top level debugfs directory for
ref_tracker
> +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
Powered by blists - more mailing lists