Re: [PATCH v4] mfd: intel-lpss: Prevent DebugFS messages if it is not initialized

From: Andy Shevchenko

Date: Tue Sep 15 2026 - 02:51:31 EST


On Mon, Sep 14, 2026 at 07:27:37PM +0500, Maria Lisina wrote:
> I'm sorry, I didn't notice the part about commit description.
>
> Also I don't really get it how is this dmesg message mandatory
> when DebugFS is completely disabled. It makes no sense to me.
> If user needs these LTR values for debugging purposes they should
> know about DebugFS. In other cases when DebugFS is disabled these
> messages shouldn't even appear as these LTR values stored in DebugFS
> don't do anything, at least if I remember correctly they aren't used
> for any purpose other than debugging while being exposed in DebugFS.

This is fair point, but the patch does something else.

In lieu of the above you can propose a change that moves
the intel_lpss_debugfs_add() function to return void and
drop the message completely justifying it as you put it
here.

Something like this (but in mangled form)

-static int intel_lpss_debugfs_add(struct intel_lpss *lpss)
+static void intel_lpss_debugfs_add(struct intel_lpss *lpss)

- if (IS_ERR(dir))
- return PTR_ERR(dir);

- return 0;

- ret = intel_lpss_debugfs_add(lpss);
+ intel_lpss_debugfs_add(lpss);
- if (ret)
- dev_warn(dev, "Failed to create debugfs entries\n");

Would it work for you?

--
With Best Regards,
Andy Shevchenko