Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp109695iob; Tue, 17 May 2022 20:30:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw95f6Mn9t8G7HUUgzDAVfsWZsNllYhbPGGEtDDzlG9eCHit0WBQlirbrayTA7Rl8RHR+1/ X-Received: by 2002:a65:558d:0:b0:3f5:f26d:f420 with SMTP id j13-20020a65558d000000b003f5f26df420mr2262167pgs.434.1652844647916; Tue, 17 May 2022 20:30:47 -0700 (PDT) Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i22-20020a17090acf9600b001dd100aad89si1259241pju.79.2022.05.17.20.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:30:47 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8FE2D6EC6C; Tue, 17 May 2022 20:25:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352150AbiEQSbx convert rfc822-to-8bit (ORCPT + 99 others); Tue, 17 May 2022 14:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241586AbiEQSbt (ORCPT ); Tue, 17 May 2022 14:31:49 -0400 Received: from sender4-of-o58.zoho.com (sender4-of-o58.zoho.com [136.143.188.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 112BD38187; Tue, 17 May 2022 11:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652812294; cv=none; d=zohomail.com; s=zohoarc; b=h3h2AaYYTwbCi4JDQc9qA9NjrN77yV6jJZKUpjFlafci0LtdBEjVpbp36kiPD8W3Zl78tdGQqTSllqfD0edO4ZO4v8zA8h2gFhUGZPHOCT3aYIyvbXV3c9GW9cJjr+5MKjEmSnZiyOhE9KPPy9IFcc49MDV8s4vDD1N5JEttL84= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652812294; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=DzAVDUI6vpcfK0zl88k4jLeQQu6WXSwcUJJuw/e98/s=; b=JHOMinLS2F869tH0pR3oPMvmoDkxPN4x3U/vfNG3vS5+lGbdMqkKTZWSEdGOEdgggUUt/CPJZRcm/tO2clCPKRMcPlVa+02xAaY7CBy+UEx8VVF0Oxb0nAYoQkTdxhsM0DhC2fs3enLqgv/y3ayhmj1SsrUOHwcDHZWeISKornM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass smtp.mailfrom=linux@mniewoehner.de; dmarc=pass header.from= Received: from z3r0.lan (185.31.62.161 [185.31.62.161]) by mx.zohomail.com with SMTPS id 165281229369653.234581199221566; Tue, 17 May 2022 11:31:33 -0700 (PDT) Message-ID: <66f813f5bcc724a0f6dd5adefe6a9728dbe509e3.camel@mniewoehner.de> Subject: [PATCH v3] platform/x86: intel-hid: fix _DSM function index handling From: Michael =?ISO-8859-1?Q?Niew=F6hner?= To: Andy Shevchenko , Alex Hung , Hans de Goede , Mark Gross , Platform Driver , Linux Kernel Mailing List , Jiri Kosina In-Reply-To: References: <44828f285aeacf0e941f4f6452b190b46146043f.camel@mniewoehner.de> Content-Type: text/plain; charset="UTF-8" Date: Tue, 17 May 2022 20:31:30 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.42.2 Content-Transfer-Encoding: 8BIT X-ZohoMailClient: External X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org intel_hid_dsm_fn_mask is a bit mask containing one bit for each function index. Fix the function index check in intel_hid_evaluate_method accordingly, which was missed in commit 97ab4516205e ("platform/x86: intel-hid: fix _DSM function index handling"). Fixes: 97ab4516205e ("platform/x86: intel-hid: fix _DSM function index handling") Cc: stable@vger.kernel.org Signed-off-by: Michael Niewöhner --- Changes in v3: Added Fixes tag Changes in v2: Added Cc to stable drivers/platform/x86/intel/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c index 13f8cf70b9ae..5c39d40a701b 100644 --- a/drivers/platform/x86/intel/hid.c +++ b/drivers/platform/x86/intel/hid.c @@ -238,7 +238,7 @@ static bool intel_hid_evaluate_method(acpi_handle handle, method_name = (char *)intel_hid_dsm_fn_to_method[fn_index]; - if (!(intel_hid_dsm_fn_mask & fn_index)) + if (!(intel_hid_dsm_fn_mask & BIT(fn_index))) goto skip_dsm_eval; obj = acpi_evaluate_dsm_typed(handle, &intel_dsm_guid,