Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1919866lqz; Tue, 2 Apr 2024 01:27:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWl4nzv8eJjoEESdnSBe3D1L+lAR+eIIpGnEUy6iv7pBegJwtfvfVd88jadWiBeQCMYCqbI1eWuLdQ34iDauulchqRvURqZSSzdROn/GQ== X-Google-Smtp-Source: AGHT+IG5Il8lSp7bGr0DEKa0c/gcnKO0AzEPt8RY3DvXIC5SqXhHZphdJntkAl+JpSsPfEPCjQIC X-Received: by 2002:a05:6402:2349:b0:56b:ee71:9660 with SMTP id r9-20020a056402234900b0056bee719660mr8154165eda.27.1712046439911; Tue, 02 Apr 2024 01:27:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712046439; cv=pass; d=google.com; s=arc-20160816; b=ajAcXvWEjvKK01eRCz5TSKESx4yO0N/WExPFesAZqLn2D5esBhIMjvkWsVtdFpDXaQ ZafRDxKu8bpxZxDwGOW9YC12GjqZ4fctYjLWNX2btIly56DrJ1LlAzJX9VysTE07Nb/w 86w/MqzPjWcGCENV4rcRw29BAqV+3FcXrCpba5S/PxJ4z1KPQ6vWgqJdvX3LQXuiYrYQ xmJk7YNHu7bJ+YniM1B+2acDFR+aOFdXHIFvplueF9fDA/52aggiB9CRbs+hy2GjFL/f Wj+OSl0GWRoatKfaiZPhTNUqdLB9pwtRMRYByCD+uMWrWcAuNlSH2vpU6Thzb241uZV7 G4UQ== 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=341GqYNK58gKj+Y+aZKsOtylg69391aSNxN3HwJLYqw=; fh=wDrqx0f+299Z9E/ydfQE0sLKgm4EkrYz7I1GVgXm5co=; b=qjVLZ9HsXVXWrw+K3JfNbv5s7hRcwIbhqltcmu8A4ISUvU7QDYufdZfcJQOleb4Xtd 0vW/jTGrE1UBal1fqZySbUWqearDmPUkgDEOoIEGJbu0qENKCssgZdeChp+/s0+gr4nk sAaplvleGGIwNLy8GnLKBld1PdOhPZF2W5jktEkrCkaEyaVw2e/z0ueuqCLUqQmQ+Ivg G3Qq3HHTuxf8OFy+pqrNz613prb+Rp5JuFp/u3M6wUYdGNHJe8uYwpxZ6lwTfLqClEtS RMP1UrIVRetbFJSmjwF+UyY3H5IAR7MntIDc2HUpJbz9E8Y6B6+vm6tb8JhUVNLGR7mi mT6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm3 header.b="jFTKq/Tz"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=wUmjbMvL; arc=pass (i=1 dkim=pass dkdomain=ljones.dev dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-127300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127300-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 b14-20020a056402350e00b0056c4cc04f2bsi5657117edd.210.2024.04.02.01.27.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 01:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127300-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="jFTKq/Tz"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=wUmjbMvL; arc=pass (i=1 dkim=pass dkdomain=ljones.dev dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-127300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127300-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 F009B1F23BB8 for ; Tue, 2 Apr 2024 02:27:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 756CF17BB7; Tue, 2 Apr 2024 02:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev header.b="jFTKq/Tz"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wUmjbMvL" Received: from wfout3-smtp.messagingengine.com (wfout3-smtp.messagingengine.com [64.147.123.146]) (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 C7EE9179BC; Tue, 2 Apr 2024 02:26:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712024806; cv=none; b=VjJ2o1bt30UgP8694P0fstSqlvYwmcF71u33b6wLzIl92RLx2rE5rwEg7/JPvxI4dVYF7AnRRVRD+IQjst7EMeFq4NrePTok1Gp1/3junwNW/D4blo/6RoA+SVIo6wRhgLrTWeKNStiGENtFTHoKKVEp7ktBs1QBOpLR9Y18oOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712024806; c=relaxed/simple; bh=+nJ1i4zjhw6QYZq9p+edmZbpJx6SUFFReBlnsuUMOXk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FfXszV85MivtvJX0qfGnTkyLwaF7/08pL+s60viWZDzYHnOPwn6DBPl9LM9MbcQy8XPIB7EYBNSfAW2bOJDEZVY1NHiTRYwOIrsHGBnqspdd+vTIzaiDoP6o5AYY/jcKzqxtqq7FWdeE4xonciXV9AddrNPprvJsaCm9PhZr2rU= 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=jFTKq/Tz; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=wUmjbMvL; arc=none smtp.client-ip=64.147.123.146 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 compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.west.internal (Postfix) with ESMTP id C52CF1C000CC; Mon, 1 Apr 2024 22:26:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 01 Apr 2024 22:26:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding: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=1712024803; x= 1712111203; bh=341GqYNK58gKj+Y+aZKsOtylg69391aSNxN3HwJLYqw=; b=j FTKq/TzUhPo+lRB0gcwn6iedHIHXrxIo8vwddX3btt2qZEQJTcHZQVWUSjTNygaH S5GbxcwJn/Wo8GH1OrvqqS9wPRDbkqXTXCBniwl1B5OgOyn8dBdNd2a+sVkLTdUw 4lMqSDm/1C+zDkhTWyqKVLhRaI8Tj4yipvs5Q3QfryQCiwR9YnPAO3DaZeb23Cxm 3PuGtKO9xkVHRIkj8AJij21GD4e5N4mbiRcxfaGrn5+izFrbn3nzfjxquU5/XJAZ +gF46/bqwmxYOzPg0IQG6tM0GH7V3ouuHQwYFlrtYMl4CGwsD966YM9X+gXgEMfm vwkL7/7LKlj8heoHt37hQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=1712024803; x= 1712111203; bh=341GqYNK58gKj+Y+aZKsOtylg69391aSNxN3HwJLYqw=; b=w UmjbMvLJSTQu2PS8qbOrpN6c2ytiZFlvBNB/qPPklPl6ywKj2Q9ETrSenrhDvZsi 9Mnp5GqKYZNqHzoxqOZTOp+gYYIoTc6gv4jLOCYCI+0awHV3Bzgv8YWU0DURgvRB 9geAqVU6GI27T4ZAIeFTwyJK11wx9Hqqnk09lDw/IvIU8wLNzvYb1F5K6Nq7tsTy VNSi70NgeNwkhMzyd+ykMaODm1cWimV/33itjPCY9vGfWR39fsrqMF2NcxIv9Fx8 QtyvRUmVsIPPTaH4r3DZ5GHcYtgHxbONmpcBgg6J2MfInhEXtNEkpluzSQm1sSJ/ O+RVB9yMKys3+F9mpT3MQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefuddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehl jhhonhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfetfedugfetudeuheetjefhue fggfelleetvdevtefhueeujeefvdegleevhefgnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Apr 2024 22:26:40 -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 v2 6/9] platform/x86: asus-wmi: adjust formatting of ppt-() functions Date: Tue, 2 Apr 2024 15:26:04 +1300 Message-ID: <20240402022607.34625-7-luke@ljones.dev> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240402022607.34625-1-luke@ljones.dev> References: <20240402022607.34625-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-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. 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 c80afa385532..1743ff1eb0ac 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -997,11 +997,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; @@ -1041,11 +1040,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; @@ -1084,11 +1082,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; @@ -1128,11 +1125,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; @@ -1172,11 +1168,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; @@ -1216,11 +1211,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; @@ -1260,11 +1254,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