Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4457687rwr; Sun, 23 Apr 2023 06:12:52 -0700 (PDT) X-Google-Smtp-Source: AKy350aywO+iiz0tMlyvkxNCl81QpQ+23Kfv4GGykzXTuii+a+j7macgYyj8d/EuttXmUzTX4iFj X-Received: by 2002:a05:6a00:3408:b0:638:abf4:d49c with SMTP id cn8-20020a056a00340800b00638abf4d49cmr11859989pfb.3.1682255572593; Sun, 23 Apr 2023 06:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682255572; cv=none; d=google.com; s=arc-20160816; b=qCncpYmP47rlCmkqkyrNpRUl/q6yB2Tw1wp6pSS30O990VEITc/9k/1FHmtN+xY1fA J8x+SjTL6XNzIPTywfSPilNJHqMTMBvVSFZ7+jEmK/dLGNnALF25YyCIyr5vg1qm64lJ q4ROC62p14M7Nut7f8JcLpJJZgib/jfRkxI9pfOkLOdpSRLCl1jIJtZrNxgXloMoh+7d WWR+VIoirCJSzPb2PrYNNfr2/Cuhn2t73KKFnuRXrDyo77XSh9pS89U/T/1vfGSEuEQH +Joh1JSEemfi3VnFoQrukUxau0WUSX8fegnVwdpDnDUwfQGyuRrXvOgwHRV7sq9OLI6v t+4A== 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=t81Trhyv04zXrClD1WrGcfC69RKN2f1vor1AfVFnhtA=; b=a3Cy/SJgix74a7MfarbwiSfnlSBJTyHTryR8gkGKdmd29DkH4bIO5hBaj1AUtgQt/X KWo4mhKMuybiwhJYtqyjQNKGImXxfenoxWvQfeVF3rnEYbbfUJwYFuVPgDVPGWHEX7so voHnKHyfNsxal/oRAqTpjObgxX9r7la1cntZqZp9WircaxLJcmTADhTwksbFginKRu23 xzJp9g9cIZSByDz7gvMrTWeL3rdphMNQMBzKOXaVxWFAJB/QsaISvFuppp9fZAcMxG7x 7cVu9ReyVjNDquFJSZmDj3EzGyp+vYUEowLFmC1NlzPux8tqPAlSH9KFNLN4gXGeTyvn 3Vag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=eRRcjBXB; 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 w5-20020a626205000000b00624ac1abef6si9370651pfb.218.2023.04.23.06.12.36; Sun, 23 Apr 2023 06:12:52 -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=eRRcjBXB; 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 S229839AbjDWM61 (ORCPT + 99 others); Sun, 23 Apr 2023 08:58:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjDWM60 (ORCPT ); Sun, 23 Apr 2023 08:58:26 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6001E10E2; Sun, 23 Apr 2023 05:58:25 -0700 (PDT) Date: Sun, 23 Apr 2023 14:58:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1682254703; bh=HJZukvWGA79XO5tkgTXFO4AGdPlZ1YR+UNXDjQ8EzL4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eRRcjBXBJd4zdlXEeyRIsyVffcxauEnlbc8jYu9ZVpvqdLY0dMMG/XZ8SWbxdFcnP N7r0WScvcRYEkD1lwaWKv9zpwDGtCcrVBGaRebHduWBTLckXVb/9MSF9uDl0NYCcta 51tyacmvRVPaQDX/XRDwyyKASn8tCmL31rxi9waw= 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 10/14] HP BIOSCFG driver - passwdattr-interface Message-ID: <740fec33-7dd5-401f-b5fb-aaf2201f1d1f@t-8ch.de> References: <20230420165454.9517-1-jorge.lopez2@hp.com> <20230420165454.9517-11-jorge.lopez2@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230420165454.9517-11-jorge.lopez2@hp.com> 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 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-20 11:54:50-0500, Jorge Lopez wrote: > --- > .../x86/hp/hp-bioscfg/passwdattr-interface.c | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 drivers/platform/x86/hp/hp-bioscfg/passwdattr-interface.c > > diff --git a/drivers/platform/x86/hp/hp-bioscfg/passwdattr-interface.c b/drivers/platform/x86/hp/hp-bioscfg/passwdattr-interface.c > new file mode 100644 > index 000000000000..02fc766eb3cf > --- /dev/null > +++ b/drivers/platform/x86/hp/hp-bioscfg/passwdattr-interface.c > @@ -0,0 +1,51 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Functions corresponding to SET password methods under > + * HP_WMI_SET_BIOS_SETTING_GUID for use with hp-bioscfg driver. > + * > + * Copyright (c) 2022 Hewlett-Packard Inc. > + */ > + > +#include > +#include "bioscfg.h" > + > +static int bios_attr_pass_interface_probe(struct wmi_device *wdev, > + const void *context) > +{ > + mutex_lock(&bioscfg_drv.mutex); > + bioscfg_drv.password_attr_wdev = wdev; This wdev is never used. It seems this full subdriver can be dropped. Or the one UUID-based callsite using the same UUID can use the driver. > + mutex_unlock(&bioscfg_drv.mutex); > + return 0; > +} > + > +static void bios_attr_pass_interface_remove(struct wmi_device *wdev) > +{ > + mutex_lock(&bioscfg_drv.mutex); > + bioscfg_drv.password_attr_wdev = NULL; > + mutex_unlock(&bioscfg_drv.mutex); > +} > + > +static const struct wmi_device_id bios_attr_pass_interface_id_table[] = { > + { .guid_string = HP_WMI_SET_BIOS_SETTING_GUID }, > + { }, No comma after end-of-array marker. > +}; > +static struct wmi_driver bios_attr_pass_interface_driver = { > + .driver = { > + .name = DRIVER_NAME"-password" > + }, > + .probe = bios_attr_pass_interface_probe, > + .remove = bios_attr_pass_interface_remove, > + .id_table = bios_attr_pass_interface_id_table, > +}; > + > +int init_bios_attr_pass_interface(void) > +{ > + return wmi_driver_register(&bios_attr_pass_interface_driver); > +} > + > +void exit_bios_attr_pass_interface(void) > +{ > + wmi_driver_unregister(&bios_attr_pass_interface_driver); > +} > + > +MODULE_DEVICE_TABLE(wmi, bios_attr_pass_interface_id_table); > -- > 2.34.1 >