[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1492080106.28586.13.camel@perches.com>
Date: Thu, 13 Apr 2017 03:41:46 -0700
From: Joe Perches <joe@...ches.com>
To: Gavin Shan <gwshan@...ux.vnet.ibm.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net
Subject: Re: [PATCH v2 net-next 4/8] net/ncsi: Add debugging infrastructurre
On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote:
> This creates debugfs directories as NCSI debugging infrastructure.
> With the patch applied, We will see below debugfs directories. Every
> NCSI package and channel has one corresponding directory. Other than
> presenting the NCSI topology, No real function has been achieved
> through these debugfs directories so far.
>
> /sys/kernel/debug/ncsi/eth0
> /sys/kernel/debug/ncsi/eth0/p0
> /sys/kernel/debug/ncsi/eth0/p0/c0
> /sys/kernel/debug/ncsi/eth0/p0/c1
[]
> diff --git a/net/ncsi/ncsi-debug.c b/net/ncsi/ncsi-debug.c
[]
> +int ncsi_dev_init_debug(struct ncsi_dev_priv *ndp)
> +{
> + if (WARN_ON_ONCE(ndp->dentry))
> + return 0;
> +
> + if (!ncsi_dentry) {
> + ncsi_dentry = debugfs_create_dir("ncsi", NULL);
> + if (!ncsi_dentry) {
> + pr_warn("NCSI: Cannot create /sys/kernel/debug/ncsi\n");
> + return -ENOENT;
debugfs does not have a fixed path.
Most error messages for this just use something like
pr_<level>("Failed to create debugfs directory '%s'\n", foo)
And most failures don't emit any error message at all.
Powered by blists - more mailing lists