From patchwork Sat Sep 14 10:37:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 829176 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (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 537C54437; Sat, 14 Sep 2024 11:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726311822; cv=none; b=pVqUK86hpzP3AFSgaAU9mOqzS12dsK5XBiMX8QN3qhxdlhlF+0E2A1y/0jsHmpHSJyx98IGW3X9UsZha3NZ4N/CIo2PswR571Ylx2OFh74vQzoyhr/zvlQgCO5CgZsNG9KXEwStDt9ZYAJ3ghbhw24ncDBxtGp8u0RLsQYLLXV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726311822; c=relaxed/simple; bh=LzuSMsQ8zYf06qhRsW0uKP+Ha8RA1FTKiyM9mfxAlTU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HKKQxzvLnSjaLwPM4R7uzqiRuh/erTetom30sQvbFG0+ysJCcRBbUunPrCK1rQiLuZ3zuz2kqxsjs3le9Li8QZsZBzVihuIoxms1/w2wpp6/YRkJdt7sZtWkBk8cqDc8dDrTDmCNZnGP4CVNqOtSSFu0eVGKSq5gwZ8/Dq3oxow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; dkim=fail (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b=CMfpSeqt reason="signature verification failed"; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=rjwysocki.net header.i=@rjwysocki.net header.b="CMfpSeqt" Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 6.2.0) id 1852fd98ce71f1db; Sat, 14 Sep 2024 13:03:38 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 9B309853357; Sat, 14 Sep 2024 13:03:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rjwysocki.net; s=dkim; t=1726311817; bh=LzuSMsQ8zYf06qhRsW0uKP+Ha8RA1FTKiyM9mfxAlTU=; h=From:Subject:Date; b=CMfpSeqtK4rm4xEv9UeS/BWPW2xm389zlo9GYsNzfU2jr0VJcAmcEbwvkGE9iBkLE KDJs/rMCIvEk9RHTKzgPeJjFQ6vs7KnBJE5Qs/K/ulKFArkUvUofOj52bAR0B6tSfj do5sHJRzVUxQe5RlV+j1ZEuqgJrTrDzubnNLujEN4Hdaj9pvVJ3XCIfF10/sj/IuPw 0/LGqoA7iP1wyDxbQYikXn4DLvw35eMDq39kff7T8zFXaVXv79o2v6+xJUEe741niH yWtvMTnJeLwoFxgpJV5i1neOi9Q/bBZfCKvYavcAbQpOvPkpgzvCjvOr7HujZflh0F KFn+ZjGRneFsA== From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Daniel Lezcano , Lukasz Luba , Zhang Rui Subject: [RFC PATCH for 6.13 v1 10/20] thermal: core: Drop need_update field from struct thermal_zone_device Date: Sat, 14 Sep 2024 12:37:46 +0200 Message-ID: <3261209.5fSG56mABF@rjwysocki.net> In-Reply-To: <6100907.lOV4Wx5bFT@rjwysocki.net> References: <6100907.lOV4Wx5bFT@rjwysocki.net> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: spam:low X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrudektddgfeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogfuphgrmhfkphculdeftddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuufhprghmkfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgepgeenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomheprhhjfiesrhhjfiihshhotghkihdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=25 Fuz1=25 Fuz2=25 From: Rafael J. Wysocki After previous changes, the need_update field in struct thermal_zone_device is only set and never read, so drop it. No functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/thermal_core.c | 4 ---- drivers/thermal/thermal_core.h | 2 -- 2 files changed, 6 deletions(-) Index: linux-pm/drivers/thermal/thermal_core.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.c +++ linux-pm/drivers/thermal/thermal_core.c @@ -826,7 +826,6 @@ static int thermal_bind_cdev_to_trip(str if (!result) { list_add_tail(&dev->trip_node, &td->thermal_instances); list_add_tail(&dev->cdev_node, &cdev->thermal_instances); - atomic_set(&tz->need_update, 1); thermal_governor_update_tz(tz, THERMAL_TZ_BIND_CDEV); } @@ -1480,9 +1479,6 @@ thermal_zone_device_register_with_trips( if (result) goto remove_id; - /* A new thermal zone needs to be updated anyway. */ - atomic_set(&tz->need_update, 1); - result = dev_set_name(&tz->device, "thermal_zone%d", tz->id); if (result) { thermal_zone_destroy_device_groups(tz); Index: linux-pm/drivers/thermal/thermal_core.h =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.h +++ linux-pm/drivers/thermal/thermal_core.h @@ -99,7 +99,6 @@ struct thermal_governor { trip point. * @prev_high_trip: the above current temperature if you've crossed a passive trip point. - * @need_update: if equals 1, thermal_zone_device_update needs to be invoked. * @ops: operations this &thermal_zone_device supports * @tzp: thermal zone parameters * @governor: pointer to the governor for this thermal zone @@ -135,7 +134,6 @@ struct thermal_zone_device { int passive; int prev_low_trip; int prev_high_trip; - atomic_t need_update; struct thermal_zone_device_ops ops; struct thermal_zone_params *tzp; struct thermal_governor *governor;