diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-04-20 11:44:02 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-04-20 17:28:42 +0200 |
commit | 366f0a30c8a01e79255221539a52909cc4c7bd25 (patch) | |
tree | 30c278753d0bf9655cc81cd2d6eb76b1150ef7de /drivers/platform/surface | |
parent | dd5566d6d80c2d9936f8b8b36a7a9599cbfe47a7 (diff) | |
download | linux-366f0a30c8a01e79255221539a52909cc4c7bd25.tar.bz2 |
platform/surface: aggregator: fix a bit test
The "funcs" variable is a u64. If "func" is more than 31 then the
BIT() shift will wrap instead of testing the high bits.
Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/YH6UUhJhGk3mk13b@mwanda
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/surface')
-rw-r--r-- | drivers/platform/surface/aggregator/controller.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c index 00e38284885a..69e86cd599d3 100644 --- a/drivers/platform/surface/aggregator/controller.c +++ b/drivers/platform/surface/aggregator/controller.c @@ -1040,7 +1040,7 @@ static int ssam_dsm_load_u32(acpi_handle handle, u64 funcs, u64 func, u32 *ret) union acpi_object *obj; u64 val; - if (!(funcs & BIT(func))) + if (!(funcs & BIT_ULL(func))) return 0; /* Not supported, leave *ret at its default value */ obj = acpi_evaluate_dsm_typed(handle, &SSAM_SSH_DSM_GUID, |