From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
linux-acpi@vger.kernel.org, Xiaomeng.Hou@amd.com,
Aaron.Liu@amd.com, Ray.Huang@amd.com, hdegoede@redhat.com
Subject: Re: [PATCH v3 3/3] ACPI: bus: For platform OSC negotiate capabilities
Date: Tue, 1 Mar 2022 09:08:34 +0200 [thread overview]
Message-ID: <Yh3GchbsdO0hy/+W@lahna> (raw)
In-Reply-To: <20220228181446.1975420-3-mario.limonciello@amd.com>
Hi,
On Mon, Feb 28, 2022 at 12:14:46PM -0600, Mario Limonciello wrote:
> @@ -343,10 +345,34 @@ static void acpi_bus_osc_negotiate_platform_control(void)
> if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
> return;
>
> - if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
> + /*
> + * Check if bits were masked, we need to negotiate
> + * prevent potential endless loop by limited number of
> + * negotiation cycles.
> + */
> + for (i = 0; i < 5; i++) {
> + status = acpi_run_osc(handle, &context);
> + if (ACPI_SUCCESS(status) || status == AE_SUPPORT) {
The previous patch says that AE_OK or AE_SUCCESS you need to free the
result but here we get AE_SUPPORT and you still do the kfree(). Is that
intented?
> + capbuf_ret = context.ret.pointer;
> + capbuf[OSC_SUPPORT_DWORD] = capbuf_ret[OSC_SUPPORT_DWORD];
> + kfree(context.ret.pointer);
> + }
prev parent reply other threads:[~2022-03-01 7:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 18:14 [PATCH v3 1/3] ACPI: APEI: Adjust for acpi_run_osc logic changes Mario Limonciello
2022-02-28 18:14 ` [PATCH v3 2/3] ACPI: bus: Allow negotiating OSC capabilities Mario Limonciello
2022-02-28 18:14 ` [PATCH v3 3/3] ACPI: bus: For platform OSC negotiate capabilities Mario Limonciello
2022-03-01 7:08 ` Mika Westerberg [this message]
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=Yh3GchbsdO0hy/+W@lahna \
--to=mika.westerberg@linux.intel.com \
--cc=Aaron.Liu@amd.com \
--cc=Ray.Huang@amd.com \
--cc=Xiaomeng.Hou@amd.com \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=rjw@rjwysocki.net \
/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