public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Benjamin Romer <benjamin.romer@unisys.com>
Cc: sparmaintainer@unisys.com, linux-kernel@vger.kernel.org,
	jkc@redhat.com, devel@driverdev.osuosl.org
Subject: Re: [PATCH 2/7] staging: unisys: move uislib/platform proc entry to debugfs
Date: Sun, 18 May 2014 09:49:18 -0700	[thread overview]
Message-ID: <20140518164918.GA10285@kroah.com> (raw)
In-Reply-To: <1399912715-16142-3-git-send-email-benjamin.romer@unisys.com>

On Mon, May 12, 2014 at 12:38:30PM -0400, Benjamin Romer wrote:
> Convert /proc/uislib/platform to an equivalent entry in debugfs.
> 
> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
> ---
>  drivers/staging/unisys/uislib/uislib.c | 62 ++++++++++------------------------
>  1 file changed, 17 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
> index fdc23676..b71f387 100644
> --- a/drivers/staging/unisys/uislib/uislib.c
> +++ b/drivers/staging/unisys/uislib/uislib.c
> @@ -23,6 +23,7 @@
>  #include <config/modversions.h>
>  #endif
>  #include <linux/module.h>
> +#include <linux/debugfs.h>
>  
>  #include "commontypes.h"
>  
> @@ -91,19 +92,23 @@ static int Go_Polling_Device_Channels;
>  static struct proc_dir_entry *uislib_proc_dir;
>  static struct proc_dir_entry *uislib_proc_vbus_dir;
>  static struct proc_dir_entry *info_proc_entry;
> -static struct proc_dir_entry *platformnumber_proc_entry;
>  static struct proc_dir_entry *cycles_before_wait_proc_entry;
>  static struct proc_dir_entry *smart_wakeup_proc_entry;
>  
>  #define DIR_PROC_ENTRY "uislib"
>  #define DIR_VBUS_PROC_ENTRY "vbus"
>  #define INFO_PROC_ENTRY_FN "info"
> -#define PLATFORMNUMBER_PROC_ENTRY_FN "platform"
>  #define CYCLES_BEFORE_WAIT_PROC_ENTRY_FN "cycles_before_wait"
>  #define SMART_WAKEUP_PROC_ENTRY_FN "smart_wakeup"
>  #define CALLHOME_PROC_ENTRY_FN "callhome"
>  #define CALLHOME_THROTTLED_PROC_ENTRY_FN "callhome_throttled"
>  
> +#define DIR_DEBUGFS_ENTRY "uislib"
> +static struct dentry *dir_debugfs;
> +
> +#define PLATFORMNUMBER_DEBUGFS_ENTRY_FN "platform"
> +static struct dentry *platformnumber_debugfs_read;

There's no need to keep this dentry around, you can just remove all the
debugfs files in your directory recursively when you exit.  That will
save you code and logic overall.

I'll leave this for now, you can clean that up in a future patch.

Also, why are these entries moving to debugfs at all?  Why are they
needed?  Who will use them?  Are tools relying on them to be there?

thanks,

greg k-h

  reply	other threads:[~2014-05-18 17:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 16:38 [PATCH 0/7] staging: unisys: cleanup proc entries in uislib Benjamin Romer
2014-05-12 16:38 ` [PATCH 1/7] staging: unisys: remove testing proc interfaces from uislib Benjamin Romer
2014-05-12 16:38 ` [PATCH 2/7] staging: unisys: move uislib/platform proc entry to debugfs Benjamin Romer
2014-05-18 16:49   ` Greg KH [this message]
2014-05-19 14:42     ` Romer, Benjamin M
2014-05-19 19:57       ` Dan Carpenter
2014-05-20  1:09         ` Greg KH
2014-05-20 13:20           ` Romer, Benjamin M
2014-05-12 16:38 ` [PATCH 3/7] staging: unisys: move uislib/cycles_before_wait " Benjamin Romer
2014-05-12 16:38 ` [PATCH 4/7] staging: unisys: move uislib/smart_wakeup " Benjamin Romer
2014-05-12 16:38 ` [PATCH 5/7] staging: unisys: remove functions made redundant in uislib.c Benjamin Romer
2014-05-12 16:38 ` [PATCH 6/7] staging: unisys: move uislib/info proc entry to debugfs Benjamin Romer
2014-05-12 16:38 ` [PATCH 7/7] staging: unisys: remove remaining proc directory entries Benjamin Romer

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=20140518164918.GA10285@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=benjamin.romer@unisys.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=jkc@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparmaintainer@unisys.com \
    /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