search for: debugfs_create_dir

Displaying 20 results from an estimated 145 matches for "debugfs_create_dir".

2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. Also my static checker doesn't like it when we print the error code, but it's always just NULL. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c in...
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. Also my static checker doesn't like it when we print the error code, but it's always just NULL. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c in...
2012 Dec 20
1
[PATCH] virtio_console: correct error message on failure of debugfs_create_dir
debugfs_create_dir() returns NULL if it fails, there's little point in calling PTR_ERR on it. Signed-off-by: Sasha Levin <sasha.levin at oracle.com> --- drivers/char/virtio_console.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/vir...
2012 Dec 20
1
[PATCH] virtio_console: correct error message on failure of debugfs_create_dir
debugfs_create_dir() returns NULL if it fails, there's little point in calling PTR_ERR on it. Signed-off-by: Sasha Levin <sasha.levin at oracle.com> --- drivers/char/virtio_console.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/vir...
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
On Friday 19 July 2013, Dan Carpenter wrote: > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. > Also my static checker doesn't like it when we print the error code, but > it's always just NULL. > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> This looks wrong. debugfs_create_dir intentionally retur...
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
On Friday 19 July 2013, Dan Carpenter wrote: > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. > Also my static checker doesn't like it when we print the error code, but > it's always just NULL. > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> This looks wrong. debugfs_create_dir intentionally retur...
2013 Jul 21
2
[patch] virtio: console: fix error handling for debugfs_create_dir()
On Saturday 20 July 2013, Dan Carpenter wrote: > On Fri, Jul 19, 2013 at 12:28:41PM +0200, Arnd Bergmann wrote: > > On Friday 19 July 2013, Dan Carpenter wrote: > > > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. > > > Also my static checker doesn't like it when we print the error code, but > > > it's always just NULL. > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> > > > &g...
2013 Jul 21
2
[patch] virtio: console: fix error handling for debugfs_create_dir()
On Saturday 20 July 2013, Dan Carpenter wrote: > On Fri, Jul 19, 2013 at 12:28:41PM +0200, Arnd Bergmann wrote: > > On Friday 19 July 2013, Dan Carpenter wrote: > > > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. > > > Also my static checker doesn't like it when we print the error code, but > > > it's always just NULL. > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> > > > &g...
2013 Jul 20
0
[patch] virtio: console: fix error handling for debugfs_create_dir()
On Fri, Jul 19, 2013 at 12:28:41PM +0200, Arnd Bergmann wrote: > On Friday 19 July 2013, Dan Carpenter wrote: > > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. > > Also my static checker doesn't like it when we print the error code, but > > it's always just NULL. > > > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> > > This looks wrong. debugfs_...
2013 Jul 21
0
[patch] virtio: console: fix error handling for debugfs_create_dir()
On Sun, Jul 21, 2013 at 11:36:25AM +0200, Arnd Bergmann wrote: > On Saturday 20 July 2013, Dan Carpenter wrote: > > On Fri, Jul 19, 2013 at 12:28:41PM +0200, Arnd Bergmann wrote: > > > On Friday 19 July 2013, Dan Carpenter wrote: > > > > debugfs_create_dir() returns ERR_PTR(-ENODEV) if debugfs is disabled. > > > > Also my static checker doesn't like it when we print the error code, but > > > > it's always just NULL. > > > > > > > > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com&gt...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...called > with a random list_head and struct nvif_log::shutdown can't be called with the > "head instance" of struct struct nvif_log. Ok, I think I got it this time. I'll post a v7 soon. > > However, I think it can happen. drm_core_init() does not fail if > > debugfs_create_dir() fails: > > > > drm_debugfs_root = debugfs_create_dir("dri", NULL); > > > > It doesn't even print a warning message. It just keeps going. So I think > > there should be some error checking somewhere. > > For DRM probably not, since the ERR_PT...
2013 Jul 21
0
[patch] virtio: console: fix error handling for debugfs_create_dir()
> I don't see where that oops would happen. In the code I'm looking at, > all uses of ->debugfs_dir only ever get passed into other debugfs > functions that are stubbed out to empty inline functions. > > It's not the most obvious interface design, but this all seems intentional > and correct to me. Ah. Ok. You're right. regards, dan carpenter
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...this reads. I think I didn't quite finish the reply. Sorry for the confusion. > > So first, the check is wrong. It should be "if (!root)". That's what I meant, it can't be an ERR_PTR. > > However, I think it can happen. drm_core_init() does not fail if > debugfs_create_dir() fails: > > drm_debugfs_root = debugfs_create_dir("dri", NULL); > > It doesn't even print a warning message. It just keeps going. So I think > there should be some error checking somewhere. For DRM probably not, since the ERR_PTR is honored by other debugfs funct...
2013 Jul 29
2
[patch v2] virtio: console: cleanup an error message
...> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..4cf46d8 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,10 +2215,8 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > - PTR_ERR(pdrvdata.debugfs_dir)); > - } > + if (!pdrvdata.debugfs_dir) > + pr_warning("Error creating debugfs dir for virti...
2013 Jul 29
2
[patch v2] virtio: console: cleanup an error message
...> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..4cf46d8 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,10 +2215,8 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > - PTR_ERR(pdrvdata.debugfs_dir)); > - } > + if (!pdrvdata.debugfs_dir) > + pr_warning("Error creating debugfs dir for virti...
2014 Feb 26
0
[PATCH RFC v5 8/8] pvqspinlock, x86: Enable KVM to use qspinlock's PV support
...struct dentry *d_spin_debug; +static struct dentry *d_kvm_debug; +static u32 lh_kick_stats; /* Lock holder kick count */ +static u32 qh_kick_stats; /* Queue head kick count */ +static u32 nn_kick_stats; /* Next node kick count */ + +static int __init kvm_spinlock_debugfs(void) +{ + d_kvm_debug = debugfs_create_dir("kvm-guest", NULL); + if (!d_kvm_debug) { + printk(KERN_WARNING + "Could not create 'kvm' debugfs directory\n"); + return -ENOMEM; + } + d_spin_debug = debugfs_create_dir("spinlocks", d_kvm_debug); + + debugfs_create_u32("lh_kick_stats", 064...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...debugfs_lookup("dri", NULL); > > + if (IS_ERR(root)) { > > I don't think this can ever happen. This entry is created in drm_core_init(). So first, the check is wrong. It should be "if (!root)". However, I think it can happen. drm_core_init() does not fail if debugfs_create_dir() fails: drm_debugfs_root = debugfs_create_dir("dri", NULL); It doesn't even print a warning message. It just keeps going. So I think there should be some error checking somewhere. I tested this, and if drm_core_init() fails to create the dentry, then r535_gsp_retain_logging() w...
2013 Jul 29
1
[patch v2] virtio: console: cleanup an error message
...console.c > > > index 1b456fe..4cf46d8 100644 > > > --- a/drivers/char/virtio_console.c > > > +++ b/drivers/char/virtio_console.c > > > @@ -2215,10 +2215,8 @@ static int __init init(void) > > > } > > > > > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > > > - if (!pdrvdata.debugfs_dir) { > > > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > > > - PTR_ERR(pdrvdata.debugfs_dir)); > > > - } > > > + if (!pdrvdata.debugfs_dir) > > &...
2013 Jul 29
1
[patch v2] virtio: console: cleanup an error message
...console.c > > > index 1b456fe..4cf46d8 100644 > > > --- a/drivers/char/virtio_console.c > > > +++ b/drivers/char/virtio_console.c > > > @@ -2215,10 +2215,8 @@ static int __init init(void) > > > } > > > > > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > > > - if (!pdrvdata.debugfs_dir) { > > > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > > > - PTR_ERR(pdrvdata.debugfs_dir)); > > > - } > > > + if (!pdrvdata.debugfs_dir) > > &...
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...dev->parent ? dev_name(dev->parent) : "", + dev_name(dev)); +} + static int __init init(void) { int err; @@ -2201,6 +2222,7 @@ static int __init init(void) return err; } + pdrvdata.class->dev_uevent = class_virtio_ports_uevent; pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); if (!pdrvdata.debugfs_dir) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", -- 1.7.5.4