search for: debugfs_dir

Displaying 20 results from an estimated 55 matches for "debugfs_dir".

2013 Jul 29
2
[patch v2] virtio: console: cleanup an error message
...fferent > > 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...
2013 Jul 29
2
[patch v2] virtio: console: cleanup an error message
...fferent > > 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...
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 1b456fe..ad2cd6d 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2215,7 +2215,7 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", PTR_ERR(pdrvdata.debugfs_dir)); }
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 1b456fe..ad2cd6d 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2215,7 +2215,7 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", PTR_ERR(pdrvdata.debugfs_dir)); }
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...d > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..ad2cd6d 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,7 +2215,7 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { > pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > PTR_ERR(pdrvdata.de...
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...d > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..ad2cd6d 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,7 +2215,7 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { > pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > PTR_ERR(pdrvdata.de...
2013 Jul 29
1
[patch v2] virtio: console: cleanup an error message
...s/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.deb...
2013 Jul 29
1
[patch v2] virtio: console: cleanup an error message
...s/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.deb...
2012 Dec 20
1
[PATCH] virtio_console: correct error message on failure of debugfs_create_dir
...--- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c594cb1..490b70e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2212,10 +2212,9 @@ 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_warn("Error creating debugfs dir for virtio-ports\n&qu...
2012 Dec 20
1
[PATCH] virtio_console: correct error message on failure of debugfs_create_dir
...--- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c594cb1..490b70e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2212,10 +2212,9 @@ 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_warn("Error creating debugfs dir for virtio-ports\n&qu...
2014 Jun 29
2
[PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
.../drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 60aafb8..b585b47 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2262,8 +2262,7 @@ static int __init init(void) unregister: unregister_virtio_driver(&virtio_console); free: - if (pdrvdata.debugfs_dir) - debugfs_remove_recursive(pdrvdata.debugfs_dir); + debugfs_remove_recursive(pdrvdata.debugfs_dir); class_destroy(pdrvdata.class); return err; } @@ -2276,8 +2275,7 @@ static void __exit fini(void) unregister_virtio_driver(&virtio_rproc_serial); class_destroy(pdrvdata.class); - if (...
2014 Jun 29
2
[PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
.../drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 60aafb8..b585b47 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2262,8 +2262,7 @@ static int __init init(void) unregister: unregister_virtio_driver(&virtio_console); free: - if (pdrvdata.debugfs_dir) - debugfs_remove_recursive(pdrvdata.debugfs_dir); + debugfs_remove_recursive(pdrvdata.debugfs_dir); class_destroy(pdrvdata.class); return err; } @@ -2276,8 +2275,7 @@ static void __exit fini(void) unregister_virtio_driver(&virtio_rproc_serial); class_destroy(pdrvdata.class); - if (...
2013 Jul 29
0
[patch v2] virtio: console: cleanup an error message
...vers/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...
2013 Jul 22
0
[patch v2] virtio: console: cleanup an error message
...enter at oracle.com> --- v2: completely different 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 virtio-ports\n...
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...quot;", + 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
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...quot;", + 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
2013 Jul 21
2
[patch] virtio: console: fix error handling for debugfs_create_dir()
...Yeah. You're right. But the original code is still wrong and will > oops if debugfs is disabled. We should set the pointer to NULL if > we get a ERR_PTR(). > > I will send a v2 patch. 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. Arnd
2013 Jul 21
2
[patch] virtio: console: fix error handling for debugfs_create_dir()
...Yeah. You're right. But the original code is still wrong and will > oops if debugfs is disabled. We should set the pointer to NULL if > we get a ERR_PTR(). > > I will send a v2 patch. 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. Arnd
2015 May 08
2
[patch] virtio_console: use snprintf() for safety
...- sprintf(debugfs_name, "vport%up%u", - port->portdev->vdev->index, id); + snprintf(debugfs_name, sizeof(debugfs_name), "vport%up%u", + port->portdev->vdev->index, id); port->debugfs_file = debugfs_create_file(debugfs_name, 0444, pdrvdata.debugfs_dir, port,
2015 May 08
2
[patch] virtio_console: use snprintf() for safety
...- sprintf(debugfs_name, "vport%up%u", - port->portdev->vdev->index, id); + snprintf(debugfs_name, sizeof(debugfs_name), "vport%up%u", + port->portdev->vdev->index, id); port->debugfs_file = debugfs_create_file(debugfs_name, 0444, pdrvdata.debugfs_dir, port,