Message ID | 1896687.tdWV9SEqCh@kreacher |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-1592-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp9543280dys; Fri, 15 Dec 2023 12:04:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4ZyhQW/GAu4czwhE7oPV1ZvTi7pfcbs8SWhxGUzu33sIp9+OshT0CrLokeKbyU6e9JMBJ X-Received: by 2002:ad4:5ae8:0:b0:67a:5be3:f0f8 with SMTP id c8-20020ad45ae8000000b0067a5be3f0f8mr19140569qvh.19.1702670646944; Fri, 15 Dec 2023 12:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702670646; cv=none; d=google.com; s=arc-20160816; b=OHXeofR24eEWjaVO2BQmmLFqqN5zpvfkqF/kpK8x0EThZsOFnue693K8LlPQ9Mxg9F 0GaDnErqV3X4rJJ13bVKc9hv0RveqfFMZG2Ld3lyIFrGPD/676Y29uLguoLtpJOMh3H0 uetcZIU/3tPCM5Cj/07qQLfQtm5CJhO6Zhzysv0gAoy5qBIDLdBbkYXtXWv9J/Vr43s+ EljSNou/OK/w8e0528QZrGw76Zm9tF/SWbLYRO+2r8jIYBVLXvvrG7rDvLr6dJZWW06c uhabnGjige2pFsHYGDjyUknrRmn2zK7Z5drccxFoJ+IWrDucbiWmZbKxiK5i1jfKzPf9 Jm/g== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1592-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j13-20020a0ce00d000000b0067eee0540efsi1748981qvk.160.2023.12.15.12.04.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 12:04:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1592-ouuuleilei=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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1592-ouuuleilei=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 B11B31C213E5 for <ouuuleilei@gmail.com>; Fri, 15 Dec 2023 20:04:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00D6851C36; Fri, 15 Dec 2023 20:02:26 +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" <rjw@rjwysocki.net> To: Linux PM <linux-pm@vger.kernel.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, Zhang Rui <rui.zhang@intel.com>, Linux ACPI <linux-acpi@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, Lukasz Luba <lukasz.luba@arm.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785379576583085542 X-GMAIL-MSGID: 1785379576583085542 |
Series |
thermal: netlink: Redefine the API and drop unused code
|
|
Commit Message
Rafael J. Wysocki
Dec. 15, 2023, 7:53 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> 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 <rafael.j.wysocki@intel.com> --- drivers/thermal/thermal_core.h | 2 +- drivers/thermal/thermal_trip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Comments
On 12/15/23 19:53, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > 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 <rafael.j.wysocki@intel.com> > --- > 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) > { > /* > > > LGTM, Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
On 15/12/2023 20:53, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > 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 <rafael.j.wysocki@intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
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) { /*