From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Maria Lisina <sekoohaka.sarisan@gmail.com>
Cc: Lee Jones <lee@kernel.org>,
mfd@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] mfd: intel-lpss: Clean up and modernize DebugFS usage
Date: Wed, 16 Sep 2026 10:23:14 +0300 [thread overview]
Message-ID: <aqpD4q6jMw2FdArD@ashevche-desk.local> (raw)
In-Reply-To: <20260916-intel-lpss-debugfs-v5-1-99295f534067@gmail.com>
On Wed, Sep 16, 2026 at 03:13:35AM +0500, Maria Lisina wrote:
Thank you for the update, my comments below.
> The DebugFS API is designed to handle errors gracefully.
> Any explicit checking on return values is considered an anti-pattern.
>
> This patch removes unnecessary error checking and converts
> intel_lpss_debugfs_add() into a void function.
Yep, these two paragraphs are good!
> While at it, this patch also clean ups legacy and deprecated usage
> of S_IRUGO macro and debugfs_remove_recursive() function.
No, this should be a separate patch.
...
> -static int intel_lpss_debugfs_add(struct intel_lpss *lpss)
> +static void intel_lpss_debugfs_add(struct intel_lpss *lpss)
> {
> - struct dentry *dir;
> -
> - dir = debugfs_create_dir(dev_name(lpss->dev), intel_lpss_debugfs);
> + lpss->debugfs =
> + debugfs_create_dir(dev_name(lpss->dev), intel_lpss_debugfs);
> - lpss->debugfs = dir;
This is unneeded churn. Yes, I understand that dir won't be used, but if you
really want to refactor do it in a separate change.
> }
...
> static void intel_lpss_debugfs_remove(struct intel_lpss *lpss)
> {
> - debugfs_remove_recursive(lpss->debugfs);
> + debugfs_remove(lpss->debugfs);
Hmm... Why?
> }
...
So, if you really want a refactoring, split this to up to three patches:
1) drop debugfs checks along with the warn message (as your initial goal);
2) replace macros by plain octal values for the permissions (optional);
3) assign debugfs directory directly (optional).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-16 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 22:13 Maria Lisina
2026-09-16 7:23 ` Andy Shevchenko [this message]
2026-09-16 7:25 ` Andy Shevchenko
2026-09-16 10:27 ` Lee Jones
2026-09-16 11:01 ` Andy Shevchenko
2026-09-16 13:42 ` Lee Jones
2026-09-16 15:42 ` Andy Shevchenko
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=aqpD4q6jMw2FdArD@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=sekoohaka.sarisan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®