]> git.sur5r.net Git - u-boot/commitdiff
tpm: use the BIT() macro where applicable
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 15 May 2018 09:57:01 +0000 (11:57 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 25 May 2018 12:12:40 +0000 (08:12 -0400)
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>
include/tpm.h

index de084a517f311119762a145ca1d53fd0745082b2..a89d6899378107f7cb533f8b717256e545e019d3 100644 (file)
@@ -82,13 +82,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,