[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7352fbf8-6773-99e6-1baa-3daea8523bc7@gmail.com>
Date: Tue, 20 Apr 2021 12:24:37 +0200
From: Maximilian Luz <luzmaximilian@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Hans de Goede <hdegoede@...hat.com>,
Mark Gross <mgross@...ux.intel.com>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] platform/surface: aggregator: fix a bit test
On 4/20/21 10:44 AM, Dan Carpenter wrote:
> 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@...el.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Thanks!
Reviewed-by: Maximilian Luz <luzmaximilian@...il.com>
> ---
> drivers/platform/surface/aggregator/controller.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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,
>
Powered by blists - more mailing lists