From: Maria Lisina <sekoohaka.sarisan@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Lee Jones <lee@kernel.org>
Cc: mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
Maria Lisina <sekoohaka.sarisan@gmail.com>
Subject: [PATCH v2] mfd/intel-lpss: Fix DebugFS initialization
Date: Sun, 13 Sep 2026 17:49:11 +0500 [thread overview]
Message-ID: <20260913-intel-lpss-debugfs-v2-1-a1a4faf5cc63@gmail.com> (raw)
The original code defers DebugFS check with unnecessary warning message
which also appears when DebugFS is simply disabled.
Therefore it spams dmesg with these messages:
intel-lpss 0000:00:15.0: Failed to create debugfs entries
intel-lpss 0000:00:15.3: Failed to create debugfs entries
intel-lpss 0000:00:1e.0: Failed to create debugfs entries
intel-lpss 0000:00:1e.2: Failed to create debugfs entries
This patch adds proper checks to intel_lpss_exit() and
intel_lpss_debugfs_add() functions and removes warning message.
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
---
Changes in v2:
- Fixed function name in comment section.
- Link to v1: https://lore.kernel.org/r/20260913-intel-lpss-debugfs-v1-1-833cbb6fffc9@gmail.com
---
drivers/mfd/intel-lpss.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 63d6694f71457b2e09d238af0a9bfb897a169a64..c2cb58c0f98a996d5a2718956092e74139f2a286 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -146,9 +146,12 @@ static int intel_lpss_debugfs_add(struct intel_lpss *lpss)
{
struct dentry *dir;
+ if (!intel_lpss_debugfs) {
+ lpss->debugfs = NULL;
+ return 0;
+ }
+
dir = debugfs_create_dir(dev_name(lpss->dev), intel_lpss_debugfs);
- if (IS_ERR(dir))
- return PTR_ERR(dir);
/* Cache the values into lpss structure */
intel_lpss_cache_ltr(lpss);
@@ -432,10 +435,7 @@ int intel_lpss_probe(struct device *dev,
goto err_clk_register;
intel_lpss_ltr_expose(lpss);
-
- ret = intel_lpss_debugfs_add(lpss);
- if (ret)
- dev_warn(dev, "Failed to create debugfs entries\n");
+ intel_lpss_debugfs_add(lpss);
if (intel_lpss_has_idma(lpss)) {
ret = mfd_add_devices(dev, lpss->devid, &intel_lpss_idma64_cell,
@@ -539,6 +539,13 @@ EXPORT_NS_GPL_DEV_PM_OPS(intel_lpss_pm_ops, INTEL_LPSS) = {
static int __init intel_lpss_init(void)
{
intel_lpss_debugfs = debugfs_create_dir("intel_lpss", NULL);
+
+ /* Ensure intel_lpss_debugfs stays NULL on error,
+ * so intel_lpss_debugfs_add() exits properly.
+ */
+ if (IS_ERR(intel_lpss_debugfs))
+ intel_lpss_debugfs = NULL;
+
return 0;
}
module_init(intel_lpss_init);
---
base-commit: 2f0c1cf72f4682178506f513bbf015e591b1aa4a
change-id: 20260913-intel-lpss-debugfs-eff3580d1295
Best regards,
--
Maria Lisina <sekoohaka.sarisan@gmail.com>
reply other threads:[~2026-09-13 12:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260913-intel-lpss-debugfs-v2-1-a1a4faf5cc63@gmail.com \
--to=sekoohaka.sarisan@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
/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.