summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2017-03-20 14:29:50 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-03-22 08:29:17 +0100
commit6f5165e864d240d15675cc2fb5a369d57e1f60d0 (patch)
tree8986322ab75de8ca14ea1d3f8363447e0df15a0e /arch/s390
parentcdd3bd9d618d7a4a3920a193e20ca40736b878e9 (diff)
s390/facilites: use stfle_fac_list array size for MAX_FACILITY_BIT
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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/facility.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/facility.h b/arch/s390/include/asm/facility.h
index 09b406db7529..aead78b5da7e 100644
--- a/arch/s390/include/asm/facility.h
+++ b/arch/s390/include/asm/facility.h
@@ -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)
{