lkml.org 
[lkml]   [2021]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] hwmon: (dell-smm) Improve ioctl handler
Date
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

\
 
 \ /
  Last update: 2021-12-11 16:55    [W:0.076 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site