Message ID | 20230530164116.20770-1-LinoSanfilippo@gmx.de |
---|---|
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 k13csp2323761vqr; Tue, 30 May 2023 09:58:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5K6Ugfi0zx+PH2v2pl43L07aO3oYyM/K1wVuz8VNJWtbmcVIbyhBEPvDeS1OxC5hXZ8N1D X-Received: by 2002:a17:90b:1d8e:b0:256:a705:afdd with SMTP id pf14-20020a17090b1d8e00b00256a705afddmr3078368pjb.44.1685465898831; Tue, 30 May 2023 09:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685465898; cv=none; d=google.com; s=arc-20160816; b=MW5tbjxZjUPNQuf++RmYdNpuQ0QT4P2lg6pADNM9BgxFEhbLJ1miCYN9jLuWU6ZZDV GDO0iYJ4W89hUAhI969csJ62gCy0m3SHPPj8XCAns0h4owcURTdDwlxVUz+peqUygfmF z3zdM5PTPpFr8RnW/2cdWR9Quz7pDOXct93GRp9itZEMc5q13eTLJnTwnu6JvnnNhlAB PYG3vssX+JWYNrNN8Q2OwB57uPUOmIn8J1GEvjkYuRAyJVQwrjkQEf8L2qxaVIDK58Ca 1nI3sxqqEKR9DNXiFbxCZJQUstBOwG5xGjgO0i5qA/FBpH+GJkPTi0jsxy58c+/q9Hgn 8vqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=u1Qi/uyeai+mxP4oIO4LBNtj6oBBjuv+rvd8DOos6DA=; b=WEwyCK9lnrTtYAdGrCqS06kBubRhnlqz+anAyEB9l0TAQd2bNE5I12iRaP+pXI+7uM VNtgu/1298hwf8fBlmRPlvlbKwpn+bQGO13xeXmTHvVvklGl8ITGwBKjKWFbOYwzDwK9 5rDGdPOrEeJ1EvLDA9eGqEE00RDwlRj96U8T+DfRPK6k/x3ZUHnYH5eXj0lWU6sZ5q8/ W9lLEb7Nz8kUlpVv6N4rlYBx0rUDA914uuuKxlHKlDndDILSvZ926Ry4YW1TLvSM2v5A bBa6fHFPMIm5de3oIYuNjS/KT4KFZuRWGg7df4glroAYmDoDot2GXS/tSvV4oBUli7gy 8CHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=HmYDWFS+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a17090a660500b00255b7adb2d8si8479405pjj.90.2023.05.30.09.58.05; Tue, 30 May 2023 09:58:18 -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=@gmx.de header.s=s31663417 header.b=HmYDWFS+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232841AbjE3QnL (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Tue, 30 May 2023 12:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232746AbjE3QnE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 30 May 2023 12:43:04 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27744B0; Tue, 30 May 2023 09:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1685464952; i=linosanfilippo@gmx.de; bh=u1Qi/uyeai+mxP4oIO4LBNtj6oBBjuv+rvd8DOos6DA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=HmYDWFS+CGdZg70bqpCf3Dic5L4jdOeIbQtheZlf2nloF21QvWfy3R0GzAwH6M0Se YmPIQZIFHweJaadvK30RDb1frF1IBuu8XhGrhVR5W4gH7NWNuksDpuUA9LUofU5Ts1 IURs2C8PkKITbLoW9Vxc/+UKDdKQEe3P7FQ/6o08iCRWHZFc6mFvpagoRA47vB1rGi 9XpMIiAcaCirUTUxHsorwtucWfC/BZoui+sHcfBOMSFoCwfdH2fW6tpwIJEBiryCVB M5b26FUoUM8PO0N4tmQjnEq5CXMP547iIoeMgy81seS36EEjyNhhQP9v1SH/IPq2D/ s4+QixkHMHsDg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from Venus.speedport.ip ([84.162.2.106]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtOKi-1qMOan3hwk-00uqW5; Tue, 30 May 2023 18:42:32 +0200 From: Lino Sanfilippo <LinoSanfilippo@gmx.de> To: jarkko@kernel.org, gregkh@linuxfoundation.org, pavel@denx.de Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org, patches@kernelci.org, lkft-triage@lists.linaro.org, jonathanh@nvidia.com, f.fainelli@gmail.com, sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de, linux-integrity@vger.kernel.org, l.sanfilippo@kunbus.com, lukas@wunner.de, p.rosenberger@kunbus.com, stable@vger.kernel.org Subject: [PATCH] tpm, tpm_tis: correct tpm_tis_flags enumeration values Date: Tue, 30 May 2023 18:41:16 +0200 Message-Id: <20230530164116.20770-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:TUVoDoK2i79i8sGtpHBNTotsLMum/R0RJEoMsqgZp0r24XisBnL Ff93M1mjHQlxFQsP1RfB5Kv9C260ahJhyrDBi6qcnUq+JWpM40a4WR9u6+Og8dxZVOrLG2Y Wfgy2Bl7jcFaSAk74Ns0UUmBpLCQRhijzMQyGCxpJ7zZKaLeFALX1qLoezM1JTstx9vNjnx Z72OQUfUMCdTI/+Hyq6cA== UI-OutboundReport: notjunk:1;M01:P0:6GuG2S5CW2M=;hPugnMpdH8eeolGEee7DcQ92SGP HPxbNtb/5cmh+ZkisVbeA2rI9JrTZal7+tL4CCeFwKzB2INMLwYfLwin8mw4DHiMLT8xyZ83Q RvldsgU15PEy++idb8Ai3ESxTPQBOO2XTmskknWJz2INdz5H2ZXFhN81MhOj08r87kcY+Ebu4 khWHpGmtw2+hCJAGi567yGwzGaUMEF1uF3TYocbUUZHrV+AChiLW76FCxvo8SsbIV4K0QR/5P skyVGihoRm2C1GsnLmFS4ro7eTVY6byNq1oeFE9EA0FL/8VToLdPbocAb9CT5hytM9IPeAt0o rOS+UFjTfvaZgjdYJ3uwuSw1KVzabCe1htXaorhj2WxSjSUXkixxZ2saeulMXjM4mU1wqButF /twZuoR6c93xC+RC9uwm88sOMOryy4cdU5noh4fGiILrSJc5/pxQQ2KWTFoMgT+y6gwOGSXaJ lypUOhGpIKdyBk7ciyhzOXVe0FB/HXsrynd3Dm/TIa+JSkz51fLIDaC3zuu6aQ4s//mDS8jvt +fTrwTQ3edOl39FzzoSKmWhDHBUIVNrG/vnSicc5UebUNWD9na1LGojjQd0k93lccT1oMHprJ yJFC0YhjIsAD31BUYUEw+iyKmr0aqOpPiqFGMf9WqIvOsabtSOv4XeJMn60DLJSx8Tjfob4Ke Pl1JN7GFezJ0gM11WnCn+CwZNBWdi5ofuhx6pKoWnDOa9B8VNN+H26ZwkOefs7LXDphlJ8sFw 6mdkKt9ODCgt3HRiCy2CWXSVCu7RTeqJAaeg7Z3hiVOFEtrM8IT+/djomWWiPESktzWHz48KK 3K267BwRWA7unQQUanCJW/O2rUjM+7mh5zu95IStXxzP0UV/JI5r5vRcfKaWaPEaUkkm7o83I lKXj/cF45tVQgUmor9mr5wLdknn10o34RqWlooKBrOH25Qxu5LB/y4ovUjF5/ySkh7KRuCpup iKzqYg== X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MIME_BASE64_TEXT, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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: <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?1767339090392877412?= X-GMAIL-MSGID: =?utf-8?q?1767339090392877412?= |
Series |
tpm, tpm_tis: correct tpm_tis_flags enumeration values
|
|
Commit Message
Lino Sanfilippo
May 30, 2023, 4:41 p.m. UTC
From: Lino Sanfilippo <l.sanfilippo@kunbus.com> With commit 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") bit accessor functions are used to access flags in tpm_tis_data->flags. However these functions expect bit numbers, while the flags are defined as bit masks in enum tpm_tis_flag. Fix this inconsistency by using numbers instead of masks also for the flags in the enum. Reported-by: Pavel Machek <pavel@denx.de> Fixes: 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Cc: stable@vger.kernel.org --- drivers/char/tpm/tpm_tis_core.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) base-commit: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
Comments
Hi! > From: Lino Sanfilippo <l.sanfilippo@kunbus.com> > > With commit 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test > for interrupts") bit accessor functions are used to access flags in > tpm_tis_data->flags. > > However these functions expect bit numbers, while the flags are defined as > bit masks in enum tpm_tis_flag. > > Fix this inconsistency by using numbers instead of masks also for the flags > in the enum. > Reviewed-by: Pavel Machek <pavel@denx.de> Thank you! Best regards, Pavel
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h index e978f457fd4d..610bfadb6acf 100644 --- a/drivers/char/tpm/tpm_tis_core.h +++ b/drivers/char/tpm/tpm_tis_core.h @@ -84,10 +84,10 @@ enum tis_defaults { #define ILB_REMAP_SIZE 0x100 enum tpm_tis_flags { - TPM_TIS_ITPM_WORKAROUND = BIT(0), - TPM_TIS_INVALID_STATUS = BIT(1), - TPM_TIS_DEFAULT_CANCELLATION = BIT(2), - TPM_TIS_IRQ_TESTED = BIT(3), + TPM_TIS_ITPM_WORKAROUND = 0, + TPM_TIS_INVALID_STATUS = 1, + TPM_TIS_DEFAULT_CANCELLATION = 2, + TPM_TIS_IRQ_TESTED = 3, }; struct tpm_tis_data {