Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2456040lqz; Tue, 2 Apr 2024 19:58:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkTeEN4s5Afr6/gfJ2KpAU/+viUYs1YbQatYxUM6F75/vK+oSuaGdDZR8Bmiet8v/7P3VWorFtPdAUMP/qN8xV1Ju5PQIH/ywD6WoyIA== X-Google-Smtp-Source: AGHT+IE7/aMSG8LePL03/MHV4twhZ/rNUeV2vv6z2qNsjAV84OscVOP6Vx1FTo5kYZjlrdkbRhP6 X-Received: by 2002:a05:6512:159a:b0:515:c0e9:e54 with SMTP id bp26-20020a056512159a00b00515c0e90e54mr11455109lfb.5.1712113121318; Tue, 02 Apr 2024 19:58:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712113121; cv=pass; d=google.com; s=arc-20160816; b=KZxdBL0aUAWHA1m6IV3qxXuwHdIGIh1HMNx7otaaFGeiPWfwsnJCHmkAoDqjM+CodI VXdebkdugvuHM+5CdcHacvkJuokC48ifr6PAJn5GxQ1HaZSIVYmeUtozENQB5tAzenOE s9foUTBY1JZ9N+cGtxLBra9iHqlPUqzVc4lea8mBgYrPTqiagUWjNIr+XDFQIqDsWMMY x96/gwnRc3J2UCTe/Qqq0t/dj+g8Zl9YJegWrbCG76tiTpbTWR239n+ITThBJcNpn1xJ FnxMnUpmOPrY5fEM0sbVz150zI/IQF4yVCzzXJtdcuedyMb5TM6GZskcleVO3a2loJ64 4v3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=dcJf/uhZRGW+ikiB54OFQL0MBarFcEONBJk1uxSQBNw=; fh=wDrqx0f+299Z9E/ydfQE0sLKgm4EkrYz7I1GVgXm5co=; b=pNT1E9eVvR+txbrMFHK89UkmrB7BOiXaG7TbP/7shsP+5tBw8mQNwbNfyG9nD9ZwZ+ 52iAkkoRQMhGW1Kx9j9au4jYm0pPy4ikFTyVrXgo6m9ZJBASyKMcHA0yRh0ngaQI5FL0 nNmc1I7z71HMHWhzbzyjGrzJizOuRBL4XHehJpG90k0q1GHk/ZZ8olag47HjjLXbq5rN X6tN4/Y4arYzumzN6aWmJkD38dHa+xGg3OFi3DqJKmazGBO8zqc6jvCrNxxto/F4L6Q3 N/qmszTqxvktbK/ObLcadgVi+d6eMCqDr/9iBmPoRUVYMs8sn2RmRT2iIY+b02zel02u OM4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm3 header.b=JCXBOTNF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=TOdPx2VN; arc=pass (i=1 dkim=pass dkdomain=ljones.dev dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-128879-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128879-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z2-20020a1709063ac200b00a45811c5fa8si6082579ejd.222.2024.04.02.19.58.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 19:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128879-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm3 header.b=JCXBOTNF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=TOdPx2VN; arc=pass (i=1 dkim=pass dkdomain=ljones.dev dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-128879-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128879-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 56FE71F29755 for ; Wed, 3 Apr 2024 00:31:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E6061BC4B; Wed, 3 Apr 2024 00:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev header.b="JCXBOTNF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="TOdPx2VN" Received: from fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60C3E199B4; Wed, 3 Apr 2024 00:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712104187; cv=none; b=fRhPaF5oz2sRqUnYt+M71JVrzJQbj1jMUHfRqQf7Q3MCSbdzfUDB+sT9mi54VC2aKhHK3nE8hW433NbD882kjYb2zWtf/2ZEkHGsDw0uZK6YQCfzqwJJGyeqi8ldC0a4UpTVhRoegfSb789X4Fw9XGGLIUuCc+M8NsDom94qoIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712104187; c=relaxed/simple; bh=NRq9T9dTBGop8ST/HCJTvuOwuOGjuthRTQcwuxHAPBc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FJrYKZLiFVpb0IfgcjEj4yiO3CV6rf4xg/StU4OaZwUwfYsELETjB8VHeFBT+ui55VT6698LgoJvZjjo1mkQSs2ZD0zZGl/ZjxCbgUV38sgLoRUYU9prq3f7x06cLvH3Iv0hEQe5Hw7DIP+L0mrOBNHGMfurgS/Hs1jwsylK5xw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ljones.dev; spf=none smtp.mailfrom=ljones.dev; dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev header.b=JCXBOTNF; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=TOdPx2VN; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ljones.dev Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ljones.dev Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 619F313800D4; Tue, 2 Apr 2024 20:29:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 02 Apr 2024 20:29:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1712104184; x=1712190584; bh=dcJf/uhZRGW+ikiB54OFQL0MBarFcEONBJk1uxSQBNw=; b= JCXBOTNFLYPRyAj9FGRoLLMsJJdjzU/3uop4Yad6aALyCV6IqV8d/XpfLLNN3z4N 0Uc43J+qInfUCHqvrTTNVrM0hymqK4c+Ah6JYAq8eINqXP5jum+gm5VC67lIKG/D Ra+GlJYVZdX81ccPhI515v/KnSyk+cBLzjnSl456BHtCrUl4ZNLDk33LrSb0AsO1 /Nw/5Hp5vkAi6nnbsQHoxybLjDi+bVRkYJJJgNxfE3NWBCIvS5LDagAbiwrOQBB6 3tEZaHTQOq5zUQgvLQ06c5ZA69TLyhOLISEXPSYdFkPqNi8uOO6jjvlhAdjFpSC5 ecjYYnueemPrFuMKQprlkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712104184; x= 1712190584; bh=dcJf/uhZRGW+ikiB54OFQL0MBarFcEONBJk1uxSQBNw=; b=T OdPx2VNJpVSXGLk1kL6Mhzbacel54KdphZW4D1VoQTkRecJnZJT3ob5x+no9Skcg b/WWZFGl+0T4CFvizqrcRaq35/kiEdzCJOMk7nkQuK0JxAqRymBmmXk8yjzcCMl2 5zuKilcbLbTZ5ithZDRx9FBeyQQRwFXC5lP0ar4Xq+RrhAQ+GcPJMKaY2UxSofBl Fd0ugOcfOefgP36Qd9gOJeAmWjP3SrX4tMudk/ErUmZJnog6LY9ObYZW73BJbLZM t3pHCPx3gza2BWSLrTkPyFG2MvPbiEGrvxneD1AdcxwmnfGuVT746JWREekyMMBq dOz1M6koj+dN7kYVT0+EA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeffedgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepfdfnuhhkvgcuffdrucflohhnvghsfdcuoehluhhkvges lhhjohhnvghsrdguvghvqeenucggtffrrghtthgvrhhnpeduudetudehiedvvdevveelhf egkeefffdvfeetuefgveefgffgffeiffeitdelieenucevlhhushhtvghrufhiiigvpedu necurfgrrhgrmhepmhgrihhlfhhrohhmpehluhhkvgeslhhjohhnvghsrdguvghv X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Apr 2024 20:29:41 -0400 (EDT) From: "Luke D. Jones" To: hdegoede@redhat.com Cc: corentin.chary@gmail.com, ilpo.jarvinen@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, "Luke D. Jones" Subject: [PATCH v3 6/9] platform/x86: asus-wmi: adjust formatting of ppt-() functions Date: Wed, 3 Apr 2024 13:29:14 +1300 Message-ID: <20240403002917.2870959-7-luke@ljones.dev> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240403002917.2870959-1-luke@ljones.dev> References: <20240403002917.2870959-1-luke@ljones.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shift the call to dev_get_drvdata() up to top of the function block in all of the ppt_() functions as part of a minor cleanup. Reviewed-by: Ilpo Järvinen Signed-off-by: Luke D. Jones --- drivers/platform/x86/asus-wmi.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index f87500d87f56..aad4f94cfdba 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -1008,11 +1008,10 @@ static ssize_t ppt_pl2_sppt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; @@ -1052,11 +1051,10 @@ static ssize_t ppt_pl1_spl_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; @@ -1095,11 +1093,10 @@ static ssize_t ppt_fppt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; @@ -1139,11 +1136,10 @@ static ssize_t ppt_apu_sppt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; @@ -1183,11 +1179,10 @@ static ssize_t ppt_platform_sppt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; @@ -1227,11 +1222,10 @@ static ssize_t nv_dynamic_boost_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; @@ -1271,11 +1265,10 @@ static ssize_t nv_temp_target_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + struct asus_wmi *asus = dev_get_drvdata(dev); int result, err; u32 value; - struct asus_wmi *asus = dev_get_drvdata(dev); - result = kstrtou32(buf, 10, &value); if (result) return result; -- 2.44.0