From patchwork Thu Jun 1 20:05:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Pearson X-Patchwork-Id: 102172 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp587761vqr; Thu, 1 Jun 2023 13:13:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5r1MX0JgS0FBvTpRMDK5tkBxg5aZ1r806MKHSCJoltO2e3y9nGtp1vUJPv0/8Sn6k2g0Yf X-Received: by 2002:a05:6a20:729e:b0:10e:f800:2d75 with SMTP id o30-20020a056a20729e00b0010ef8002d75mr8772455pzk.43.1685650437919; Thu, 01 Jun 2023 13:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685650437; cv=none; d=google.com; s=arc-20160816; b=VTG/hrE6Hq4zmQYA88pDE7exiD0Sijz24EcCD+LbYIDW6xKbYhrJlugFzh6nMdrOVo L0T/V9moPiLPlruWe+0ZVvqyG+0fAFEy8G6ynuDGfFo1HDk/uoFip431Dp6TtGSzHvzn VBFDMW0LBI7BH2OCc+zlE5dqYU6aPf/jITfxG2rEWhl+shpgEk9lnJolPtO/5o3dt+gu nyy8Vk4KG1Dfnxhwr7gFgqoZ887IfC+hmJ9HlJwC0PX8jO8nmyoujV3zVNjO3fbVt7uE 2vuHkh8FvWdZsUUj/VHzDpz/xZLabNWHroBscDoPZJeYZ/amC2VlmmJfj/QygPyoGAus pnxQ== 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=aQVnrUtWK2iD10mHCHPBgoH3zv4+A/ErwEDXziIOT4Y=; b=xLuO2bB90nMY3Lk/JcgxQZucD2HrWiPGu8D/SWsPDSbIuxYNF4lwz73z5jhdIT+/Gz c6+VXUhHulD3dZxBb8Am8dYsSw6kT/Wx0erZf7QdVgLDtMi1xCTzYqgAMAKv/JZr/upX Vz4cq6Ay1tc46EOjsYof3owaFfzQyCiQSHSGVN5U4Z94Nr0m/V4hDI9mQXQ9M7dCE/Kw EEfbE4LL1j5UHEUrClYVKDVOBJ5EjEXKsrft9guQQfXmmwTMKkuwaeJyRETrcjGLNo+u 0W4XVqnPbpVv+YkCsL/kQOCdwCOvtZE/snyjrvTtEEhL4xFhtwyD6oU/QNneTbViq6er 4VHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=A1QHzVjZ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=hqV+vs8P; 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 r1-20020aa79621000000b0063d33fc3e08si5981940pfg.79.2023.06.01.13.13.45; Thu, 01 Jun 2023 13:13:57 -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=A1QHzVjZ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=hqV+vs8P; 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 S231917AbjFAUGR (ORCPT + 99 others); Thu, 1 Jun 2023 16:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbjFAUGF (ORCPT ); Thu, 1 Jun 2023 16:06:05 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27C0A134; Thu, 1 Jun 2023 13:06:04 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 46F1A32002F9; Thu, 1 Jun 2023 16:06:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 01 Jun 2023 16:06:03 -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=1685649962; x= 1685736362; bh=aQVnrUtWK2iD10mHCHPBgoH3zv4+A/ErwEDXziIOT4Y=; b=A 1QHzVjZuTET09em988ya3g3r6xXQHIs6GQkU3VC3ZdUo2D2mV31RhrtJhn/SAbTP MeMDfcWDROzN6frZYU3DYZf51+lyuAw9JW+QbYUuhZNsY3dz35IowNpwkPkPBdZV jIuzu1GOQ7SvD6Z//aV2w8mWCVSIO4VcOgysZppZmsPEjSxOx0Iq529YIle+KyEC g50B5NtoNnihpUsbFIcKBAQbQiiFZl2Vp3Z/JCCTqyrQa2JNtFhjIZ3vIsW2DLH8 /orZYIia97KCj0mpLJ+gJEY4W13E7BOZqzuNsMWzQJJif3cIoa+c40WbWWzrlD46 i7xOfgNmbIjKSVy13dqUA== 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=1685649962; x= 1685736362; bh=aQVnrUtWK2iD10mHCHPBgoH3zv4+A/ErwEDXziIOT4Y=; b=h qV+vs8PG36jy6iwxv7JFh7TKtwTbGMjlCDXhQR1DHbZIGuCiRUX7KQ/AcOT6SV8y We4mx1jPHGg43a2eEGPm0C8rJfjTWeVd1CNDeagBRN97ri+J4PNiWFGhG3JoKjZU AvWbyHC4g+TkByRS40Went7Z7VBc+od4T86O580i2fX7/51J3uZws0asLO4UYm90 wDC84Xj5ShEmMK5w899NhWFptzwujZFCx2fazw1dJYmfdZuCvV5QpBm+hoTHWmK1 aE0vo6f5KrHzWE08e6B4u9cvRMNnb2iDf+GyAUieYal5UG82hPvbBYwkjhwtYRSY KE+5yhGxsRy2NzEEMULSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeluddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jun 2023 16:06:02 -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, ilpo.jarvinen@linux.intel.com Subject: [PATCH v4 5/8] platform/x86: think-lmi: Update password fields to use BIT Date: Thu, 1 Jun 2023 16:05:49 -0400 Message-Id: <20230601200552.4396-5-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601200552.4396-1-mpearson-lenovo@squebb.ca> References: <20230601200552.4396-1-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767532593635128954?= X-GMAIL-MSGID: =?utf-8?q?1767532593635128954?= Code clean up to use BIT macro as suggested. Signed-off-by: Mark Pearson --- Changes in v4: - New patch split out from previous patch #2. drivers/platform/x86/think-lmi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 564e3fc33cfb..e3be99b44ce0 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -169,11 +169,11 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); */ #define LENOVO_CERT_THUMBPRINT_GUID "C59119ED-1C0D-4806-A8E9-59AA318176C4" -#define TLMI_POP_PWD (1 << 0) /* Supervisor */ -#define TLMI_PAP_PWD (1 << 1) /* Power-on */ -#define TLMI_HDD_PWD (1 << 2) /* HDD/NVME */ -#define TLMI_SMP_PWD (1 << 6) /* System Management */ -#define TLMI_CERT (1 << 7) /* Certificate Based */ +#define TLMI_POP_PWD BIT(0) /* Supervisor */ +#define TLMI_PAP_PWD BIT(1) /* Power-on */ +#define TLMI_HDD_PWD BIT(2) /* HDD/NVME */ +#define TLMI_SMP_PWD BIT(6) /* System Management */ +#define TLMI_CERT BIT(7) /* Certificate Based */ #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) #define to_tlmi_attr_setting(kobj) container_of(kobj, struct tlmi_attr_setting, kobj)