Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFB34C433FE for ; Sat, 20 Nov 2021 17:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237823AbhKTRGp (ORCPT ); Sat, 20 Nov 2021 12:06:45 -0500 Received: from mout.gmx.net ([212.227.17.20]:37947 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbhKTRGo (ORCPT ); Sat, 20 Nov 2021 12:06:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1637427803; bh=FvLtXViYCFF6joVrwb7GrrUgr6TUM2iKs9tppUNqS2w=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=MyaWGYbMtoBsDc2+uZoA+tedmnZNaWM9RdggJDThmPjiLHMQMFYmywgRhWEqL66yn JN+31S4ZWAE+YlXH9uLs+GJ6gpBgdfCQJdMTimJmo0tjXX5bfyDi9NXUlaMPapweJ8 FfgFOZaMnD7FM8dSIDUUqqA7p1YdcoQ0Tacygd08= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from esprimo-mx.fritz.box ([91.137.126.34]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAfUe-1mv2Hr0x56-00B5OW; Sat, 20 Nov 2021 18:03:23 +0100 From: Armin Wolf To: pali@kernel.org Cc: jdelvare@suse.com, linux@roeck-us.net, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] hwmon: (dell-smm) Improve ioctl handler Date: Sat, 20 Nov 2021 18:03:17 +0100 Message-Id: <20211120170319.72369-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-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0y2izsShtzSA5ublvZUKpjNqyXmvTFZrjdjim57EoG 7pDuySUAT0lXW4yqAPINXWnCqY7cals/MZ4aLklGobjY4b5pySVU/HyVtWRONDXnzOJVu5p+o JVVElzh3URNfRXJCpcdYwk/okMmlEz1TbGoATcXGjxhofNJwHICMW2hV4dGaOameOmyrrQtk1 ItoTmqnGL41Rgr2lqPRkNsobDpu6V4HzDv+Dt/13/OuOlP9jGa0p4C8gYvyhMzhQzEzM+zrYA vLMf8mLTXwypeZ4rI/VuJECjdYXKFr7umNLuYc2aEzgsl67X0ios5NPOVNbVlJDcctgF1a5gO E9M8bUNxWVusa0= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 | 57 +++++++++++----------------------- 1 file changed, 18 insertions(+), 39 deletions(-) =2D- 2.30.2