From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2] driver core: add a debugfs entry to show deferred devices
Date: Wed, 20 Jun 2018 05:29:59 +0900 [thread overview]
Message-ID: <20180619202959.GA19129@kroah.com> (raw)
In-Reply-To: <CAHp75VdpHdanWJmcwLBRTSDoDkbpPxuAGwwVO0hosXSRn4PUoA@mail.gmail.com>
On Tue, Jun 19, 2018 at 10:55:20PM +0300, Andy Shevchenko wrote:
> On Tue, Jun 19, 2018 at 10:53 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Tue, Jun 19, 2018 at 9:33 PM, Javier Martinez Canillas
> > <javierm@redhat.com> wrote:
> >> For debugging purposes it may be useful to know what are the devices whose
> >> probe function was deferred. Add a debugfs entry showing that information.
>
> >> +static int deferred_devs_open(struct inode *inode, struct file *file)
> >> +{
> >> + return single_open(file, deferred_devs_show, inode->i_private);
> >> +}
> >> +
> >> +static const struct file_operations deferred_devs_fops = {
> >> + .owner = THIS_MODULE,
> >> + .open = deferred_devs_open,
> >> + .read = seq_read,
> >> + .llseek = seq_lseek,
> >> + .release = single_release,
> >> +};
> >
> > Isn't this DEFINE_SHOW_ATTRIBUTE() ?
>
> Besides that, you are summoning Greg's dark side :-)
> See below.
>
> >> + if (IS_ENABLED(CONFIG_DEBUG_FS)) {
> >> + deferred_devices = debugfs_create_file("deferred_devices",
> >> + 0444, NULL, NULL,
> >> + &deferred_devs_fops);
>
> >> + if (!deferred_devices)
> >> + return -ENOMEM;
>
> This must not prevent the execution. So, the check introduces actually
> a regression.
Awe, you beat me to it :)
Also, I don't usually comment on RFC patches, as that shows the author
really doesn't think that the code is ready to be reviewed/merged...
thanks,
greg k-h
next prev parent reply other threads:[~2018-06-19 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 18:33 [RFC PATCH v2] driver core: add a debugfs entry to show deferred devices Javier Martinez Canillas
2018-06-19 19:53 ` Andy Shevchenko
2018-06-19 19:55 ` Andy Shevchenko
2018-06-19 20:29 ` Greg Kroah-Hartman [this message]
2018-06-19 20:54 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180619202959.GA19129@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox