Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4869380rwb; Tue, 8 Aug 2023 15:35:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlKs0SfBSVYhUHK1joRvd4RrkLmc50Z4SgnAjR+JPFPqi3YjzIDL86+O7hWei+5msAb85u X-Received: by 2002:a05:6a00:9a4:b0:682:2e99:9de0 with SMTP id u36-20020a056a0009a400b006822e999de0mr884742pfg.23.1691534116780; Tue, 08 Aug 2023 15:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691534116; cv=none; d=google.com; s=arc-20160816; b=rsN46zwFJ81y5ZFgxyS3tgrjqxBZP/Zwj1V5ifuiuPvPFUD9wgHSMG6IHETCfOtWN2 EVrVRlHibJUvmBnYTv65kA5MDTS4v9C5B/3/LWkYGUgt9210UoY7gzvxYkWhFtSgYSgy DWGRM6fs7i32rhgGScxflwDrQeLm3KymIeV7YGDXmNq/kOh8hn2lD2oQxswLGdghuyeh Z1DsxpygHRRVloGNceP1W2Kz7Y4QxH/lhyNGqu2z11UZOiyUkD4u3D/zshkr2zuEJoB6 FJ34yXJ+RaHOs4b++7rHAfMZblwAklIdXaJzg+Edc0wU8vj8RB5aN7sgYSgIt+Mgl66+ xs6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TRemvQorxxwLa31Jj2BOgk2kFktllr9G9RFEASSUVyA=; fh=tRVF8+lda9bdQSEp/arj7/6sGCI/pAIJZbkBFLyPtrg=; b=ipTz3nh5fNKqtPIgjZES8nqiaoPRkEjlYTGNRuMpqJVzXQdLTSx4+rFPEc2e81Ju89 fR/u0PRWZZqtAa00uIqiw0Ef58oSLw7/jXsI41Qt9JafCrf7pT3rgKBFK1mP1XVC8UN4 PgefUQLetQMeZw0eE3VXiKX7qBuPHXdf1vvdDEe2rGgwQ6vRJ5HN/Sw01BL0B1WPPvwY 6Odv1GwHqEW1bl0I52wg7DM0FFOHDk3CLmI89HKhOBnPB+vwsw3pknWHJJ1WxgQYkKlR B7ifLYdR8nGdZv76v/JKyuHQwXLjQlepHFGgdEjRw8M3qhkwAaMOx7FejuZpax6aaFIQ Z+Yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s14-20020a63dc0e000000b0055b51ed5798si7756917pgg.187.2023.08.08.15.35.03; Tue, 08 Aug 2023 15:35:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233638AbjHHU65 (ORCPT + 99 others); Tue, 8 Aug 2023 16:58:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235709AbjHHUmd (ORCPT ); Tue, 8 Aug 2023 16:42:33 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D312711F7C; Tue, 8 Aug 2023 13:15:17 -0700 (PDT) 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 5.2.0) id 07c178e901b4681b; Tue, 8 Aug 2023 22:15:15 +0200 Authentication-Results: v370.home.net.pl; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=rjwysocki.net (client-ip=195.136.19.94; helo=[195.136.19.94]; envelope-from=rjw@rjwysocki.net; receiver=) 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 v370.home.net.pl (Postfix) with ESMTPSA id 0057166137E; Tue, 8 Aug 2023 22:15:14 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Zhang Rui , Srinivas Pandruvada , Linux PM Subject: [PATCH v1] ACPI: thermal: Do not attach private data to ACPI handles Date: Tue, 08 Aug 2023 22:15:15 +0200 Message-ID: <5703187.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrledvgddugeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomhdp rhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki The ACPI thermal driver uses acpi_bus_attach_private_data() to attach the thermal zone object to the ACPI handle of the thermal zone and acpi_bus_detach_private_data() to clean that up, but it never uses acpi_bus_get_private_data() to retrieve that object. Drop the unneded acpi_bus_attach_private_data() and acpi_bus_detach_private_data() calls from the ACPI thermal driver and clean up the related code. No intentional functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/thermal.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) Index: linux-pm/drivers/acpi/thermal.c =================================================================== --- linux-pm.orig/drivers/acpi/thermal.c +++ linux-pm/drivers/acpi/thermal.c @@ -742,7 +742,6 @@ static int acpi_thermal_register_thermal { int trips = 0; int result; - acpi_status status; int i; if (tz->trips.critical.valid) @@ -775,24 +774,15 @@ static int acpi_thermal_register_thermal if (result) goto unregister_tzd; - status = acpi_bus_attach_private_data(tz->device->handle, - tz->thermal_zone); - if (ACPI_FAILURE(status)) { - result = -ENODEV; - goto remove_links; - } - result = thermal_zone_device_enable(tz->thermal_zone); if (result) - goto acpi_bus_detach; + goto remove_links; dev_info(&tz->device->dev, "registered as thermal_zone%d\n", thermal_zone_device_id(tz->thermal_zone)); return 0; -acpi_bus_detach: - acpi_bus_detach_private_data(tz->device->handle); remove_links: acpi_thermal_zone_sysfs_remove(tz); unregister_tzd: @@ -806,7 +796,6 @@ static void acpi_thermal_unregister_ther acpi_thermal_zone_sysfs_remove(tz); thermal_zone_device_unregister(tz->thermal_zone); tz->thermal_zone = NULL; - acpi_bus_detach_private_data(tz->device->handle); }