Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2118754iof; Tue, 7 Jun 2022 20:21:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNwdfAHnRanJoa+YF3pWZDcisOXDUnQNaFDAp78VGJXGjAtU0iasun2GQbkHcf7GS3e+v8 X-Received: by 2002:a63:2344:0:b0:3fd:fd53:5fd1 with SMTP id u4-20020a632344000000b003fdfd535fd1mr5864257pgm.478.1654658494265; Tue, 07 Jun 2022 20:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654658494; cv=none; d=google.com; s=arc-20160816; b=o8U7hhX+xBlJWcBaRiE2Dl5u6AsM4Q5kSN0BWZ020DvzQqp8A9aNHu5CKtrgiAJtsX SUdtFIYl0DSoouc7luxqClszNnhrJI8ul6lHhEnff08F4LuqbHB0t5bid2viQZPw4KZ7 BHuwltRnk9SqjxolC5pQjn7jadOngde2gOTc4ZVQ7VNRGQ2MaMNk35J345I76GcPbJYJ ue8juYkxhYsKTYQa4Lql1GBICmsxKA6k4xPldPDCvKeoNuPVNXps9vU7TgHKyDK16duy MEP4Ox76/AfH5mICAzuAaT6XXsQ4v2+1ygJ3YT4GDx0UC3KdyXgtEgNIlTUqsTUaYR+z u3iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UJhIyinjQlC8QYwL1Wyti6K6bH78LqFrHUCwyb62DiY=; b=FK7H41aBcwAQpHTcXgXA2g+0D7hM88iz/6K1ePZ2wYAB5CDwOzaIkv1KpPSl3Eub6p 8vZBC4ctmMpFfGA79ifyeAVSh74V8thypi6i1IKDIQBP0Brl9pzRRrdOs4eIPXpCH3FP Ziup6j3VakkE6mWZJ6rBMScWQQKKQoQHoLHGiGk+MejKFkUA8v+o3CfR6aIRJ6gG2wXy q2Ib5vsJ+SUz8l15bUrYaq5aOK6UvrSBeZeW16rcMwbw9CmIMt4XbKy6A/EVr1C/AQEj Vd6fRKPEaRnB26NMUBQl2yJX78oQA5GLlCfrHHbq9OZ5XXcNBf34soA5eH/M15qtYBXI Gong== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hero6S28; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o21-20020a170903211500b00161d4849aa6si23337855ple.390.2022.06.07.20.21.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:21:34 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hero6S28; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 04C8C40E2A1; Tue, 7 Jun 2022 19:33:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382781AbiFGWAS (ORCPT + 99 others); Tue, 7 Jun 2022 18:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379253AbiFGVCO (ORCPT ); Tue, 7 Jun 2022 17:02:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88C21252BB; Tue, 7 Jun 2022 11:47:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 48899B8220B; Tue, 7 Jun 2022 18:47:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA0C4C385A2; Tue, 7 Jun 2022 18:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627627; bh=4JWxKeMCzS1I9F8T8lOqSs2eeTmYuFxzWuEf3D1lwX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hero6S28mIn+sjbHJN1t4SyiS4dMBG/F9WHfCpxITsYuc1bGQn4FiURzNcP+B3mZf 2sn5CfDnEpFFcf91QoamzzvoDz/hydCyXWQbtuGuYKwLJ3+biyaY61V/del7M59cuw rrgNMVLwudFM7kPma5JpFDmtOCW5rbapsJQ/A4gk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Michael=20Niew=C3=B6hner?= , Hans de Goede Subject: [PATCH 5.18 036/879] platform/x86: intel-hid: fix _DSM function index handling Date: Tue, 7 Jun 2022 18:52:34 +0200 Message-Id: <20220607165003.725103749@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Michael Niewöhner commit 1620c80bba53af8c547bab34a1d3bc58319fe608 upstream. 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 Link: https://lore.kernel.org/r/66f813f5bcc724a0f6dd5adefe6a9728dbe509e3.camel@mniewoehner.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/intel/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/x86/intel/hid.c +++ b/drivers/platform/x86/intel/hid.c @@ -238,7 +238,7 @@ static bool intel_hid_evaluate_method(ac 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,