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.