From: Heiko Carstens Date: Mon, 20 Mar 2017 13:29:50 +0000 (+0100) Subject: s390/facilites: use stfle_fac_list array size for MAX_FACILITY_BIT X-Git-Tag: v4.14-rc1~1035^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f5165e864d240d15675cc2fb5a369d57e1f60d0;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/include/asm/facility.h b/arch/s390/include/asm/facility.h index 09b406d..aead78b 100644 --- a/arch/s390/include/asm/facility.h +++ b/arch/s390/include/asm/facility.h @@ -15,7 +15,7 @@ #include #include -#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) {