From: Lukas Wunner <lukas@wunner.de>
To: Nirmoy Das <nirmoy.das@amd.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [Intel-gfx] [PATCH v2 4/4] vgaswitcheroo: do not check for NULL debugfs dentry
Date: Sun, 17 Oct 2021 22:03:55 +0200 [thread overview]
Message-ID: <20211017200355.GA3480@wunner.de> (raw)
In-Reply-To: <20211013183601.16514-4-nirmoy.das@amd.com>
On Wed, Oct 13, 2021 at 08:36:01PM +0200, Nirmoy Das wrote:
> Debugfs APIs returns encoded error on failure so use
> debugfs_lookup() instead of checking for NULL.
The commit message no longer matches up with the patch itself
(debugfs_lookup() isn't called).
My suggestion would be something like:
Retry creation of the vga_switcheroo debugfs if a previous
invocation of debugfs_create_dir() returned an error code.
With that addressed,
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Thanks,
Lukas
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
> drivers/gpu/vga/vga_switcheroo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
> index 365e6ddbe90f..07ab8d85e899 100644
> --- a/drivers/gpu/vga/vga_switcheroo.c
> +++ b/drivers/gpu/vga/vga_switcheroo.c
> @@ -914,7 +914,7 @@ static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv)
> static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv)
> {
> /* already initialised */
> - if (priv->debugfs_root)
> + if (priv->debugfs_root && !IS_ERR(priv->debugfs_root))
> return;
>
> priv->debugfs_root = debugfs_create_dir("vgaswitcheroo", NULL);
> --
> 2.32.0
WARNING: multiple messages have this Message-ID (diff)
From: Lukas Wunner <lukas@wunner.de>
To: Nirmoy Das <nirmoy.das@amd.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH v2 4/4] vgaswitcheroo: do not check for NULL debugfs dentry
Date: Sun, 17 Oct 2021 22:03:55 +0200 [thread overview]
Message-ID: <20211017200355.GA3480@wunner.de> (raw)
In-Reply-To: <20211013183601.16514-4-nirmoy.das@amd.com>
On Wed, Oct 13, 2021 at 08:36:01PM +0200, Nirmoy Das wrote:
> Debugfs APIs returns encoded error on failure so use
> debugfs_lookup() instead of checking for NULL.
The commit message no longer matches up with the patch itself
(debugfs_lookup() isn't called).
My suggestion would be something like:
Retry creation of the vga_switcheroo debugfs if a previous
invocation of debugfs_create_dir() returned an error code.
With that addressed,
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Thanks,
Lukas
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
> drivers/gpu/vga/vga_switcheroo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
> index 365e6ddbe90f..07ab8d85e899 100644
> --- a/drivers/gpu/vga/vga_switcheroo.c
> +++ b/drivers/gpu/vga/vga_switcheroo.c
> @@ -914,7 +914,7 @@ static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv)
> static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv)
> {
> /* already initialised */
> - if (priv->debugfs_root)
> + if (priv->debugfs_root && !IS_ERR(priv->debugfs_root))
> return;
>
> priv->debugfs_root = debugfs_create_dir("vgaswitcheroo", NULL);
> --
> 2.32.0
next prev parent reply other threads:[~2021-10-17 20:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 18:35 [Intel-gfx] [PATCH v2 1/4] dri: do not check for NULL debugfs dentry Nirmoy Das
2021-10-13 18:35 ` Nirmoy Das
2021-10-13 18:35 ` [Intel-gfx] [PATCH 2/4] drm/ttm: do not set NULL to " Nirmoy Das
2021-10-13 18:35 ` Nirmoy Das
2021-10-13 18:36 ` [Intel-gfx] [PATCH 3/4] drm/i915/gt: do not check for NULL " Nirmoy Das
2021-10-13 18:36 ` Nirmoy Das
2021-10-13 18:36 ` [Intel-gfx] [PATCH v2 4/4] vgaswitcheroo: " Nirmoy Das
2021-10-13 18:36 ` Nirmoy Das
2021-10-17 20:03 ` Lukas Wunner [this message]
2021-10-17 20:03 ` Lukas Wunner
2021-10-18 8:28 ` [Intel-gfx] " Das, Nirmoy
2021-10-18 8:28 ` Das, Nirmoy
2021-10-13 18:43 ` [Intel-gfx] [PATCH v2 1/4] dri: " Das, Nirmoy
2021-10-13 18:43 ` Das, Nirmoy
2021-10-13 19:00 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/4] " Patchwork
2021-10-13 19:03 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-10-13 19:32 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
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=20211017200355.GA3480@wunner.de \
--to=lukas@wunner.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nirmoy.das@amd.com \
--cc=tzimmermann@suse.de \
/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.