diff mbox series

[U-Boot,v4,05/32] tpm: use the BIT() macro where applicable

Message ID 20180515095728.16572-6-miquel.raynal@bootlin.com
State Accepted
Commit fded837fd996880fd051e0ee0dbeee344cd084d2
Delegated to: Tom Rini
Headers show
Series Introduce TPMv2.0 support | expand

Commit Message

Miquel Raynal May 15, 2018, 9:57 a.m. UTC
Fix following checkpatch.pl issue in TPM-related code:

    CHECK: Prefer using the BIT macro

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 include/tpm.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Tom Rini May 15, 2018, 3:58 p.m. UTC | #1
On Tue, May 15, 2018 at 11:57:01AM +0200, Miquel Raynal wrote:

> Fix following checkpatch.pl issue in TPM-related code:
> 
>     CHECK: Prefer using the BIT macro
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass May 15, 2018, 4:03 p.m. UTC | #2
On 15 May 2018 at 19:57, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> Fix following checkpatch.pl issue in TPM-related code:
>
>     CHECK: Prefer using the BIT macro
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  include/tpm.h | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini May 26, 2018, 3:54 p.m. UTC | #3
On Tue, May 15, 2018 at 11:57:01AM +0200, Miquel Raynal wrote:

> Fix following checkpatch.pl issue in TPM-related code:
> 
>     CHECK: Prefer using the BIT macro
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/tpm.h b/include/tpm.h
index 62117f6cc2..241597d879 100644
--- a/include/tpm.h
+++ b/include/tpm.h
@@ -83,13 +83,13 @@  enum tpm_capability_areas {
 	TPM_CAP_VERSION_VAL	= 0x0000001A,
 };
 
-#define TPM_NV_PER_GLOBALLOCK		(1U << 15)
-#define TPM_NV_PER_PPREAD		(1U << 16)
-#define TPM_NV_PER_PPWRITE		(1U << 0)
-#define TPM_NV_PER_READ_STCLEAR		(1U << 31)
-#define TPM_NV_PER_WRITE_STCLEAR	(1U << 14)
-#define TPM_NV_PER_WRITEDEFINE		(1U << 13)
-#define TPM_NV_PER_WRITEALL		(1U << 12)
+#define TPM_NV_PER_GLOBALLOCK		BIT(15)
+#define TPM_NV_PER_PPREAD		BIT(16)
+#define TPM_NV_PER_PPWRITE		BIT(0)
+#define TPM_NV_PER_READ_STCLEAR		BIT(31)
+#define TPM_NV_PER_WRITE_STCLEAR	BIT(14)
+#define TPM_NV_PER_WRITEDEFINE		BIT(13)
+#define TPM_NV_PER_WRITEALL		BIT(12)
 
 enum {
 	TPM_PUBEK_SIZE			= 256,