From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org,
tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org,
andriy.shevchenko@linux.intel.com,
"Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
"Bard Liao" <yung-chuan.liao@linux.intel.com>,
"Len Brown" <lenb@kernel.org>,
"open list:ACPI" <linux-acpi@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] ACPI: utils: introduce acpi_get_local_u64_address()
Date: Fri, 7 Jun 2024 22:33:00 +0200 [thread overview]
Message-ID: <998d53cf-c22b-4706-93af-ab38802dc531@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0g8aW5FBbceYJDvDrMHRxT6i71O_LTWKALb=qr+m1BJ7w@mail.gmail.com>
On 6/7/24 20:51, Rafael J. Wysocki wrote:
> On Tue, May 28, 2024 at 9:29 PM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
>>
>> The ACPI _ADR is a 64-bit value. We changed the definitions in commit
>> ca6f998cf9a2 ("ACPI: bus: change _ADR representation to 64 bits") but
>> some helpers still assume the value is a 32-bit value.
>>
>> This patch adds a new helper to extract the full 64-bits. The existing
>> 32-bit helper is kept for backwards-compatibility and cases where the
>> _ADR is known to fit in a 32-bit value.
>>
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
>> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
>
> Do you want me to apply this or do you want me to route it along with
> the rest of the series?
>
> In the latter case feel free to add
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Thanks Rafael. I think it's easier if Mark Brown takes the series in
ASoC, I have additional ASoC patches that use the u64 helper.
Mark?
>>
>> +int acpi_get_local_u64_address(acpi_handle handle, u64 *addr)
>> +{
>> + acpi_status status;
>> +
>> + status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, addr);
>> + if (ACPI_FAILURE(status))
>> + return -ENODATA;
>> + return 0;
>> +}
>> +EXPORT_SYMBOL(acpi_get_local_u64_address);
>
> I'd prefer EXPORT_SYMBOL_GPL() here unless you absolutely cannot live with it.
I don't mind, but the existing helper was using EXPORT_SYMBOL so I just
copied. It'd be odd to have two helpers that only differ by the argument
size use a different EXPORT_ macro, no? Not to mention that the
get_local address uses EXPORT_SYMBOL but would become a wrapper for an
EXPORT_SYMBOL_GPL. That gives me a headache...
This was the original code:
int acpi_get_local_address(acpi_handle handle, u32 *addr)
{
unsigned long long adr;
acpi_status status;
status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr);
if (ACPI_FAILURE(status))
return -ENODATA;
*addr = (u32)adr;
return 0;
}
EXPORT_SYMBOL(acpi_get_local_address);
next prev parent reply other threads:[~2024-06-07 20:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240528192936.16180-1-pierre-louis.bossart@linux.intel.com>
2024-05-28 19:29 ` [PATCH 1/3] ACPI: utils: introduce acpi_get_local_u64_address() Pierre-Louis Bossart
2024-06-07 18:51 ` Rafael J. Wysocki
2024-06-07 20:33 ` Pierre-Louis Bossart [this message]
2024-06-07 21:59 ` Mark Brown
2024-06-08 11:58 ` Rafael J. Wysocki
2024-05-28 19:29 ` [PATCH 2/3] soundwire: slave: simplify code with acpi_get_local_u64_address() Pierre-Louis Bossart
2024-06-02 14:49 ` Vinod Koul
2024-05-28 19:29 ` [PATCH 3/3] ALSA: hda: intel-sdw-acpi: use acpi_get_local_u64_address() Pierre-Louis Bossart
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=998d53cf-c22b-4706-93af-ab38802dc531@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=peter.ujfalusi@linux.intel.com \
--cc=rafael@kernel.org \
--cc=tiwai@suse.de \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/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