Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7352c546 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

s390/cio: sanitize css_general_characteristics definition



Change css_general_characteristics such that the bitfields don't
straddle storage-unit boundaries of the base types.

This does not change the offsets of the structs members but now
we do as documented and also fix the following sparse complaint:
drivers/s390/cio/chsc.c:926:56:
	warning: invalid access past the end of 'css_general_characteristics' (16 18)

Signed-off-by: default avatarSebastian Ott <sebott@linux.ibm.com>
Reviewed-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent d7927df8
Loading
Loading
Loading
Loading
+32 −30
Original line number Diff line number Diff line
@@ -6,36 +6,38 @@

struct css_general_char {
	u64 : 12;
	u32 dynio : 1;	 /* bit 12 */
	u32 : 4;
	u32 eadm : 1;	 /* bit 17 */
	u32 : 23;
	u32 aif : 1;	 /* bit 41 */
	u32 : 3;
	u32 mcss : 1;	 /* bit 45 */
	u32 fcs : 1;	 /* bit 46 */
	u32 : 1;
	u32 ext_mb : 1;  /* bit 48 */
	u32 : 7;
	u32 aif_tdd : 1; /* bit 56 */
	u32 : 1;
	u32 qebsm : 1;	 /* bit 58 */
	u32 : 2;
	u32 aiv : 1;     /* bit 61 */
	u32 : 5;
	u32 aif_osa : 1; /* bit 67 */
	u32 : 12;
	u32 eadm_rf : 1; /* bit 80 */
	u32 : 1;
	u32 cib : 1;	 /* bit 82 */
	u32 : 5;
	u32 fcx : 1;	 /* bit 88 */
	u32 : 19;
	u32 alt_ssi : 1; /* bit 108 */
	u32 : 1;
	u32 narf : 1;	 /* bit 110 */
	u32 : 12;
	u32 util_str : 1;/* bit 123 */
	u64 dynio : 1;	 /* bit 12 */
	u64 : 4;
	u64 eadm : 1;	 /* bit 17 */
	u64 : 23;
	u64 aif : 1;	 /* bit 41 */
	u64 : 3;
	u64 mcss : 1;	 /* bit 45 */
	u64 fcs : 1;	 /* bit 46 */
	u64 : 1;
	u64 ext_mb : 1;  /* bit 48 */
	u64 : 7;
	u64 aif_tdd : 1; /* bit 56 */
	u64 : 1;
	u64 qebsm : 1;	 /* bit 58 */
	u64 : 2;
	u64 aiv : 1;	 /* bit 61 */
	u64 : 2;

	u64 : 3;
	u64 aif_osa : 1; /* bit 67 */
	u64 : 12;
	u64 eadm_rf : 1; /* bit 80 */
	u64 : 1;
	u64 cib : 1;	 /* bit 82 */
	u64 : 5;
	u64 fcx : 1;	 /* bit 88 */
	u64 : 19;
	u64 alt_ssi : 1; /* bit 108 */
	u64 : 1;
	u64 narf : 1;	 /* bit 110 */
	u64 : 12;
	u64 util_str : 1;/* bit 123 */
} __packed;

extern struct css_general_char css_general_characteristics;