All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Subject: Re: [PATCH 5/6] USB: typec: fusb302: create debugfs subdir for the driver
Date: Tue, 16 Feb 2021 07:24:14 -0800	[thread overview]
Message-ID: <46f9d74a-85a5-835b-208a-c612e2c56199@roeck-us.net> (raw)
In-Reply-To: <20210216144645.3813043-5-gregkh@linuxfoundation.org>

On 2/16/21 6:46 AM, Greg Kroah-Hartman wrote:
> The single debugfs file for this driver really is a log file, so make a
> subdir and call it "log" to make it obvious this is what it is for.
> This makes cleanup simpler as we just remove the whole directory, no
> need to handle individual files anymore.
> 
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

I'd probably have explored the possibility to group files like this
under the newly created tcpm debugfs directory, but that is really
a nitpick.

Guenter

> ---
>  drivers/usb/typec/tcpm/fusb302.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c
> index ebc46b9f776c..7a2a17866a82 100644
> --- a/drivers/usb/typec/tcpm/fusb302.c
> +++ b/drivers/usb/typec/tcpm/fusb302.c
> @@ -213,8 +213,9 @@ static void fusb302_debugfs_init(struct fusb302_chip *chip)
>  
>  	mutex_init(&chip->logbuffer_lock);
>  	snprintf(name, NAME_MAX, "fusb302-%s", dev_name(chip->dev));
> -	chip->dentry = debugfs_create_file(name, S_IFREG | 0444, usb_debug_root,
> -					   chip, &fusb302_debug_fops);
> +	chip->dentry = debugfs_create_dir(name, usb_debug_root);
> +	debugfs_create_file("log", S_IFREG | 0444, chip->dentry, chip,
> +			    &fusb302_debug_fops);
>  }
>  
>  static void fusb302_debugfs_exit(struct fusb302_chip *chip)
> 


  reply	other threads:[~2021-02-16 15:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 14:46 [PATCH 1/6] USB: host: isp116x: remove dentry pointer for debugfs Greg Kroah-Hartman
2021-02-16 14:46 ` [PATCH 2/6] USB: host: isp1362: " Greg Kroah-Hartman
2021-02-16 14:46 ` [PATCH 3/6] USB: host: sl811: " Greg Kroah-Hartman
2021-02-16 14:46 ` [PATCH 4/6] USB: host: uhci: " Greg Kroah-Hartman
2021-02-16 14:46 ` [PATCH 5/6] USB: typec: fusb302: create debugfs subdir for the driver Greg Kroah-Hartman
2021-02-16 15:24   ` Guenter Roeck [this message]
2021-03-02  7:32     ` Greg Kroah-Hartman
2021-03-01 15:15   ` Heikki Krogerus
2021-02-16 14:46 ` [PATCH 6/6] USB: typec: tcpm: " Greg Kroah-Hartman
2021-02-16 15:22   ` Guenter Roeck
2021-03-01 15:16   ` Heikki Krogerus

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=46f9d74a-85a5-835b-208a-c612e2c56199@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.