From patchwork Wed Nov 29 18:16:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 171536 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp528261vqn; Wed, 29 Nov 2023 10:17:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAbrMu4ImWsXyhzOsu2aLWNNm5KRe0Xcq8GXN1V0rAZJNEQLmMGVd0exlSvwCWQD6n6dt2 X-Received: by 2002:a05:6a00:15d0:b0:6c3:1b7d:dac9 with SMTP id o16-20020a056a0015d000b006c31b7ddac9mr21140490pfu.34.1701281856932; Wed, 29 Nov 2023 10:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701281856; cv=none; d=google.com; s=arc-20160816; b=clY1Q4QmDKnJ9ewXTfh21MbrVVDx+iUkjECEzfo+9edVQQANa5G9FSFTFswFdKqIld GWWRQ9/2TmxVjnhHGbxFJIOB5+WM6bKickcSy9bW4dlejhdbIgDts+xQRP+U1VpUdR7S hDI+Amu7FbYhDbry9KtMrpQlbMBdcfMjXXAKyHr6zYJiBHeEHQ7IcI8CB09nY5XcetaJ 0Wx6Fns0+bxHYtWuOzXrBU/KH0RwTJ3DZ9xPBta3zfycqK5zkqrfyLxAG8xrenw5Vq5U vppsiOQc5eh0JnpBcVZcvnIe3klxf+d0WGEANKezfgCmGoTE8sZesRxVd/W3obp6TaRc pbGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=0ydfn9zbeW4w2FvikOPXxfxte8fHFk5DQPvdJj9rxxw=; fh=VE5ZfoJWem8it6OrnlM5ov49ej/hHjarqyIgnpICDoo=; b=UcyoyJdoKdwOp8fdfX4SJDCDZLakB3l1Z0kDZF4x7uClLEU3T0yjTmEunZGzAEsUpE GNlvZ9J5xkqyb+4LH8/m4sLGfuwVtViW/Xgrj/atAfwNm/2xTXmfAyPq5Rt99dd5vcDH 6/qvbe4MpVALRKU2jtBzSYnK0mxmQfzsJOZhha09FVwIfR6fpy1oIKpUVBqXwfWP90L/ 5nNw8Torsx7exsM7gR5chwfOj3pcIaYFdJ4qYwPV8y/q5NnL8hgFZr7fMKqlOouTe3BW N/MeT6hJQ+z9HGjNtAIXdYQJkapRETJnbJGf1G6xPhfrRnE5Mf0dQxkXauY4pHTyLKMy SP2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=UsWayn0H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id w18-20020a056a0014d200b006c4d54dd60fsi15131145pfu.298.2023.11.29.10.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 10:17:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=UsWayn0H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A59FA8042006; Wed, 29 Nov 2023 10:17:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbjK2SRC (ORCPT + 99 others); Wed, 29 Nov 2023 13:17:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjK2SRB (ORCPT ); Wed, 29 Nov 2023 13:17:01 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6593B9; Wed, 29 Nov 2023 10:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1701281817; x=1701886617; i=w_armin@gmx.de; bh=SkykkrdVMyo+wYmWI6AvKsqQ/Fs+Iqad5hnFwSp9bDk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=UsWayn0HDDWIqHwAFeST8UwvF+omAcvkAw85MDwwW0xDewCRhmpiFkhmdPm5t1MY tbrqSz7I2BvBtg2hf9So0QIkj/0YMZNB3HJcQLYwFRncKSppyDFW7KatJw5GUZ8rb Dq2E36l3A6S7QzjFh+LCC3xhAc62pEQrRQSRnmzUPig+4PuKSBAh/kUvX1XK8ptuG VQv5TEGk2FPavfxqbtVxhILUd68ZAeHYC4vEX3hny+aJMj3VGnBlPGBWGcITTEdMq aB3ZmsE/Ewvjm25No7b/4HAsiUJIqYuLYarIukneglmfTyrgzQCuXIIYNxanIVyT4 0TatbiMOna024jCUrA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MlNtF-1rZXTI2uzN-00ln8L; Wed, 29 Nov 2023 19:16:57 +0100 From: Armin Wolf To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] platform/x86: wmi: Skip blocks with zero instances Date: Wed, 29 Nov 2023 19:16:54 +0100 Message-Id: <20231129181654.5800-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:+NBnaTf+YFwq+J7+NUSzfy6sIp2qeoca0FjRagB64jV2JaaEM8z j0MrzkGBG8YLJeXnrhsspmKTAxuO+04jJJg4Qqxmz8N2yioVa9zGTu2rT+ybyiIRMEmNCQP T6QQp7Oqah1I/AyNUmAos5SEOXNDudfjFV9CUikh8Iv2Vh3TrWv059+uZRYlB2c//TV2uHA QQUaATXThtsnUgLjIEw2g== UI-OutboundReport: notjunk:1;M01:P0:+26yQg5Xt+A=;eDNGmFqhrDPmadpeJ2urwSOuS8y q6QemUkR6BSvVtgPhqsvQJhf76ZGzZAjqzZcR4UOn9AypIZO79sQD4kULD4TzYmwpk5eZt80I xoUsCqA97g9Lwq8qNjCtq5cNWF0xWzh46K95O38e1APlPyAQY7mCUmDBjgyz18D8ZsivQC8cT k/3VQcgPDKsQXUh6wVfe42dVQ/z1PpdlYlJV0ttckGu5HrwMVhM8H4zN7qw6uRMj7dyO7J73h g4fNL585W5VrkpbgEIbpchMwmCtzoMZVwzz1DqRwyU+NWU75Dfto8kuvxbffd524MXfjW8aUP eyIReWDfARiMDY1QN0cmW0EJvd6dS+qxlmJnsNwN8TIjCU/ijRvYz8161jBOJLsUAFN5PjP/k HY1Idu3h4stYGU9F7cyN06YiiFHKIDB2+2QWfYtAOYTu3OHQ26OFpGX7D2StIRL/+1zQUQboE FK6Xr/sdxX6EKkZvqVP3WPgIBHQtrp/IIQtHROjP8ZgIQB7q+Mq93kLB42rTQdMckVIetwiq2 jXpzJInTBKTfvJcrPmKUn99b92iQCsbT7k/BDRK+91b9EnTv3u1HfN4LisxZts0hNP0ArYV79 P4BCoU0cLhggleQf2B2tGJJhKwUri1lEfghk7TRdqRB3BhhhBcDTVLGGN6KnszzIU7342SC6f j3y+w/BwAUDax44Kl9f4IqwIq0OGCoOnnVdgRnZnfLsOH0hD3d1gjLVCJhhLr87pWiwXwf2ai X8fIV4DBSdbZWzN4HKgt7GB+p81yThkHugbB4NXYfnBqTMD3Aj8O8YDygl8DvAInBjxJtY1lF 1oxcfYqZ2dYdQgZg6OlIqssF2XiB6K/RcWeGjGKhUSBBPMQlp+Q4s50WyCb8xVC6Ii9RG7dFV axgfz6I2hamv3i/K0gy+rLZP/R4yZhhP64Y+EgGAd+3WBpWL/DRvT/S77E4KnzW7zEXFSEKNo JnTqv660c8PiMEkBhEvSEAB0iF0= X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 10:17:12 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783923324047918642 X-GMAIL-MSGID: 1783923324047918642 Some machines like the HP Omen 17 ck2000nf contain WMI blocks with zero instances, so any WMI driver which tries to handle the associated WMI device will fail. Skip such WMI blocks to avoid confusing any WMI drivers. Reported-by: Alexis Belmonte Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188 Fixes: bff431e49ff5 ("ACPI: WMI: Add ACPI-WMI mapping driver") Tested-by: Alexis Belmonte Signed-off-by: Armin Wolf --- Changes since v2: - add Fixes tag --- drivers/platform/x86/wmi.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.39.2 diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index cb7e74f2b009..4f94e4b117f1 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1346,6 +1346,11 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev) if (debug_dump_wdg) wmi_dump_wdg(&gblock[i]); + if (!gblock[i].instance_count) { + dev_info(wmi_bus_dev, FW_INFO "%pUL has zero instances\n", &gblock[i].guid); + continue; + } + if (guid_already_parsed_for_legacy(device, &gblock[i].guid)) continue;