From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E94EA1CF81; Wed, 3 Jan 2024 19:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9CBBC15; Wed, 3 Jan 2024 11:47:41 -0800 (PST) Received: from [10.57.85.107] (unknown [10.57.85.107]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C75563F7A6; Wed, 3 Jan 2024 11:46:54 -0800 (PST) Message-ID: <3ae22159-3230-4b53-a390-c7fda21da00c@arm.com> Date: Wed, 3 Jan 2024 19:48:11 +0000 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/6] thermal: trip: Constify thermal zone argument of thermal_zone_trip_id() Content-Language: en-US To: "Rafael J. Wysocki" Cc: Linux PM , Srinivas Pandruvada , Daniel Lezcano , Zhang Rui , Linux ACPI , LKML References: <4556052.LvFx2qVVIh@kreacher> <1896687.tdWV9SEqCh@kreacher> From: Lukasz Luba In-Reply-To: <1896687.tdWV9SEqCh@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/15/23 19:53, Rafael J. Wysocki wrote: > 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) > { > /* > > > LGTM, Reviewed-by: Lukasz Luba