Patchwork Staging: ccree: Prefer using BIT macro.

login
register
mail settings
Submitter srishti
Date Sept. 7, 2017, 1:47 p.m.
Message ID <1504792029-8050-1-git-send-email-srishtishar@gmail.com>
Download mbox | patch
Permalink /patch/9942307/
State Not Applicable
Delegated to: Herbert Xu
Headers show

Comments

srishti - Sept. 7, 2017, 1:47 p.m.
Use BIT(x) instead of (1<<x), reported by checkpatch.pl.

Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
---
 drivers/staging/ccree/ssi_cipher.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--
2.7.4
gregkh@linuxfoundation.org - Sept. 7, 2017, 1:53 p.m.
On Thu, Sep 07, 2017 at 07:17:09PM +0530, Srishti Sharma wrote:
> Use BIT(x) instead of (1<<x), reported by checkpatch.pl.
> 
> Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
> ---
>  drivers/staging/ccree/ssi_cipher.h | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/ccree/ssi_cipher.h b/drivers/staging/ccree/ssi_cipher.h
> index 296b375..6fbcf9d 100644
> --- a/drivers/staging/ccree/ssi_cipher.h
> +++ b/drivers/staging/ccree/ssi_cipher.h
> @@ -27,11 +27,11 @@
>  #include "ssi_buffer_mgr.h"
> 
>  /* Crypto cipher flags */
> -#define CC_CRYPTO_CIPHER_KEY_KFDE0    (1 << 0)
> -#define CC_CRYPTO_CIPHER_KEY_KFDE1    (1 << 1)
> -#define CC_CRYPTO_CIPHER_KEY_KFDE2    (1 << 2)
> -#define CC_CRYPTO_CIPHER_KEY_KFDE3    (1 << 3)
> -#define CC_CRYPTO_CIPHER_DU_SIZE_512B (1 << 4)
> +#define CC_CRYPTO_CIPHER_KEY_KFDE0    BIT(0)
> +#define CC_CRYPTO_CIPHER_KEY_KFDE1    BIT(1)
> +#define CC_CRYPTO_CIPHER_KEY_KFDE2    BIT(2)
> +#define CC_CRYPTO_CIPHER_KEY_KFDE3    BIT(3)
> +#define CC_CRYPTO_CIPHER_DU_SIZE_512B BIT(4)

Care to use a <TAB> here as well?  I know the original didn't, but the
cleaned up code should.

thanks,

greg k-h

Patch

diff --git a/drivers/staging/ccree/ssi_cipher.h b/drivers/staging/ccree/ssi_cipher.h
index 296b375..6fbcf9d 100644
--- a/drivers/staging/ccree/ssi_cipher.h
+++ b/drivers/staging/ccree/ssi_cipher.h
@@ -27,11 +27,11 @@ 
 #include "ssi_buffer_mgr.h"

 /* Crypto cipher flags */
-#define CC_CRYPTO_CIPHER_KEY_KFDE0    (1 << 0)
-#define CC_CRYPTO_CIPHER_KEY_KFDE1    (1 << 1)
-#define CC_CRYPTO_CIPHER_KEY_KFDE2    (1 << 2)
-#define CC_CRYPTO_CIPHER_KEY_KFDE3    (1 << 3)
-#define CC_CRYPTO_CIPHER_DU_SIZE_512B (1 << 4)
+#define CC_CRYPTO_CIPHER_KEY_KFDE0    BIT(0)
+#define CC_CRYPTO_CIPHER_KEY_KFDE1    BIT(1)
+#define CC_CRYPTO_CIPHER_KEY_KFDE2    BIT(2)
+#define CC_CRYPTO_CIPHER_KEY_KFDE3    BIT(3)
+#define CC_CRYPTO_CIPHER_DU_SIZE_512B BIT(4)

 #define CC_CRYPTO_CIPHER_KEY_KFDE_MASK (CC_CRYPTO_CIPHER_KEY_KFDE0 | CC_CRYPTO_CIPHER_KEY_KFDE1 | CC_CRYPTO_CIPHER_KEY_KFDE2 | CC_CRYPTO_CIPHER_KEY_KFDE3)