Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290780 > unrolled thread

[PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm

Started byJerry Hoemann <jerry.hoemann@hpe.com>
First post2015-12-14 03:00 +0100
Last post2015-12-14 04:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-12-14 03:00 +0100
    Re: [PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm "Rafael J. Wysocki" <rafael@kernel.org> - 2015-12-14 03:10 +0100
      Re: [PATCH v3 1/6] acpica: Correct parameter type to  acpi_evaluate_dsm Jerry Hoemann <jerry.hoemann@hpe.com> - 2015-12-14 04:30 +0100

#1290780 — [PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm

FromJerry Hoemann <jerry.hoemann@hpe.com>
Date2015-12-14 03:00 +0100
Subject[PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm
Message-ID<qFqAF-7R7-9@gated-at.bofh.it>
The ACPI spec speicifies that arguments "Revision ID" and
"Function Index" to a _DSM are type "Integer."  Type Integers
are 64 bit quantities.

The function evaluate_dsm specifies these types as simple "int"
which are 32 bits.  Correct type passed to acpi_evaluate_dsm
and its callers and derived callers to pass correct type.

acpi_check_dsm and acpi_evaluate_dsm_typed had similar issue
and were corrected as well.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/acpi/utils.c    | 4 ++--
 include/acpi/acpi_bus.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 475c907..049cba4 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -628,7 +628,7 @@ acpi_status acpi_evaluate_lck(acpi_handle handle, int lock)
  * some old BIOSes do expect a buffer or an integer etc.
  */
 union acpi_object *
-acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, int rev, int func,
+acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
 		  union acpi_object *argv4)
 {
 	acpi_status ret;
@@ -677,7 +677,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
  * functions. Currently only support 64 functions at maximum, should be
  * enough for now.
  */
-bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs)
+bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
 {
 	int i;
 	u64 mask = 0;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 5ba8fb6..37a7006 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -61,12 +61,12 @@ bool acpi_ata_match(acpi_handle handle);
 bool acpi_bay_match(acpi_handle handle);
 bool acpi_dock_match(acpi_handle handle);
 
-bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs);
+bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs);
 union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
-			int rev, int func, union acpi_object *argv4);
+			u64 rev, u64 func, union acpi_object *argv4);
 
 static inline union acpi_object *
-acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, int rev, int func,
+acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
 			union acpi_object *argv4, acpi_object_type type)
 {
 	union acpi_object *obj;
-- 
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1290792

From"Rafael J. Wysocki" <rafael@kernel.org>
Date2015-12-14 03:10 +0100
Message-ID<qFqKl-89Q-3@gated-at.bofh.it>
In reply to#1290780
On Mon, Dec 14, 2015 at 2:54 AM, Jerry Hoemann <jerry.hoemann@hpe.com> wrote:
> The ACPI spec speicifies that arguments "Revision ID" and
> "Function Index" to a _DSM are type "Integer."  Type Integers
> are 64 bit quantities.
>
> The function evaluate_dsm specifies these types as simple "int"
> which are 32 bits.  Correct type passed to acpi_evaluate_dsm
> and its callers and derived callers to pass correct type.
>
> acpi_check_dsm and acpi_evaluate_dsm_typed had similar issue
> and were corrected as well.
>
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>

The changes look OK to me, but this is not ACPICA material.

Please change the subject to something like "ACPI / utils: Fix
acpi_evaluate_dsm() argument type".

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1290814 — Re: [PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm

FromJerry Hoemann <jerry.hoemann@hpe.com>
Date2015-12-14 04:30 +0100
SubjectRe: [PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm
Message-ID<qFrZM-we-9@gated-at.bofh.it>
In reply to#1290792
On Mon, Dec 14, 2015 at 03:07:22AM +0100, Rafael J. Wysocki wrote:
> On Mon, Dec 14, 2015 at 2:54 AM, Jerry Hoemann <jerry.hoemann@hpe.com> wrote:
> > The ACPI spec speicifies that arguments "Revision ID" and
> > "Function Index" to a _DSM are type "Integer."  Type Integers
> > are 64 bit quantities.
> >
> > The function evaluate_dsm specifies these types as simple "int"
> > which are 32 bits.  Correct type passed to acpi_evaluate_dsm
> > and its callers and derived callers to pass correct type.
> >
> > acpi_check_dsm and acpi_evaluate_dsm_typed had similar issue
> > and were corrected as well.
> >
> > Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
> 
> The changes look OK to me, but this is not ACPICA material.
> 
> Please change the subject to something like "ACPI / utils: Fix
> acpi_evaluate_dsm() argument type".
> 
> Thanks,
> Rafael

  Will do.  thanks.

-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web