Received: by 2002:ac8:3b51:0:b0:3f3:9eb6:4eb6 with SMTP id r17csp1146629qtf; Wed, 17 May 2023 11:24:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NIwECh3/NXVgTywdTaApKsx4LpsqpP/rwafiFcqf3Xl2fP1uZqa1XUyfAWCslDXIgKyV6 X-Received: by 2002:a05:6a00:138f:b0:64a:a1ba:50fd with SMTP id t15-20020a056a00138f00b0064aa1ba50fdmr775907pfg.22.1684347854089; Wed, 17 May 2023 11:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684347854; cv=none; d=google.com; s=arc-20160816; b=K8GTztsaEt5lG4rxT83H0EaP+SHqOYLB7lzJqcFAD+SOWaWDBhjlt11y3Ilj67UWZC wJVm3WpeK2c44aOvDGFoWOai2Y2NQlIQKoD40ENaMX1flEu5ErZDAZDKKx9OHYFObeyN dZiyZ8k7O9yYvub9nqSUoC7LE/oh9vFQ45H+f1Ta8LvWhkVuP3n1FL1opNfVLmZOcJdA n9zK1xMnyR2AZQfv2ky6/fnHJqm/UHsYX3T1q3OjKGBcT3PT0mX8Ub9EidhjkMOyl7nL Zvq8fBQnbhyihVVca472W9SEQMtEd4+GI7RedlciUHlUicUtr9P8i7RcPOPz7dOli1oF UINg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=+82eXvQj/5RebZRCTI0l45z9r2QlOLsinwQcEFJrwa8=; b=aC7fy/NckJ7visPAr/HvHyJYqQ/+DYnVfpzdN03CJCw0ZvCTD0+fS3OxcSso8/57Py xZVvHS9FKfLfAR4vIyiqxY8+cxe2wyzVOh1virO094SznEziZ9JHSWfxaxeMSHczJ/4d r4bn58n4RsR90rl2VAP/THf9dj2DJUhFdS3cBtdVwJZdUlGG0P83BHHzfs2jqBu6Jw+o JjtZNznvK5nYLsDLJrmT0eDFOzusYq1jhXiFC26VQxmNDLgAyM5BkA2AhZ1EWvNAi7Qz x3silGF6jCb4J96CJ5roMvKTCZkmxWt7JYrDZQz4H5ItrX2bMAl4KlWkTheFEwa/7zQv Zexw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=ccAn1S9x; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=hHVnbXq6; 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 t64-20020a638143000000b005303a78b420si21850078pgd.60.2023.05.17.11.24.01; Wed, 17 May 2023 11:24:14 -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=@squebb.ca header.s=fm2 header.b=ccAn1S9x; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=hHVnbXq6; 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 S229456AbjEQSUK (ORCPT + 99 others); Wed, 17 May 2023 14:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjEQSUD (ORCPT ); Wed, 17 May 2023 14:20:03 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E27201708; Wed, 17 May 2023 11:20:01 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5A1995C00CF; Wed, 17 May 2023 14:20:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 17 May 2023 14:20:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1684347601; x= 1684434001; bh=+82eXvQj/5RebZRCTI0l45z9r2QlOLsinwQcEFJrwa8=; b=c cAn1S9xi5hKJORFlrRzdSxw9wBU18ZAr2cHLoTvZHd1QmNEmYDSegPDVMX+WeGO3 pqYDicdACEsmJ4HYI3p3LkTf+IqGJZA9xFPhu2enhspXNiAa55hc2Oc3G2GDIv+p noZZ60T3YQv1vPkGz6I/KxLTR29pFNCsU42IunRk7mqmXOHax5DKAXP88JLVGkfA FFfU6vDM8EIjVYzmsq7Xv2BlBiTdsnP1S67UFYC+/+7B+lXk8ThfKVxd1eiK+vqf yfkzm6v+BHAH5b8KOYicNi89WygrbJjHuYcA3aGedUJ956QDU3RcVOqsp4VFyXtV 5qHTsJ9LrNMsaAhmFc3VQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1684347601; x= 1684434001; bh=+82eXvQj/5RebZRCTI0l45z9r2QlOLsinwQcEFJrwa8=; b=h HVnbXq6wQRbOxW8gXAqCpZ2hAT6GLFTzfWxX/9dw2DLRYqYCbF1+LnzhXZS2eav5 otz/SE0aun5qV1pJBPpfi/wjSdJze//ASz6SD6yAUZlKxKDxa1n6dOLHPY0j4656 N28CdbHkHR67zGe6Gw6fhMeuUvDFWZ9vi/MecaCjvyEl5W7ZJJcRKXIYbbH7T2tz jTLT64jyDqQt1BtVVFRDr0jrtZ63gSupre+KgxTR2OQ74Zv1aFQeV+A3xVjUuJtX j0uVyXAxcnNgWbMdMFUf16oFf9DbQjCd/eQL+IV1QEgofqn7M+CaA24v9FFzKBUs TQSvbDGOHfHv1LM7C86MA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeiuddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 May 2023 14:20:00 -0400 (EDT) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] platform/x86: think-lmi: Don't display unnecessary authentication settings Date: Wed, 17 May 2023 14:19:45 -0400 Message-Id: <20230517181945.3725-4-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517181945.3725-1-mpearson-lenovo@squebb.ca> References: <20230517181945.3725-1-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 If Opcode support is available (which is the standard for all platforms going forward) then there is no need to have the encoding and kbdlang attributes visible Signed-off-by: Mark Pearson --- drivers/platform/x86/think-lmi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 2d95b1a199fa..46500707f939 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -879,6 +879,12 @@ static umode_t auth_attr_is_visible(struct kobject *kobj, return 0; } + /* Don't display un-needed settings if opcode available */ + if ((attr == &auth_encoding.attr || + attr == &auth_kbdlang.attr) && + tlmi_priv.opcode_support) + return 0; + return attr->mode; } -- 2.40.1