diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-02-06 18:36:17 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-02-07 05:15:02 -0500 |
commit | b52f451105020677cad61a13b3b67af3fdedb91f (patch) | |
tree | 472e39c7427a8e3dd1d29232b06c92140d0227da /drivers/acpi/cppc_acpi.c | |
parent | 1a9a126b5098160ca934a352617e9e65dbfa679d (diff) |
ACPI / CPPC: Use 64-bit arithmetic instead of 32-bit
Add suffix ULL to constant 500 in order to give the compiler complete
information about the proper arithmetic to use. Notice that this
constant is used in a context that expects an expression of type
u64 (64 bits, unsigned).
The expression NUM_RETRIES * cppc_ss->latency at line 578, which at
preprocessing time translates to 500 * cppc_ss->latency is currently
being evaluated using 32-bit arithmetic.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
-rw-r--r-- | drivers/acpi/cppc_acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 06ea4749ebd9..0afbb2658cbc 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c | |||
@@ -119,7 +119,7 @@ static DEFINE_PER_CPU(struct cpc_desc *, cpc_desc_ptr); | |||
119 | * to PCC commands. Keeping it high enough to cover emulators where | 119 | * to PCC commands. Keeping it high enough to cover emulators where |
120 | * the processors run painfully slow. | 120 | * the processors run painfully slow. |
121 | */ | 121 | */ |
122 | #define NUM_RETRIES 500 | 122 | #define NUM_RETRIES 500ULL |
123 | 123 | ||
124 | struct cppc_attr { | 124 | struct cppc_attr { |
125 | struct attribute attr; | 125 | struct attribute attr; |