summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/irq.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-03-06 13:11:05 +0300
committerVasily Gorbik <gor@linux.ibm.com>2022-03-08 02:33:01 +0300
commit7d8484c4151d94f3c1d257e65e0c1a2ec3c945e7 (patch)
treed84a7e17a85a1cff350d8970011644a48f51de3a /arch/s390/include/asm/irq.h
parent998e78004fe4dd9219b039efe763e19d10d9a6f9 (diff)
downloadlinux-7d8484c4151d94f3c1d257e65e0c1a2ec3c945e7.tar.xz
s390/irq: use assignment instead of cast
Change struct ext_code to contain a union which allows to simply assign the int_code instead of using a cast. In order to keep the patch small the anonymous union is embedded within the existing struct instead of changing the struct ext_code to a union. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/irq.h')
-rw-r--r--arch/s390/include/asm/irq.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/s390/include/asm/irq.h b/arch/s390/include/asm/irq.h
index 9f75d67b8c20..89902f754740 100644
--- a/arch/s390/include/asm/irq.h
+++ b/arch/s390/include/asm/irq.h
@@ -81,8 +81,13 @@ static __always_inline void inc_irq_stat(enum interruption_class irq)
}
struct ext_code {
- unsigned short subcode;
- unsigned short code;
+ union {
+ struct {
+ unsigned short subcode;
+ unsigned short code;
+ };
+ unsigned int int_code;
+ };
};
typedef void (*ext_int_handler_t)(struct ext_code, unsigned int, unsigned long);