Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6925447rdb; Fri, 15 Dec 2023 12:03:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQf8Q3hyBckiqxmZOnvZXJlOtdRjqAgr9sr3irtld1QwMpHAo7BPIthQz7r93UTWP2UiQl X-Received: by 2002:a05:622a:1895:b0:423:780f:593f with SMTP id v21-20020a05622a189500b00423780f593fmr19589384qtc.6.1702670613457; Fri, 15 Dec 2023 12:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702670613; cv=none; d=google.com; s=arc-20160816; b=AVcS1O8WmVhBEhJx+NcZBrfKmVA6KiyD8dOB7wGok69l4C+qzP/3tx9Z4JYyrfSbsq WLPl0GnzcwT4sIzHsmcEbuSeSJ1djDvjqZOJx/GL55ss+lXkpQnb2xjUL3v9p+483xdS mhFSnqxffuTraK5/0IPOKVswUkTlNi08aLvCiM2QF3CxOP89FUctZk79HrLlClAXJK8A cnMXSv+29wdqlN/s5b55g6y7/A7C+Vl9/8RHqEz5VFRZa9XnT1fqY1mgtPD0wUxAQ+MW d9ExyJ+0PEerAMsKVpJeg3xwKuouS92H0EItvXBfLbvpU1U6k8LE3g7AxDhbQl1qOwO4 bOdA== ARC-Message-Signature: i=1; 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; bh=HS/fwlTIpdFpEXLJG0OVRyw587PsmdQEJjrIlyKctCw=; fh=PrtSuD01Zw+FPDhsRSNqLGqZbVeJkC2wpKMU0Il46xE=; b=gwG3HZHEDhis8UdGSWHoJa0ndj3BM1DnEgX4UXgzRf/RI+XJsg8nXS69qXU23P9GOM IyrxKBO5UNpuCc3xgeEvWCEtnLVc/Ply8dyK0YQnDeU8B6pnrkmfRUxwbzW9m+LgDVcf 57Z7IUt7TZavl0gmFwMGpIDWEeUPPrvHhrZeuV4T+I7WlH8mZWIDMuNzZpIxW9hJQ+4J 0jZ4cBZ5KyDEKm7GAdNt4XcHBpbL/FMMFPgVLeCg5uDSgVAsI6Vcm1dXFqvYwuJ8xDsA 1jxeZepWomhgzAP0SkBVPY/8UaLtVCM3UGYdr0vHx2uUwRXiN2XDhygNFkBO1F4qnrFA 74qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1592-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kf24-20020a05622a2a9800b00423e09207b5si16328083qtb.719.2023.12.15.12.03.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 12:03:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1592-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 34B9B1C22D24 for ; Fri, 15 Dec 2023 20:03:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB3B0495D6; Fri, 15 Dec 2023 20:02:24 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 6E56646556; Fri, 15 Dec 2023 20:02:20 +0000 (UTC) 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 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.4.0) id 755115599322dca2; Fri, 15 Dec 2023 21:02:18 +0100 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 80E59668B59; Fri, 15 Dec 2023 21:02:17 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: Srinivas Pandruvada , Daniel Lezcano , Zhang Rui , Linux ACPI , LKML , Lukasz Luba Subject: [PATCH v1 1/6] thermal: trip: Constify thermal zone argument of thermal_zone_trip_id() Date: Fri, 15 Dec 2023 20:53:52 +0100 Message-ID: <1896687.tdWV9SEqCh@kreacher> In-Reply-To: <4556052.LvFx2qVVIh@kreacher> References: <4556052.LvFx2qVVIh@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtvddgudefudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeejpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgt phhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 From: Rafael J. Wysocki Because thermal_zone_trip_id() does not update the thermal zone object passed to it, its pointer argument representing the thermal zone can be const, so adjust its definition accordingly. No functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/thermal/thermal_core.h | 2 +- drivers/thermal/thermal_trip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: linux-pm/drivers/thermal/thermal_core.h =================================================================== --- linux-pm.orig/drivers/thermal/thermal_core.h +++ linux-pm/drivers/thermal/thermal_core.h @@ -120,7 +120,7 @@ void __thermal_zone_device_update(struct for (__trip = __tz->trips; __trip - __tz->trips < __tz->num_trips; __trip++) void __thermal_zone_set_trips(struct thermal_zone_device *tz); -int thermal_zone_trip_id(struct thermal_zone_device *tz, +int thermal_zone_trip_id(const struct thermal_zone_device *tz, const struct thermal_trip *trip); void thermal_zone_trip_updated(struct thermal_zone_device *tz, const struct thermal_trip *trip); Index: linux-pm/drivers/thermal/thermal_trip.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_trip.c +++ linux-pm/drivers/thermal/thermal_trip.c @@ -143,7 +143,7 @@ int thermal_zone_get_trip(struct thermal } EXPORT_SYMBOL_GPL(thermal_zone_get_trip); -int thermal_zone_trip_id(struct thermal_zone_device *tz, +int thermal_zone_trip_id(const struct thermal_zone_device *tz, const struct thermal_trip *trip) { /*