2017-09-21 06:44:42

by Janani Sankara Babu

[permalink] [raw]
Subject: [PATCH] staging:ccree Fix use BIT macro

This patch is created to solve the following warning shown by the checkpatch
script Warning: Replace all occurences of (1<<x) by BIT(x)

Signed-off-by: Janani Sankara Babu <[email protected]>
---
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)

#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)

--
1.9.1


2017-09-24 07:20:31

by Gilad Ben-Yossef

[permalink] [raw]
Subject: Re: [PATCH] staging:ccree Fix use BIT macro

Hi Janani,

On Thu, Sep 21, 2017 at 9:39 AM, Janani Sankara Babu
<[email protected]> wrote:
> This patch is created to solve the following warning shown by the checkpatch
> script Warning: Replace all occurences of (1<<x) by BIT(x)
>
> Signed-off-by: Janani Sankara Babu <[email protected]>

Thank you for the patch - unfortunately, such a fix s already present
in the staging-next tree.

I suggest you base your patches to ccree on that tree as it is the
most current for this driver.

Thanks again,
Gilad


--
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
-- Jean-Baptiste Queru