summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/irq.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2021-05-05 22:01:11 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-06-07 17:06:58 +0200
commit6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8 (patch)
treea4f9b24e3f7f82d7241fcffa0991d5fd7b3221c8 /arch/s390/kernel/irq.c
parent17e89e1340a377b2f14a14d7050f609328592793 (diff)
downloadlinux-stable-6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8.tar.gz
linux-stable-6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8.tar.bz2
linux-stable-6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8.zip
s390/irq: add union/struct to access external interrupt parameters
gcc-11 warns: arch/s390/kernel/irq.c: In function do_ext_irq: arch/s390/kernel/irq.c:175:9: warning: memcpy reading 4 bytes from a region of size 0 [-Wstringop-overread] 175 | memcpy(&regs->int_code, &S390_lowcore.ext_cpu_addr, 4); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by adding a struct for int_code to struct lowcore. Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/irq.c')
-rw-r--r--arch/s390/kernel/irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 714269e10eec..169258012530 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -172,7 +172,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
if (user_mode(regs))
update_timer_sys();
- memcpy(&regs->int_code, &S390_lowcore.ext_cpu_addr, 4);
+ regs->int_code = S390_lowcore.ext_int_code_addr;
regs->int_parm = S390_lowcore.ext_params;
regs->int_parm_long = S390_lowcore.ext_params2;