Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6509460rwr; Mon, 24 Apr 2023 22:35:33 -0700 (PDT) X-Google-Smtp-Source: AKy350aqW7QU1fE1e2iuNv6doziOHUks1hSTvkQYjo4M5GGmX+rDXTn7XWX38GNYflqTo/QYs0ER X-Received: by 2002:a17:902:ea07:b0:1a9:5cee:fd47 with SMTP id s7-20020a170902ea0700b001a95ceefd47mr12811772plg.61.1682400932822; Mon, 24 Apr 2023 22:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682400932; cv=none; d=google.com; s=arc-20160816; b=mehXWEZwxCFbwtuqeOnl5ytwBzXKnWrO6W5ADz5S51OoT/lT16HViDomqZ8bx5ap8R Q+vnOP2/ZPpqnFkblQjsikPYpgDiAQRCqKB7CUhWr5Bi7kQlk8l9pV+Yb8P79VDh77qA o0gYg/aFwl3H1z4t/T42VLiNdeCdXhBTnJfh5Jv5jXK8mWNATmwEd30eeCgG3hK4diP7 KSYFj/rmyjJhLEEYCiwjeD8dN5qpOfyEH1QJD9ntaIzDbBpiNSwIVvMCtoRuGuKCHNtR X1wg614Ta2agmotOL1xViEX7FDkZ4BrxQg4SKCcoYweunmkV6bcLST2WuQxjKVwompNp /GyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=jknpOCtHKHlR7rHQZ0ft5U3nCo70lDKXuZr+RtTWVKo=; b=eLFS4QVe8yWTcqwnXar3eZ7jXkCZ0EVceDJQIx9jFlfOtm3eWjNUN+JFSxgwFCbKkT WuAofFfnjqfejErc8fZv0vta23JMPnsTGz3DZniMIOOY9ev2tnEcj+S6KeVkWyjzj2iO MQqOnLzxsK5ebeRG0RyzgvEmtkAjl6Tw2Ocxi8fm8dG23wseJ4pd7rpJCkzTFaLlU8di T4KpIlkXBZ6BpF8cuw1Ctx+fqJNS61MGKr7gJgI66vc9jEz4OJk1cbi6LOdT9FqpCjbp ZsaYtacA4AZrF3+8MWH90THaOpXND9BoIJLdnbRc9DvUK3UiVO6ivzWrdCqT9M6wHoXo R6og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=pUpp+zY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a17090a3c8f00b002478d3604aasi12935831pjc.110.2023.04.24.22.35.20; Mon, 24 Apr 2023 22:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=pUpp+zY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233225AbjDYF2G (ORCPT + 99 others); Tue, 25 Apr 2023 01:28:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjDYF2F (ORCPT ); Tue, 25 Apr 2023 01:28:05 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B63C6183; Mon, 24 Apr 2023 22:28:04 -0700 (PDT) Date: Tue, 25 Apr 2023 07:28:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1682400482; bh=w7Y9+y7iUqNE/76jkd4Xf0Zw6KPMok+py5RddA3X4vs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pUpp+zY3z7s40Z4uXQxuFKqnuzAnJef7KE6HO9x70xy+JXjpa/tQW0LeUhwroeiez 4K5JTJIyzip+xO6yTK0b8Qx9cnowjjMlu/9g5D19LzgL2C1yYqRTjw+I7SN0Yz9ViM kFEstyA4zYS8fzYUx1SA/OvGSXU4Z95v/9lxmAC8= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Jorge Lopez Cc: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v11 02/14] HP BIOSCFG driver - biosattr-interface Message-ID: References: <20230420165454.9517-1-jorge.lopez2@hp.com> <20230420165454.9517-3-jorge.lopez2@hp.com> <67108caf-2a03-4ef0-9f8d-819b0d6f0a2e@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 On 2023-04-24 17:14:57-0500, Jorge Lopez wrote: > Sorry for asking again. I just want to be understand exactly what I must do. No problem! > > > > > > > > > > > + args->command = command; > > > > > > + args->commandtype = query; > > > > > > + args->datasize = insize; > > > > > > + memcpy(args->data, buffer, flex_array_size(args, data, insize)); > > > > > > + > > > > > > + ret = wmi_evaluate_method(HP_WMI_BIOS_GUID, 0, mid, &input, &output); > > > > > > > > > > The driver is mixing calls to the UUID based APIs and the wmi_device > > > > > ones. > > > > > wmi_devices is newer and preferred. > > > > > > > > The driver calls wmi_evaluate_method when initiating an WMI call. > > > > Where is the driver mixing calls to the UUID based APIs and the > > > > wmi_device one? > > > > WMI calls are made by calling hp_wmi_perform_query() which invokes > > > > wmi_evaluate_method(). > > > > Did I miss something? > > > > > > wmi_evaluate_method() is UUID-based. > > > struct wmi_driver is wmi_device based. > > > > > > The wmi_driver/wmi_device code essentially does nothing and is only used > > > to validate that a device is present. > > > The same can be done more easily wmi_has_guid(). > > > > > > > Are you asking to replace all calls to wmi_evaluate_method() which is > UUID based API with calls to wmidev_evaluate_method() which is > wmi_device based? Correct? To be honest I'm not 100% sure. wmi_device is great and perferct for simple drivers binding to a single UUID. But it does not handle multi-UUID logic as your driver needs very well. I would argue to stick to the legacy calls as it allows you to drop a bunch of code and makes the initialization flow more straightforward. But I don't know if somebody else won't ask for wmi_device later.