From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> To: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon <will.deacon@arm.com>, Robert Moore <robert.moore@intel.com>, Robin Murphy <robin.murphy@arm.com>, Hanjun Guo <hanjun.guo@linaro.org>, Feng Kan <fkan@apm.com>, Jon Masters <jcm@redhat.com>, Zhang Rui <rui.zhang@intel.com>, Nate Watterson <nwatters@codeaurora.org> Subject: Re: [PATCH 2/4] ACPI: Make acpi_dev_get_resources() method agnostic Date: Mon, 24 Jul 2017 10:22:39 +0100 [thread overview] Message-ID: <20170724092239.GC13145@red-moon> (raw) In-Reply-To: <24234737.CuhWYzNn5W@aspire.rjw.lan> On Sat, Jul 22, 2017 at 12:05:39AM +0200, Rafael J. Wysocki wrote: > On Thursday, July 20, 2017 03:45:14 PM Lorenzo Pieralisi wrote: > > The function acpi_dev_get_resources() is completely generic and > > can be used to parse resource objects that are not necessarily > > coming from the _CRS method but also from other objects eg _DMA > > that have the same _CRS resource format. > > > > Create an acpi_dev_get_resources() helper, internal to the ACPI > > resources parsing compilation unit, acpi_dev_get_resources_method(), > > that takes a char* parameter to detect which ACPI method should be > > called to retrieve the resources list and make acpi_dev_get_resources() > > call it with a method name _CRS leaving the API behaviour unchanged. > > > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > > --- > > drivers/acpi/resource.c | 54 +++++++++++++++++++++++++++++-------------------- > > 1 file changed, 32 insertions(+), 22 deletions(-) > > > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c > > index cd4c427..2b20a09 100644 > > --- a/drivers/acpi/resource.c > > +++ b/drivers/acpi/resource.c > > @@ -573,6 +573,36 @@ static acpi_status acpi_dev_process_resource(struct acpi_resource *ares, > > return AE_OK; > > } > > > > +static > > +int acpi_dev_get_resources_method(struct acpi_device *adev, > > Do not break lines like this, please. > > It should be > > static int acpi_dev_get... > > Also I would call it differently, maybe simply __acpi_dev_get_resources()? Ok, it was how I wanted to call it but was not sure you would be happy with it, I will rename it. > > + struct list_head *list, > > + int (*preproc)(struct acpi_resource *, void *), > > + void *preproc_data, char *method) > > const char *method ? Yes, will update. Thanks ! Lorenzo
WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] ACPI: Make acpi_dev_get_resources() method agnostic Date: Mon, 24 Jul 2017 10:22:39 +0100 [thread overview] Message-ID: <20170724092239.GC13145@red-moon> (raw) In-Reply-To: <24234737.CuhWYzNn5W@aspire.rjw.lan> On Sat, Jul 22, 2017 at 12:05:39AM +0200, Rafael J. Wysocki wrote: > On Thursday, July 20, 2017 03:45:14 PM Lorenzo Pieralisi wrote: > > The function acpi_dev_get_resources() is completely generic and > > can be used to parse resource objects that are not necessarily > > coming from the _CRS method but also from other objects eg _DMA > > that have the same _CRS resource format. > > > > Create an acpi_dev_get_resources() helper, internal to the ACPI > > resources parsing compilation unit, acpi_dev_get_resources_method(), > > that takes a char* parameter to detect which ACPI method should be > > called to retrieve the resources list and make acpi_dev_get_resources() > > call it with a method name _CRS leaving the API behaviour unchanged. > > > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > > --- > > drivers/acpi/resource.c | 54 +++++++++++++++++++++++++++++-------------------- > > 1 file changed, 32 insertions(+), 22 deletions(-) > > > > diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c > > index cd4c427..2b20a09 100644 > > --- a/drivers/acpi/resource.c > > +++ b/drivers/acpi/resource.c > > @@ -573,6 +573,36 @@ static acpi_status acpi_dev_process_resource(struct acpi_resource *ares, > > return AE_OK; > > } > > > > +static > > +int acpi_dev_get_resources_method(struct acpi_device *adev, > > Do not break lines like this, please. > > It should be > > static int acpi_dev_get... > > Also I would call it differently, maybe simply __acpi_dev_get_resources()? Ok, it was how I wanted to call it but was not sure you would be happy with it, I will rename it. > > + struct list_head *list, > > + int (*preproc)(struct acpi_resource *, void *), > > + void *preproc_data, char *method) > > const char *method ? Yes, will update. Thanks ! Lorenzo
next prev parent reply other threads:[~2017-07-24 9:20 UTC|newest] Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-07-20 14:45 [PATCH 0/4] ACPI: DMA ranges management Lorenzo Pieralisi 2017-07-20 14:45 ` Lorenzo Pieralisi 2017-07-20 14:45 ` [PATCH 1/4] ACPI: Allow _DMA method in walk resources Lorenzo Pieralisi 2017-07-20 14:45 ` Lorenzo Pieralisi 2017-07-20 14:45 ` Lorenzo Pieralisi 2017-07-20 15:48 ` Moore, Robert 2017-07-20 15:48 ` Moore, Robert 2017-07-20 15:48 ` Moore, Robert 2017-07-20 15:50 ` Moore, Robert 2017-07-20 15:50 ` Moore, Robert 2017-07-20 15:50 ` Moore, Robert 2017-07-21 10:20 ` Lorenzo Pieralisi 2017-07-21 10:20 ` Lorenzo Pieralisi 2017-07-21 10:20 ` Lorenzo Pieralisi 2017-07-20 14:45 ` [PATCH 2/4] ACPI: Make acpi_dev_get_resources() method agnostic Lorenzo Pieralisi 2017-07-20 14:45 ` Lorenzo Pieralisi 2017-07-21 22:05 ` Rafael J. Wysocki 2017-07-21 22:05 ` Rafael J. Wysocki 2017-07-24 9:22 ` Lorenzo Pieralisi [this message] 2017-07-24 9:22 ` Lorenzo Pieralisi 2017-07-25 9:15 ` Lorenzo Pieralisi 2017-07-25 9:15 ` Lorenzo Pieralisi 2017-07-26 0:23 ` Rafael J. Wysocki 2017-07-26 0:23 ` Rafael J. Wysocki 2017-07-20 14:45 ` [PATCH 3/4] ACPI: Introduce DMA ranges parsing Lorenzo Pieralisi 2017-07-20 14:45 ` Lorenzo Pieralisi 2017-07-21 22:15 ` Rafael J. Wysocki 2017-07-21 22:15 ` Rafael J. Wysocki 2017-07-24 10:40 ` Lorenzo Pieralisi 2017-07-24 10:40 ` Lorenzo Pieralisi 2017-07-24 18:42 ` Rafael J. Wysocki 2017-07-24 18:42 ` Rafael J. Wysocki 2017-07-24 18:42 ` Rafael J. Wysocki 2017-07-25 9:06 ` Lorenzo Pieralisi 2017-07-25 9:06 ` Lorenzo Pieralisi 2017-07-25 9:06 ` Lorenzo Pieralisi 2017-07-26 0:27 ` Rafael J. Wysocki 2017-07-26 0:27 ` Rafael J. Wysocki 2017-07-26 0:27 ` Rafael J. Wysocki 2017-07-20 14:45 ` [PATCH 4/4] ACPI: Make acpi_dma_configure() DMA regions aware Lorenzo Pieralisi 2017-07-20 14:45 ` Lorenzo Pieralisi 2017-07-26 14:46 ` [PATCH 0/4] ACPI: DMA ranges management Nate Watterson 2017-07-26 14:46 ` Nate Watterson 2017-07-26 15:05 ` Robin Murphy 2017-07-26 15:05 ` Robin Murphy 2017-07-26 15:35 ` Lorenzo Pieralisi 2017-07-26 15:35 ` Lorenzo Pieralisi 2017-07-26 16:39 ` Nate Watterson 2017-07-26 16:39 ` Nate Watterson 2017-07-28 13:08 ` Robin Murphy 2017-07-28 13:08 ` Robin Murphy 2017-07-28 14:09 ` Lorenzo Pieralisi 2017-07-28 14:09 ` Lorenzo Pieralisi 2017-07-28 15:55 ` Robin Murphy 2017-07-28 15:55 ` Robin Murphy 2017-07-31 8:56 ` Lorenzo Pieralisi 2017-07-31 8:56 ` Lorenzo Pieralisi
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=20170724092239.GC13145@red-moon \ --to=lorenzo.pieralisi@arm.com \ --cc=fkan@apm.com \ --cc=hanjun.guo@linaro.org \ --cc=jcm@redhat.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=nwatters@codeaurora.org \ --cc=rjw@rjwysocki.net \ --cc=robert.moore@intel.com \ --cc=robin.murphy@arm.com \ --cc=rui.zhang@intel.com \ --cc=will.deacon@arm.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.