All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Armin Wolf <W_Armin@gmx.de>
Cc: Hans de Goede <hdegoede@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: wmi: Skip blocks with zero instances
Date: Tue, 28 Nov 2023 15:14:18 +0200 (EET)	[thread overview]
Message-ID: <72248066-9c23-1850-b9c2-4a8e4d9c4385@linux.intel.com> (raw)
In-Reply-To: <20231127222242.115507-1-W_Armin@gmx.de>

On Mon, 27 Nov 2023, Armin Wolf wrote:

> 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 <alexbelm48@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218188
> Tested-by: Alexis Belmonte <alexbelm48@gmail.com>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

Thanks for the patch. Should this have a Fixes tag?

-- 
 i.


> ---
>  drivers/platform/x86/wmi.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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;
> 
> --
> 2.39.2
> 

      reply	other threads:[~2023-11-28 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 22:22 [PATCH] platform/x86: wmi: Skip blocks with zero instances Armin Wolf
2023-11-28 13:14 ` Ilpo Järvinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72248066-9c23-1850-b9c2-4a8e4d9c4385@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=W_Armin@gmx.de \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.