From: Armin Wolf <W_Armin@gmx.de>
To: pali@kernel.org
Cc: jdelvare@suse.com, linux@roeck-us.net,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] hwmon: (dell-smm) Improve ioctl handler
Date: Sat, 11 Dec 2021 16:54:20 +0100 [thread overview]
Message-ID: <20211211155422.16830-1-W_Armin@gmx.de> (raw)
This patch series improves the ioctl handler in dell_smm_hwmon.
The first patch is simplifying the ioctl handler by removing
an unnecessary switch case, while the second patch is unifying
both i8k_ioctl() and i8k_ioctl_unlocked(), resulting in better
performance since i8k_mutex is only acquired when needed
(during fan status change) instead of being acquired for
every ioctl call.
Tested on a Dell Inspiron 3505.
changes in v2:
- simplify logic between mutex_lock()/_unlock()
- replace hardcoded values with sizeof statements
Armin Wolf (2):
hwmon: (dell-smm) Simplify ioctl handler
hwmon: (dell-smm) Unify i8k_ioctl() and i8k_ioctl_unlocked()
drivers/hwmon/dell-smm-hwmon.c | 58 +++++++++++-----------------------
1 file changed, 18 insertions(+), 40 deletions(-)
--
2.30.2
next reply other threads:[~2021-12-11 15:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-11 15:54 Armin Wolf [this message]
2021-12-11 15:54 ` [PATCH v2 1/2] hwmon: (dell-smm) Simplify " Armin Wolf
2021-12-11 16:04 ` Pali Rohár
2021-12-17 15:37 ` Guenter Roeck
2021-12-11 15:54 ` [PATCH v2 2/2] hwmon: (dell-smm) Unify i8k_ioctl() and i8k_ioctl_unlocked() Armin Wolf
2021-12-11 16:05 ` Pali Rohár
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=20211211155422.16830-1-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pali@kernel.org \
/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®