Linux ACPI
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>, Armin Wolf <w_armin@gmx.de>,
	Hans de Goede <hansg@kernel.org>
Subject: Re: [PATCH v1 2/4] ACPI: thermal: Adjust event notification routine
Date: Thu, 18 Dec 2025 14:30:40 +0800	[thread overview]
Message-ID: <5cda66c6-8e89-4931-830f-f1b25d53903e@huawei.com> (raw)
In-Reply-To: <5035876.GXAFRqVoOG@rafael.j.wysocki>


在 2025/12/10 22:43, Rafael J. Wysocki 写道:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Adjust acpi_thermal_notify() to cast its "data" argument to a struct
> acpi_thermal pointer istead of a struct acpi_device one, which allows
> the use of acpi_driver_data() to be limited and will facilitate
> subsequent changes.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>   drivers/acpi/thermal.c |    9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
>
> --- a/drivers/acpi/thermal.c
> +++ b/drivers/acpi/thermal.c
> @@ -670,8 +670,7 @@ static void acpi_thermal_unregister_ther
>   
>   static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
>   {
> -	struct acpi_device *device = data;
> -	struct acpi_thermal *tz = acpi_driver_data(device);
> +	struct acpi_thermal *tz = data;
>   
>   	if (!tz)
>   		return;
> @@ -685,8 +684,8 @@ static void acpi_thermal_notify(acpi_han
>   		acpi_thermal_trips_update(tz, event);
>   		break;
>   	default:
> -		acpi_handle_debug(device->handle, "Unsupported event [0x%x]\n",
> -				  event);
> +		acpi_handle_debug(tz->device->handle,
> +				  "Unsupported event [0x%x]\n", event);
>   		break;
>   	}
>   }
> @@ -881,7 +880,7 @@ static int acpi_thermal_add(struct acpi_
>   		acpi_device_bid(device), deci_kelvin_to_celsius(tz->temp_dk));
>   
>   	result = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY,
> -						 acpi_thermal_notify, device);
> +						 acpi_thermal_notify, tz);
>   	if (result)
>   		goto flush_wq;
>   
LGTM,
Acked-by: lihuisong@huawei.com
>
>
>

  reply	other threads:[~2025-12-18  6:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10 14:41 [PATCH v1 0/4] ACPI: thermal: Convert ACPI thermal driver to a platform one Rafael J. Wysocki
2025-12-10 14:42 ` [PATCH v1 1/4] ACPI: scan: Register platform devices for thermal zones Rafael J. Wysocki
2025-12-18  6:28   ` lihuisong (C)
2025-12-10 14:43 ` [PATCH v1 2/4] ACPI: thermal: Adjust event notification routine Rafael J. Wysocki
2025-12-18  6:30   ` lihuisong (C) [this message]
2025-12-10 14:43 ` [PATCH v1 3/4] ACPI: thermal: Convert the driver to a platform one Rafael J. Wysocki
2025-12-18  6:39   ` lihuisong (C)
2025-12-10 14:44 ` [PATCH v1 4/4] ACPI: thermal: Rework system suspend and resume handling Rafael J. Wysocki
2025-12-18  6:48   ` lihuisong (C)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5cda66c6-8e89-4931-830f-f1b25d53903e@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=hansg@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=w_armin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox