]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
s390/facilites: use stfle_fac_list array size for MAX_FACILITY_BIT
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 20 Mar 2017 13:29:50 +0000 (14:29 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 22 Mar 2017 07:29:17 +0000 (08:29 +0100)
Use the actual size of the facility list array within the lowcore
structure for the MAX_FACILITY_BIT define instead of a comment which
states what this is good for. This makes it a bit harder to break
things.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/facility.h

index 09b406db7529a34b62671b659c44ed895e7b9d19..aead78b5da7efd565f971ec98cec67b6d19978bc 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/preempt.h>
 #include <asm/lowcore.h>
 
-#define MAX_FACILITY_BIT (256*8)       /* stfle_fac_list has 256 bytes */
+#define MAX_FACILITY_BIT (sizeof(((struct lowcore *)0)->stfle_fac_list) * 8)
 
 static inline int __test_facility(unsigned long nr, void *facilities)
 {