From: John Garry <john.garry@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Len Brown <lenb@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH PoC 2/3] ACPI: platform: Refactor acpi_create_platform_device()
Date: Thu, 1 Sep 2022 11:52:23 +0100 [thread overview]
Message-ID: <12aedee1-9f13-266c-c398-2ec3d31212d1@huawei.com> (raw)
In-Reply-To: <CAJZ5v0gR0mZBGiCLR6mxdbaNGebti54M-VvV=jT0310KioPD7g@mail.gmail.com>
On 23/08/2022 17:42, Rafael J. Wysocki wrote:
>>>
>>>> +struct platform_device *acpi_create_platform_device_ops(
>>>> + struct acpi_device *adev,
>>>> + const char *name,
>>>> + const struct property_entry *properties,
>>>> + void *data, size_t size_data,
>>>> + int (*xlat)(struct acpi_device *adev,
>>>> + struct resource *res,
>>>> + void *data, size_t size_data),
>>>> + int id);
>>> ...because this looks a bit too much from the amount of parameters
>>> point of view.
>>>
>> ok, agreed.
Hi Rafael,
>>
>> But even if we improve this code, the hisi_lpc changes are quite large
>> and unwieldly.
> Well, they allow you to drop quite a few LOC ...
Sure, but the ACPI platform device code here is growing by about the
same amount :) However maybe we can reduce that with Andy's idea to
create a struct of function args. But first I will go with using
platform_device_register_full() in hisi_lpc.
And you please also check the PNP patch? I am not so keen on pushing for
that.
thanks,
John
next prev parent reply other threads:[~2022-09-01 10:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 11:27 [PATCH PoC 0/3] ACPI/PNP/HISI_LPC: Refactor ACPI platform code for reuse John Garry
2022-08-16 11:27 ` [PATCH PoC 1/3] ACPI / PNP: Don't add enumeration_by_parent devices John Garry
2022-08-18 19:31 ` Andy Shevchenko
2022-08-19 8:05 ` John Garry
2022-08-19 9:59 ` Andy Shevchenko
2022-08-19 10:20 ` John Garry
2022-08-19 10:41 ` Andy Shevchenko
2022-08-16 11:27 ` [PATCH PoC 2/3] ACPI: platform: Refactor acpi_create_platform_device() John Garry
2022-08-18 19:41 ` Andy Shevchenko
2022-08-19 8:10 ` John Garry
2022-08-23 16:42 ` Rafael J. Wysocki
2022-09-01 10:52 ` John Garry [this message]
2022-08-16 11:27 ` [PATCH PoC 3/3] bus: hisi_lpc: Use acpi_create_platform_device_ops() John Garry
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=12aedee1-9f13-266c-c398-2ec3d31212d1@huawei.com \
--to=john.garry@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®