[v4,8/8] platform/x86: think-lmi: Don't display unnecessary authentication settings
Message ID | 20230601200552.4396-8-mpearson-lenovo@squebb.ca |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp586614vqr; Thu, 1 Jun 2023 13:11:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6gyHT6YKYpQ3D0JkD5ivUAvM1hj+DWVBa694BgNbwk9p+rp4RYBo2X8otGO4gHwCaAd7Yg X-Received: by 2002:a17:90a:1d46:b0:256:bc96:45ad with SMTP id u6-20020a17090a1d4600b00256bc9645admr310867pju.40.1685650304886; Thu, 01 Jun 2023 13:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685650304; cv=none; d=google.com; s=arc-20160816; b=N+SgD8zXgE6o3FqkRWrm2hnM4e8s0luSdnxeuPbhN1h4Zinwb3nxShgguwFX6mZTQP pUZkIAvSzg9eLtyTbu4qZW2SPvV2YPHebPgNlINiV3w0pJL/+JC1Y1CZR+ESD5VOEmlD WKzwi/Z1V/eVoRiT+J9xNHhD0P+nZEIyQyBDXcJ//BQQTbJG5yS2vT4H+1yW5ILlULD0 perHOWyiOVKdwCTysXJEIE+T3wUR8h+n0A9SE3H1Zz3Pq9prqZHZVA4u//hCeWIsHduG zZ3UXQY7ioEzGgG5zshwAgMNt6venlSnO7Vm18mdA1rYWxkNmZTGu5NekB9HMiilIgFq 4QZw== 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=o+3ik6sPv/8JEzwolLx/y3xpaXAaNLnim4nqn40eZqA=; b=evz3YHTDRg/rSec8zypz+9ALUDXzDIk8b5YMmlA9bk862duj8q+R6g/3Xvylz6W4eJ hu80iXHSYpOj/b4w0YpD+aPLviDOI4lOg5j1+QaATqA9WvOIqX6vq8M/28KSMy2cGTAW ZUgcgCDMFraBQIaxofv8BNt4/P6iOtgs3Jbwom5POFQhPITII61CnqylEnT7P1hYh5oL k/4RQuP4hBIhXR3bdL1fDxl0efxUwBE+jg9zp6XYIU4qGZaWuOs1Gewd6t6uXU02q6Kw isygpJp2kLZP6ezmK5gRcprZZ8xAvj5ZFHcBavEL5aeN9mdufkAwNeaG+ZAn9qlqAT9w //2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=as5b4FEN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=pIDHkdtb; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p22-20020a17090b011600b002563e365aeasi1631468pjz.53.2023.06.01.13.11.33; Thu, 01 Jun 2023 13:11:44 -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=as5b4FEN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=pIDHkdtb; 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 S231724AbjFAUGb (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 16:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231669AbjFAUGR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 16:06:17 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 049361A4; Thu, 1 Jun 2023 13:06:09 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 28A5A32003CE; Thu, 1 Jun 2023 16:06:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 01 Jun 2023 16:06:08 -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=1685649967; x= 1685736367; bh=o+3ik6sPv/8JEzwolLx/y3xpaXAaNLnim4nqn40eZqA=; b=a s5b4FENdBlIJPyV69bgZMeNamdRI+ULrDkC6tZj9i0kswy/gG2OKlbJMHX6YT+SV Umx7PM++fNj/74SEHbHhvJNFjnYRwdLyT06O3IUOLA1XCjqjyQ6AZstPv7t1zFY3 RdQ0KfW3yMH/3vcUPB1bBCOPOaiJ496vjInvx5b/pxR+yxf8MCq+uxHkdY6O1Spy QwdUQytjgjwm03xVEGvaJNNUb+LPL4NEXyoqavSGoQjULu371MYrsH0+WWrVgt6w fkoxGw2WTAeTa9cxPd6UoHAS00J8Nc2Re9b3OBs7jn4hx9kkCVKuUDjWSNJPSmAx hpd1/CjnPo7jOxWMxjRFg== 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=1685649967; x= 1685736367; bh=o+3ik6sPv/8JEzwolLx/y3xpaXAaNLnim4nqn40eZqA=; b=p IDHkdtbEH3euih4Dchnq0FAnUTsq2/5I09VaSTZ7c2TEed4gMy8rq6bcVVFfPTqL oE4ntgKrAQ3gaLgIvTbqisueyUSeY3fsFVIL5/p+ZD+ffpAy2BC5bXqQLX0JJiIZ ppJMf3HGBA2d6PrtqAYl4hsUvGOAw/Bsgvlhf2qyKV5diUmZBogxT2u7RjWvCalG 4qy0y+tmm+b9srBGG35i4jjrlNeNQt0gAeYGPTolOit0IP8Ylq/vrucAe5NuZgIb eHLB9gCDWIdFG52Qy0vbAxjFrBs6djIFahYePyhbvPGAab3gxfpQhMluZNXg3kYC PscbR+nCFvHr/mC4MkSVw== X-ME-Sender: <xms:L_p4ZD2ivhL0Mp-GDz9pT4QLxIvN-3J2oRCFVDnHCHl6RTHUsQBwUQ> <xme:L_p4ZCH-H_-29VhowhpbEuwkWXzL6Q4luzG69JLMlYi9ETakM5LMSrgd270mhIiH- b-NFnjrJCeRRSc5gL4> X-ME-Received: <xmr:L_p4ZD4yvTo_-3MQYirgDHfpY4sbPCOT_N9DJyEr7noR_uIcgHRYNtNq2PZzw63CwRdlKd6VDHqwo2yOTtv6J9o5F1mmLpH02vlTLFIhc6Mpxx0d86avNobw6A> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeluddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: <xmx:L_p4ZI2EvVdLLWtHO_Neu6yud332iK2BW4TIoXTr6yqrEtmiB8yOdA> <xmx:L_p4ZGHiB1Wu-bL6iCQWe35C4UWn7WGyjf0uxfjPeD_al2x2mfCz9A> <xmx:L_p4ZJ8lEZrteTORX84w2Kp4EUK_d7MNKTxc9cWQ2DkuUIdlSZBhEw> <xmx:L_p4ZChtm1x2XSVnv4EFTF60DEWkUnYKJrduV9J0_JusKKun7mqS6Q> Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jun 2023 16:06:07 -0400 (EDT) From: Mark Pearson <mpearson-lenovo@squebb.ca> To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com Subject: [PATCH v4 8/8] platform/x86: think-lmi: Don't display unnecessary authentication settings Date: Thu, 1 Jun 2023 16:05:52 -0400 Message-Id: <20230601200552.4396-8-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601200552.4396-1-mpearson-lenovo@squebb.ca> References: <mpearson-lenovo@squebb.ca> <20230601200552.4396-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,SPF_HELO_PASS, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766167512884632470?= X-GMAIL-MSGID: =?utf-8?q?1767532454216630121?= |
Series |
[v4,1/8] platform/x86: think-lmi: mutex protection around multiple WMI calls
|
|
Commit Message
Mark Pearson
June 1, 2023, 8:05 p.m. UTC
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 <mpearson-lenovo@squebb.ca>
---
Changes in v2 & v3:
- None. Version bumped in series.
Changes in v4:
- Fixed code alignment as requested.
- This patch was previously #4 and is now #8 in series.
drivers/platform/x86/think-lmi.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Thu, 1 Jun 2023, Mark Pearson wrote: > 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 <mpearson-lenovo@squebb.ca> Thanks a lot, the patches look good now. One small thing for future: next time, try to arrange a series such that the patches with Fixes tags are the first patches, in here I think it's not a big deal since 2/8 doesn't seem to conflict with 3/8. For all patches 1-8: Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
On Fri, Jun 2, 2023, at 7:12 AM, Ilpo Järvinen wrote: > On Thu, 1 Jun 2023, Mark Pearson wrote: > >> 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 <mpearson-lenovo@squebb.ca> > > Thanks a lot, the patches look good now. One small thing for future: next > time, try to arrange a series such that the patches with Fixes tags are > the first patches, in here I think it's not a big deal since 2/8 doesn't > seem to conflict with 3/8. > Ah - OK, thanks for the note, I didn't know that. > For all patches 1-8: > > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> > Many thanks Mark
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 2aaaee879488..52d1ce8dfe44 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -885,6 +885,11 @@ 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; }