Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1512378rbb; Mon, 26 Feb 2024 11:36:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXtm08NuC7DgL9bQm2B7EYo44X/0aR2Tv08s8B9ZKDsrKhuHxqTY6BSN9TApHVQ9qRu//6PtCIEN3qLLziRQpJ85YRCdN1HdPNTx8CExA== X-Google-Smtp-Source: AGHT+IFxX6ufJxfYSwONoevUUFSlFI1Usll4fmq28kUUxxYQYnejqqDQDoIO4hD1MYsyA8qaDYXR X-Received: by 2002:a17:902:eccc:b0:1db:ab71:a4ae with SMTP id a12-20020a170902eccc00b001dbab71a4aemr8879982plh.42.1708976217669; Mon, 26 Feb 2024 11:36:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708976217; cv=pass; d=google.com; s=arc-20160816; b=DRAm2UEihP7QH27VnTqlq/iDevEkePJeJ5RomV3l07gCDKIq25kQeWL0VdH8DRFmCk i54Xw5w8MaufX4KRQgmrBW2QzzU9MXoGvkigW2UtNsfd0M3Mp7ofP6GG51pkoRIOX15H x60wbOUQI+7BEWHyFM+7rJZPs6jbJQLqm5GWSMwFjlx8cxdB0S/MnFd7/9DZ14jn0Wfb t3hyG9pk4JFo2kgNAroo8RxmDmRs1CzmJMkTNjAOJqmR67Qe4DmbRzPN8ZIB6LGnRfoV ujiS3FdNM5y9giZ+b7lEeGm/yLNPFvWIcYKAMAUpBgS4Gy3CTdXnOQ2AGAHPtsYAMkof djIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=sXLxkYA4wnXFV+vezcGtZQK6JXyQWmQcdXxupxuHhog=; fh=aWe2z1uStpoiBA2qM+eAOlWSb3LyCQpHuaYvwXFmT30=; b=v423M2jU6iUnz4xKl/jwOj6fpVDwokm3vVa2ftbv/OQcih/17c5ss0lo1opUCkF0bG KXiEJ5j1ldzVCkupMaZ5NHOalthsevq/CBlfZvzz4Mu7gIbdmztYGxqZLP6hMDqtRnDI nqtX3aWOoD7a11sgzaOLWPlNjLCWmnMF0vN1yFJF0HsBB2tM7VoeXvoR+kd0oMiTNkr7 ZhHd/tGqmHe0ghVbcPs7fFMdqtFeQU/KmBD8XEQ3C74lC1b+YORzxGSo45dm4fd+tieh Rm+QohrCBcnyy4SNgM3RyNplbhCKZcORQWaKrGas/rZSiZSRCMxelO8MkFXKdSVv3nyA kNdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=SGvkgFAv; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-82249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z16-20020a170902ccd000b001dc2ee53f25si89766ple.142.2024.02.26.11.36.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 11:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=SGvkgFAv; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-82249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D64E289930 for ; Mon, 26 Feb 2024 19:36:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57F2E130AE4; Mon, 26 Feb 2024 19:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="SGvkgFAv" Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1594412FF72; Mon, 26 Feb 2024 19:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708976201; cv=none; b=ie91luTRM3uXrKO17vQkfzOtJEgp9/xDs1qVIuYVgtoL8WLTdmrlE1p54IpZRl7BBnDr5P5KWDKDH5j6ML/+EGPxcahLmyT69+FfsAIM8QwdDtPuiQJ30cG2JYUvtgHNyyjDg2XgesbgMKuOs5wbga3RTNWDQg2ScRbCb01WHgk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708976201; c=relaxed/simple; bh=b03pH+DuQDWIC35gBC8LdNNtRJ8KK9qgtTD8+axxS7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WdqviuXGWInqQdCHlB5MaB6h5j26qTh0dOs1r1pgTwPHzdC5QS03buhC7Sw9Kdl5m72FAbJu9laExtNzQvoIol4VH6Dig3u2mo5Lcvw9QfXzjNPCXVtV57rwwktQhEnoG3mG/xkNU9z7Dh4wtuFpPnLMZhkLtazCZYV7A5xBAxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=SGvkgFAv; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1708976169; x=1709580969; i=w_armin@gmx.de; bh=b03pH+DuQDWIC35gBC8LdNNtRJ8KK9qgtTD8+axxS7E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=SGvkgFAvlxPM/XtYmTAu2aLnE83LuJ/D1V7/hPTO80jICiLJld2ugQJg08nyhCH5 eucewbtEpabOKs5e/hqKMepDbWln/XC5ey2KbnRPm6LxBTA46F2CUIDNZhMOGnuLc WMhxirUk+N+IEGNmUN7FQFZTUn5rkH141su0N8tN5xcd0xgaAXbvAJbi6UeXw9wiN HGeTyLYIXajl9tysjR4UpgznJpeabMSWYMPO5RPHhYvFybu5IdGjUEYCxUmLtA12t 8GQrrPqMM8uUUTMOfnF48kfb0JcVdsiaIPXs1OCxGR5vKMlf/kN/zuEb2ubqjP0nq CaHQEjzysPGAjcPX0g== 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 1MQMyf-1rIunQ2ycz-00MHKh; Mon, 26 Feb 2024 20:36:09 +0100 From: Armin Wolf To: jithu.joseph@intel.com, linux@weissschuh.net, pali@kernel.org Cc: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, Dell.Client.Kernel@dell.com, jdelvare@suse.com, linux@roeck-us.net, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] platform/x86: wmi: Remove obsolete duplicate GUID allowlist Date: Mon, 26 Feb 2024 20:35:57 +0100 Message-Id: <20240226193557.2888-3-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240226193557.2888-1-W_Armin@gmx.de> References: <20240226193557.2888-1-W_Armin@gmx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:5KRjlReq0fUexESOICqZ+Xej/Gta7WKxFfE0Ds/Mlh22gHtyojb 9VONNU70xwTckRreWpwpGXkREsMsetPt4c5tsxynAt/YcLFArqkucDCEFNHixbFNPvQapl5 8TFCySMfsLjuDwggF5Diqx24p+/IZyA6pRSJ0lfRyteaB0mVFRKQbzfRyzHUSbQBMvqmMEK cA5QHqGZ3xtpzSq9IwR1w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:tRB8kEeCnaQ=;jDuuCmLA9Z3dqQrHys5c5LXJQrO R5MjHi7B/aGDjLBXXPU6prifwZ+3MWKyCaSiAAZZ0M9chpR2QoJ6am5RO0bnh0Oa7fhqNXWlW h/pt3i5Hoao94ZDEiK+8jzPLjRom9M9/+dXUigwUikkGFXmAIHGD9zaQD4pV+kMXzRkeM9Hfa 9CA5Bn+D/vEUBKpuXNXkfGtMA6Xi+TodiESvOs9FESdsPTAOCJq7Ng7+D6YtLp9rBtAejuz0I GAu6VNbY02tZMAAoxibX8rq9a4XANDWAlhZX/cqfDPSJKXgtHBVze3rFh9YnMG7CBeEKjO+nm 2Tx+02GuBM4hsKRIK9qqoapSauUR3yQ7cjoKCnSH5KlLBXfj6xNQH/c+KADx1BOh5U0CbOA23 oG+imYSjeRWUwFtuh778IaLKX2lmprL2h53AVoen/kMZgpYBlAAcNk4LR9bpUMaU3HJoG7V8X wSvJcMyFE+IgQH/k0qpSV7cb/unUH75PCHBCaw/WnwMDX5EDxFayIqeeIFiL50bJ2VgPctEVn UyQyGcLjbVa7cdNsfdymP4EzVURTnh5CU/0xc9Sm6CuhHdUlLA7qdSsa+ByS4p6TjetHyJ3go K03vsY+VxBvphUMmIBu+88xGf5YZteR2c3nd3MVn7CE4s/fx7WWXTf3P1ufp0zkAE1ydDPUSV 3RtcSa5tKFp1asVNfhPjRo1vv4A6uxwkrY3PjDpD/cvQNIrLjHlez6GPyhrGoOZIxj38wqHIc RoHoklokTu3nrSldl9OUkuJzD9OGARLoI3u9ToDGtly7BKWS9Lj1Op/wwCkRXuMgd9v304fQs GVQM3hCn9NDIHBiTLCrSHSS6BN07I94hCOL9IQp02rABk= The whitelist-based approach for preventing older WMI drivers from being instantiated multiple times has many drawbacks: - uses cannot see all available WMI devices (if not whitelisted) - whitelisting a WMI driver requires changes in the WMI driver core - maintenance burden for driver and subsystem developers Since the WMI driver core already takes care that older WMI drivers are not being instantiated multiple times, remove the now redundant whitelist. Tested on a ASUS Prime B650-Plus. Signed-off-by: Armin Wolf =2D-- drivers/platform/x86/wmi.c | 39 -------------------------------------- 1 file changed, 39 deletions(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 349deced87e8..1920e115da89 100644 =2D-- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -90,16 +90,6 @@ static const struct acpi_device_id wmi_device_ids[] =3D= { }; MODULE_DEVICE_TABLE(acpi, wmi_device_ids); -/* allow duplicate GUIDs as these device drivers use struct wmi_driver */ -static const char * const allow_duplicates[] =3D { - "05901221-D566-11D1-B2F0-00A0C9062910", /* wmi-bmof */ - "8A42EA14-4F2A-FD45-6422-0087F7A7E608", /* dell-wmi-ddv */ - "44FADEB1-B204-40F2-8581-394BBDC1B651", /* intel-wmi-sbl-fw-update */ - "86CCFD48-205E-4A77-9C48-2021CBEDE341", /* intel-wmi-thunderbolt */ - "F1DDEE52-063C-4784-A11E-8A06684B9B01", /* dell-smm-hwmon */ - NULL -}; - #define dev_to_wblock(__dev) container_of_const(__dev, struct wmi_block, = dev.dev) #define dev_to_wdev(__dev) container_of_const(__dev, struct wmi_device, d= ev) @@ -1093,32 +1083,6 @@ static int wmi_add_device(struct platform_device *p= dev, struct wmi_device *wdev) return device_add(&wdev->dev); } -static bool guid_already_parsed_for_legacy(struct acpi_device *device, co= nst guid_t *guid) -{ - struct wmi_block *wblock; - - list_for_each_entry(wblock, &wmi_block_list, list) { - /* skip warning and register if we know the driver will use struct wmi_= driver */ - for (int i =3D 0; allow_duplicates[i] !=3D NULL; i++) { - if (guid_parse_and_compare(allow_duplicates[i], guid)) - return false; - } - if (guid_equal(&wblock->gblock.guid, guid)) { - /* - * Because we historically didn't track the relationship - * between GUIDs and ACPI nodes, we don't know whether - * we need to suppress GUIDs that are unique on a - * given node but duplicated across nodes. - */ - dev_warn(&device->dev, "duplicate WMI GUID %pUL (first instance was on= %s)\n", - guid, dev_name(&wblock->acpi_device->dev)); - return true; - } - } - - return false; -} - /* * Parse the _WDG method for the GUID data blocks */ @@ -1157,9 +1121,6 @@ static int parse_wdg(struct device *wmi_bus_dev, str= uct platform_device *pdev) continue; } - if (guid_already_parsed_for_legacy(device, &gblock[i].guid)) - continue; - wblock =3D kzalloc(sizeof(*wblock), GFP_KERNEL); if (!wblock) continue; =2D- 2.39.2