All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Mikhail Rudenko <mike.rudenko@gmail.com>, linux-media@vger.kernel.org
Cc: Mikhail Rudenko <mike.rudenko@gmail.com>,
	Helen Koike <helen.koike@collabora.com>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: rockchip: rkisp1: use device name for debugfs subdir name
Date: Tue, 12 Oct 2021 13:50:43 +0100	[thread overview]
Message-ID: <163404304327.2976390.18225391015638170307@Monstersaurus> (raw)
In-Reply-To: <20211010175457.438627-1-mike.rudenko@gmail.com>

Hi Mikhail,

Quoting Mikhail Rudenko (2021-10-10 18:54:57)
> While testing Rockchip RK3399 with both ISPs enabled, a dmesg error
> was observed:
> ```
> [   15.559141] debugfs: Directory 'rkisp1' with parent '/' already present!
> ```
> 
> Fix it by using the device name for the debugfs subdirectory name
> instead of the driver name, thus preventing name collision.
> 
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
> ---
>  drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> index 7474150b94ed..560f928c3752 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> @@ -426,7 +426,7 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
>  {
>         struct rkisp1_debug *debug = &rkisp1->debug;
>  
> -       debug->debugfs_dir = debugfs_create_dir(RKISP1_DRIVER_NAME, NULL);
> +       debug->debugfs_dir = debugfs_create_dir(dev_name(rkisp1->dev), NULL);

I would wonder if they should be grouped under a subdir called rkisp1
... but that would then still keep the same issue that whichever was
second to probe would find that /rkisp1 was already present. I suspect
debugfs would make it possible to check if the parent was already there
and only create it if it exists, but anyway, it would then be harder to
clean up too.

So separate based on the nodes sounds perfectly reasonable to me.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

>         debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir,
>                              &debug->data_loss);
>         debugfs_create_ulong("outform_size_err", 0444,  debug->debugfs_dir,
> -- 
> 2.33.0
>

WARNING: multiple messages have this Message-ID (diff)
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Mikhail Rudenko <mike.rudenko@gmail.com>, linux-media@vger.kernel.org
Cc: Mikhail Rudenko <mike.rudenko@gmail.com>,
	Helen Koike <helen.koike@collabora.com>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: rockchip: rkisp1: use device name for debugfs subdir name
Date: Tue, 12 Oct 2021 13:50:43 +0100	[thread overview]
Message-ID: <163404304327.2976390.18225391015638170307@Monstersaurus> (raw)
In-Reply-To: <20211010175457.438627-1-mike.rudenko@gmail.com>

Hi Mikhail,

Quoting Mikhail Rudenko (2021-10-10 18:54:57)
> While testing Rockchip RK3399 with both ISPs enabled, a dmesg error
> was observed:
> ```
> [   15.559141] debugfs: Directory 'rkisp1' with parent '/' already present!
> ```
> 
> Fix it by using the device name for the debugfs subdirectory name
> instead of the driver name, thus preventing name collision.
> 
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
> ---
>  drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> index 7474150b94ed..560f928c3752 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> @@ -426,7 +426,7 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
>  {
>         struct rkisp1_debug *debug = &rkisp1->debug;
>  
> -       debug->debugfs_dir = debugfs_create_dir(RKISP1_DRIVER_NAME, NULL);
> +       debug->debugfs_dir = debugfs_create_dir(dev_name(rkisp1->dev), NULL);

I would wonder if they should be grouped under a subdir called rkisp1
... but that would then still keep the same issue that whichever was
second to probe would find that /rkisp1 was already present. I suspect
debugfs would make it possible to check if the parent was already there
and only create it if it exists, but anyway, it would then be harder to
clean up too.

So separate based on the nodes sounds perfectly reasonable to me.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

>         debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir,
>                              &debug->data_loss);
>         debugfs_create_ulong("outform_size_err", 0444,  debug->debugfs_dir,
> -- 
> 2.33.0
>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Mikhail Rudenko <mike.rudenko@gmail.com>, linux-media@vger.kernel.org
Cc: Mikhail Rudenko <mike.rudenko@gmail.com>,
	Helen Koike <helen.koike@collabora.com>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: rockchip: rkisp1: use device name for debugfs subdir name
Date: Tue, 12 Oct 2021 13:50:43 +0100	[thread overview]
Message-ID: <163404304327.2976390.18225391015638170307@Monstersaurus> (raw)
In-Reply-To: <20211010175457.438627-1-mike.rudenko@gmail.com>

Hi Mikhail,

Quoting Mikhail Rudenko (2021-10-10 18:54:57)
> While testing Rockchip RK3399 with both ISPs enabled, a dmesg error
> was observed:
> ```
> [   15.559141] debugfs: Directory 'rkisp1' with parent '/' already present!
> ```
> 
> Fix it by using the device name for the debugfs subdirectory name
> instead of the driver name, thus preventing name collision.
> 
> Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
> ---
>  drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> index 7474150b94ed..560f928c3752 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
> @@ -426,7 +426,7 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
>  {
>         struct rkisp1_debug *debug = &rkisp1->debug;
>  
> -       debug->debugfs_dir = debugfs_create_dir(RKISP1_DRIVER_NAME, NULL);
> +       debug->debugfs_dir = debugfs_create_dir(dev_name(rkisp1->dev), NULL);

I would wonder if they should be grouped under a subdir called rkisp1
... but that would then still keep the same issue that whichever was
second to probe would find that /rkisp1 was already present. I suspect
debugfs would make it possible to check if the parent was already there
and only create it if it exists, but anyway, it would then be harder to
clean up too.

So separate based on the nodes sounds perfectly reasonable to me.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

>         debugfs_create_ulong("data_loss", 0444, debug->debugfs_dir,
>                              &debug->data_loss);
>         debugfs_create_ulong("outform_size_err", 0444,  debug->debugfs_dir,
> -- 
> 2.33.0
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-10-12 12:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10 17:54 [PATCH] media: rockchip: rkisp1: use device name for debugfs subdir name Mikhail Rudenko
2021-10-10 17:54 ` Mikhail Rudenko
2021-10-10 17:54 ` Mikhail Rudenko
2021-10-12  3:24 ` Ezequiel Garcia
2021-10-12  3:24   ` Ezequiel Garcia
2021-10-12  3:24   ` Ezequiel Garcia
2021-10-12 12:50 ` Kieran Bingham [this message]
2021-10-12 12:50   ` Kieran Bingham
2021-10-12 12:50   ` Kieran Bingham
2021-11-13 23:33 ` Mikhail Rudenko
2021-11-13 23:33   ` Mikhail Rudenko
2021-11-13 23:33   ` Mikhail Rudenko

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=163404304327.2976390.18225391015638170307@Monstersaurus \
    --to=kieran.bingham@ideasonboard.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=heiko@sntech.de \
    --cc=helen.koike@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=mike.rudenko@gmail.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 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.