[PATCH 4/7] crypto: caam - make command constants unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CMD_OPERATION is 0x10 << 27, which shifts a one into the sign bit.
Make the constants unsigned to fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/crypto/caam/desc.h | 40 +++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/crypto/caam/desc.h b/drivers/crypto/caam/desc.h
index a7966a878178..523f2d15f0bd 100644
--- a/drivers/crypto/caam/desc.h
+++ b/drivers/crypto/caam/desc.h
@@ -36,26 +36,26 @@
 #define CMD_SHIFT		27
 #define CMD_MASK		0xf8000000
 
-#define CMD_KEY			(0x00 << CMD_SHIFT)
-#define CMD_SEQ_KEY		(0x01 << CMD_SHIFT)
-#define CMD_LOAD		(0x02 << CMD_SHIFT)
-#define CMD_SEQ_LOAD		(0x03 << CMD_SHIFT)
-#define CMD_FIFO_LOAD		(0x04 << CMD_SHIFT)
-#define CMD_SEQ_FIFO_LOAD	(0x05 << CMD_SHIFT)
-#define CMD_STORE		(0x0a << CMD_SHIFT)
-#define CMD_SEQ_STORE		(0x0b << CMD_SHIFT)
-#define CMD_FIFO_STORE		(0x0c << CMD_SHIFT)
-#define CMD_SEQ_FIFO_STORE	(0x0d << CMD_SHIFT)
-#define CMD_MOVE_LEN		(0x0e << CMD_SHIFT)
-#define CMD_MOVE		(0x0f << CMD_SHIFT)
-#define CMD_OPERATION		(0x10 << CMD_SHIFT)
-#define CMD_SIGNATURE		(0x12 << CMD_SHIFT)
-#define CMD_JUMP		(0x14 << CMD_SHIFT)
-#define CMD_MATH		(0x15 << CMD_SHIFT)
-#define CMD_DESC_HDR		(0x16 << CMD_SHIFT)
-#define CMD_SHARED_DESC_HDR	(0x17 << CMD_SHIFT)
-#define CMD_SEQ_IN_PTR		(0x1e << CMD_SHIFT)
-#define CMD_SEQ_OUT_PTR		(0x1f << CMD_SHIFT)
+#define CMD_KEY			(0x00u << CMD_SHIFT)
+#define CMD_SEQ_KEY		(0x01u << CMD_SHIFT)
+#define CMD_LOAD		(0x02u << CMD_SHIFT)
+#define CMD_SEQ_LOAD		(0x03u << CMD_SHIFT)
+#define CMD_FIFO_LOAD		(0x04u << CMD_SHIFT)
+#define CMD_SEQ_FIFO_LOAD	(0x05u << CMD_SHIFT)
+#define CMD_STORE		(0x0au << CMD_SHIFT)
+#define CMD_SEQ_STORE		(0x0bu << CMD_SHIFT)
+#define CMD_FIFO_STORE		(0x0cu << CMD_SHIFT)
+#define CMD_SEQ_FIFO_STORE	(0x0du << CMD_SHIFT)
+#define CMD_MOVE_LEN		(0x0eu << CMD_SHIFT)
+#define CMD_MOVE		(0x0fu << CMD_SHIFT)
+#define CMD_OPERATION		(0x10u << CMD_SHIFT)
+#define CMD_SIGNATURE		(0x12u << CMD_SHIFT)
+#define CMD_JUMP		(0x14u << CMD_SHIFT)
+#define CMD_MATH		(0x15u << CMD_SHIFT)
+#define CMD_DESC_HDR		(0x16u << CMD_SHIFT)
+#define CMD_SHARED_DESC_HDR	(0x17u << CMD_SHIFT)
+#define CMD_SEQ_IN_PTR		(0x1eu << CMD_SHIFT)
+#define CMD_SEQ_OUT_PTR		(0x1fu << CMD_SHIFT)
 
 /* General-purpose class selector for all commands */
 #define CLASS_SHIFT		25
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux