public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle()
@ 2022-12-20 15:01 Sakari Ailus
  2022-12-21 13:43 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2022-12-20 15:01 UTC (permalink / raw)
  To: linux-acpi; +Cc: Moore, Robert, Rafael J. Wysocki

acpi_get_handle() uses the pathname argument to find a handle related to
that pathname but it does not need to modify it. Make it const, in order
to be able to pass const pathname to it.

Cc: "Moore, Robert" <robert.moore@intel.com>
Link: https://github.com/acpica/acpica/pull/773
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/acpi/acpica/nsxfname.c | 2 +-
 include/acpi/acpixf.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index b2cfdfef31947..a0592d15dd37c 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
 
 acpi_status
 acpi_get_handle(acpi_handle parent,
-		acpi_string pathname, acpi_handle *ret_handle)
+		const char *pathname, acpi_handle *ret_handle)
 {
 	acpi_status status;
 	struct acpi_namespace_node *node = NULL;
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 67c0b9e734b64..085f23d833349 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 					   struct acpi_buffer *ret_path_ptr))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_handle(acpi_handle parent,
-					     acpi_string pathname,
+					     const char *pathname,
 					     acpi_handle *ret_handle))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_attach_data(acpi_handle object,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle()
  2022-12-20 15:01 [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle() Sakari Ailus
@ 2022-12-21 13:43 ` Rafael J. Wysocki
  2022-12-30 17:53   ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-12-21 13:43 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-acpi, Moore, Robert, Rafael J. Wysocki

On Tue, Dec 20, 2022 at 4:01 PM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> acpi_get_handle() uses the pathname argument to find a handle related to
> that pathname but it does not need to modify it. Make it const, in order
> to be able to pass const pathname to it.
>
> Cc: "Moore, Robert" <robert.moore@intel.com>
> Link: https://github.com/acpica/acpica/pull/773
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/acpi/acpica/nsxfname.c | 2 +-
>  include/acpi/acpixf.h          | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
> index b2cfdfef31947..a0592d15dd37c 100644
> --- a/drivers/acpi/acpica/nsxfname.c
> +++ b/drivers/acpi/acpica/nsxfname.c
> @@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
>
>  acpi_status
>  acpi_get_handle(acpi_handle parent,
> -               acpi_string pathname, acpi_handle *ret_handle)
> +               const char *pathname, acpi_handle *ret_handle)
>  {
>         acpi_status status;
>         struct acpi_namespace_node *node = NULL;
> diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
> index 67c0b9e734b64..085f23d833349 100644
> --- a/include/acpi/acpixf.h
> +++ b/include/acpi/acpixf.h
> @@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
>                                            struct acpi_buffer *ret_path_ptr))
>  ACPI_EXTERNAL_RETURN_STATUS(acpi_status
>                              acpi_get_handle(acpi_handle parent,
> -                                            acpi_string pathname,
> +                                            const char *pathname,
>                                              acpi_handle *ret_handle))
>  ACPI_EXTERNAL_RETURN_STATUS(acpi_status
>                              acpi_attach_data(acpi_handle object,
> --

I'll queue up this one for 6.3 early next week, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle()
  2022-12-21 13:43 ` Rafael J. Wysocki
@ 2022-12-30 17:53   ` Rafael J. Wysocki
  2023-01-02 11:37     ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-12-30 17:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sakari Ailus, linux-acpi, Moore, Robert, Rafael J. Wysocki

On Wed, Dec 21, 2022 at 2:43 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Dec 20, 2022 at 4:01 PM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> >
> > acpi_get_handle() uses the pathname argument to find a handle related to
> > that pathname but it does not need to modify it. Make it const, in order
> > to be able to pass const pathname to it.
> >
> > Cc: "Moore, Robert" <robert.moore@intel.com>
> > Link: https://github.com/acpica/acpica/pull/773
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> >  drivers/acpi/acpica/nsxfname.c | 2 +-
> >  include/acpi/acpixf.h          | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
> > index b2cfdfef31947..a0592d15dd37c 100644
> > --- a/drivers/acpi/acpica/nsxfname.c
> > +++ b/drivers/acpi/acpica/nsxfname.c
> > @@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
> >
> >  acpi_status
> >  acpi_get_handle(acpi_handle parent,
> > -               acpi_string pathname, acpi_handle *ret_handle)
> > +               const char *pathname, acpi_handle *ret_handle)
> >  {
> >         acpi_status status;
> >         struct acpi_namespace_node *node = NULL;
> > diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
> > index 67c0b9e734b64..085f23d833349 100644
> > --- a/include/acpi/acpixf.h
> > +++ b/include/acpi/acpixf.h
> > @@ -526,7 +526,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
> >                                            struct acpi_buffer *ret_path_ptr))
> >  ACPI_EXTERNAL_RETURN_STATUS(acpi_status
> >                              acpi_get_handle(acpi_handle parent,
> > -                                            acpi_string pathname,
> > +                                            const char *pathname,
> >                                              acpi_handle *ret_handle))
> >  ACPI_EXTERNAL_RETURN_STATUS(acpi_status
> >                              acpi_attach_data(acpi_handle object,
> > --
>
> I'll queue up this one for 6.3 early next week, thanks!

Applied now, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle()
  2022-12-30 17:53   ` Rafael J. Wysocki
@ 2023-01-02 11:37     ` Sakari Ailus
  0 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2023-01-02 11:37 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi, Moore, Robert, Rafael J. Wysocki

On Fri, Dec 30, 2022 at 06:53:44PM +0100, Rafael J. Wysocki wrote:
> Applied now, thanks!

Thank you, Rafael!

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-02 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-20 15:01 [PATCH 1/1] ACPI: acpica: Constify pathname argument for acpi_get_handle() Sakari Ailus
2022-12-21 13:43 ` Rafael J. Wysocki
2022-12-30 17:53   ` Rafael J. Wysocki
2023-01-02 11:37     ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox