dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function
Date: Fri, 14 Jun 2019 17:19:58 +0200	[thread overview]
Message-ID: <20190614151958.GA18049@kroah.com> (raw)
In-Reply-To: <20190614145908.GZ23020@phenom.ffwll.local>

On Fri, Jun 14, 2019 at 04:59:08PM +0200, Daniel Vetter wrote:
> On Fri, Jun 14, 2019 at 11:51:09AM +0200, Greg Kroah-Hartman wrote:
> > The function can not fail, and no one checks the current return value,
> > so just mark it as a void function so no one gets confused.
> > 
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  drivers/gpu/drm/drm_debugfs.c | 5 ++---
> >  include/drm/drm_debugfs.h     | 9 ++++-----
> >  2 files changed, 6 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
> > index 6f2802e9bfb5..515569002c86 100644
> > --- a/drivers/gpu/drm/drm_debugfs.c
> > +++ b/drivers/gpu/drm/drm_debugfs.c
> > @@ -270,8 +270,8 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
> >  }
> >  
> >  
> > -int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
> > -			     struct drm_minor *minor)
> > +void drm_debugfs_remove_files(const struct drm_info_list *files, int count,
> > +			      struct drm_minor *minor)
> 
> We're trying to entirely nuke this function here, see the kerneldoc for
> drm_debugfs_create_files(). Only user left is tegra, and we call the
> "remove all debugfs files" and the ->early_unregister hooks all from the
> same place. So this can all be garbage collected. It's mildly annoying
> because we'd need to move the kfree from ->early_unregister into ->destroy
> callbacks, because connectors are unregister before we throw away all the
> debugfs files in drm_dev_unregister(). But imo that's cleaner anway.

I would love to see this function gone, it can also make things a lot
simpler from the point of view of creating the debugfs files as well, as
no dentries will need to be saved.

> Up for that?

Sure, I can do that.  I have a much larger patch messing with
drm_debugfs_create_files() that I want you all to be in a good mood for
when I submit it (it touches all drivers at once), so I might as well
clean this up first :)

Give me a week, I'm supposed to be writing my slides for a conference
now, instead I'm procrastinating by writing debugfs cleanup patches, I
need to stop...

thanks,

greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-06-14 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14  9:51 [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function Greg Kroah-Hartman
2019-06-14  9:51 ` [PATCH 2/2] drm: debugfs: make drm_debugfs_create_files() never fail Greg Kroah-Hartman
2019-06-14 15:10   ` Daniel Vetter
2019-06-14 14:59 ` [PATCH 1/2] drm: debugfs: make drm_debugfs_remove_files() a void function Daniel Vetter
2019-06-14 15:19   ` Greg Kroah-Hartman [this message]
2019-06-14 15:37     ` Daniel Vetter
2019-06-18 12:01       ` Greg Kroah-Hartman
2019-06-18 12:17         ` Daniel Vetter
2019-06-18 15:09           ` Greg Kroah-Hartman

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=20190614151958.GA18049@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=sean@poorly.run \
    /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