Use BIT macro to generate SET_MEMORY bit masks, which is easier to
maintain if bits get added, or removed.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
 
 extern struct mutex cpa_mutex;
 
-#define SET_MEMORY_RO  1UL
-#define SET_MEMORY_RW  2UL
-#define SET_MEMORY_NX  4UL
-#define SET_MEMORY_X   8UL
-#define SET_MEMORY_4K  16UL
+enum {
+       _SET_MEMORY_RO_BIT,
+       _SET_MEMORY_RW_BIT,
+       _SET_MEMORY_NX_BIT,
+       _SET_MEMORY_X_BIT,
+       _SET_MEMORY_4K_BIT,
+};
+
+#define SET_MEMORY_RO  BIT(_SET_MEMORY_RO_BIT)
+#define SET_MEMORY_RW  BIT(_SET_MEMORY_RW_BIT)
+#define SET_MEMORY_NX  BIT(_SET_MEMORY_NX_BIT)
+#define SET_MEMORY_X   BIT(_SET_MEMORY_X_BIT)
+#define SET_MEMORY_4K  BIT(_SET_MEMORY_4K_BIT)
 
 int __set_memory(unsigned long addr, int numpages, unsigned long flags);