From: Nirmoy Das <nirmoy.das@amd.com> To: <dri-devel@lists.freedesktop.org> Cc: <intel-gfx@lists.freedesktop.org>, Nirmoy Das <nirmoy.das@amd.com>, "Lukas Wunner" <lukas@wunner.de>, 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: [PATCH 4/4] vgaswitcheroo: do not check for NULL debugfs dentry Date: Mon, 11 Oct 2021 21:06:07 +0200 [thread overview] Message-ID: <20211011190607.104618-4-nirmoy.das@amd.com> (raw) In-Reply-To: <20211011190607.104618-1-nirmoy.das@amd.com> Debugfs APIs returns encoded error on failure so use debugfs_lookup() instead of checking for NULL. CC: Lukas Wunner <lukas@wunner.de> CC: David Airlie <airlied@linux.ie> CC: Daniel Vetter <daniel@ffwll.ch> CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> CC: Maxime Ripard <mripard@kernel.org> CC: Thomas Zimmermann <tzimmermann@suse.de> 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..a331525f0b32 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 (debugfs_lookup("vgaswitcheroo", NULL)) return; priv->debugfs_root = debugfs_create_dir("vgaswitcheroo", NULL); -- 2.32.0
WARNING: multiple messages have this Message-ID (diff)
From: Nirmoy Das <nirmoy.das@amd.com> To: <dri-devel@lists.freedesktop.org> Cc: <intel-gfx@lists.freedesktop.org>, Nirmoy Das <nirmoy.das@amd.com>, "Lukas Wunner" <lukas@wunner.de>, 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: [Intel-gfx] [PATCH 4/4] vgaswitcheroo: do not check for NULL debugfs dentry Date: Mon, 11 Oct 2021 21:06:07 +0200 [thread overview] Message-ID: <20211011190607.104618-4-nirmoy.das@amd.com> (raw) In-Reply-To: <20211011190607.104618-1-nirmoy.das@amd.com> Debugfs APIs returns encoded error on failure so use debugfs_lookup() instead of checking for NULL. CC: Lukas Wunner <lukas@wunner.de> CC: David Airlie <airlied@linux.ie> CC: Daniel Vetter <daniel@ffwll.ch> CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> CC: Maxime Ripard <mripard@kernel.org> CC: Thomas Zimmermann <tzimmermann@suse.de> 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..a331525f0b32 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 (debugfs_lookup("vgaswitcheroo", NULL)) return; priv->debugfs_root = debugfs_create_dir("vgaswitcheroo", NULL); -- 2.32.0
next prev parent reply other threads:[~2021-10-11 19:06 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-11 19:06 [PATCH 1/4] dri: do not check for NULL debugfs dentry Nirmoy Das 2021-10-11 19:06 ` [Intel-gfx] " Nirmoy Das 2021-10-11 19:06 ` [PATCH 2/4] drm/ttm: do not set NULL to " Nirmoy Das 2021-10-11 19:06 ` [Intel-gfx] " Nirmoy Das 2021-10-12 7:09 ` Christian König 2021-10-12 7:09 ` [Intel-gfx] " Christian König 2021-10-12 8:49 ` Das, Nirmoy 2021-10-12 8:49 ` [Intel-gfx] " Das, Nirmoy 2021-10-11 19:06 ` [PATCH 3/4] drm/i915/gt: do not check for NULL " Nirmoy Das 2021-10-11 19:06 ` [Intel-gfx] " Nirmoy Das 2021-10-11 19:06 ` Nirmoy Das [this message] 2021-10-11 19:06 ` [Intel-gfx] [PATCH 4/4] vgaswitcheroo: " Nirmoy Das 2021-10-11 20:24 ` Lukas Wunner 2021-10-11 20:24 ` [Intel-gfx] " Lukas Wunner 2021-10-12 6:48 ` Lukas Wunner 2021-10-12 6:48 ` [Intel-gfx] " Lukas Wunner 2021-10-12 8:57 ` Das, Nirmoy 2021-10-12 8:57 ` Das, Nirmoy 2021-10-11 22:09 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/4] dri: " Patchwork 2021-10-11 22:40 ` [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=20211011190607.104618-4-nirmoy.das@amd.com \ --to=nirmoy.das@amd.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=lukas@wunner.de \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mripard@kernel.org \ --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: linkBe 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.