--- /dev/null
+From 8678654e3c7ad7b0f4beb03fa89691279cba71f9 Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Thu, 13 Oct 2016 17:45:20 +0200
+Subject: kvm: x86: memset whole irq_eoi
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jiri Slaby <jslaby@suse.cz>
+
+commit 8678654e3c7ad7b0f4beb03fa89691279cba71f9 upstream.
+
+gcc 7 warns:
+arch/x86/kvm/ioapic.c: In function 'kvm_ioapic_reset':
+arch/x86/kvm/ioapic.c:597:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
+
+And it is right. Memset whole array using sizeof operator.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Cc: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Radim Krčmář <rkrcmar@redhat.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: x86@kernel.org
+Cc: kvm@vger.kernel.org
+Cc: linux-kernel@vger.kernel.org
+Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
+[Added x86 subject tag]
+Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ virt/kvm/ioapic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/virt/kvm/ioapic.c
++++ b/virt/kvm/ioapic.c
+@@ -610,7 +610,7 @@ static void kvm_ioapic_reset(struct kvm_
+ ioapic->ioregsel = 0;
+ ioapic->irr = 0;
+ ioapic->id = 0;
+- memset(ioapic->irq_eoi, 0x00, IOAPIC_NUM_PINS);
++ memset(ioapic->irq_eoi, 0x00, sizeof(ioapic->irq_eoi));
+ rtc_irq_eoi_tracking_reset(ioapic);
+ update_handled_vectors(ioapic);
+ }
--- /dev/null
+From d505ad1d66c9cd31db5ab0d2c7bcb2a47e5bb29e Mon Sep 17 00:00:00 2001
+From: Colin King <colin.king@canonical.com>
+Date: Wed, 14 Jan 2015 14:07:55 +0000
+Subject: x86/rtc: Remove duplicate const specifier
+
+From: Colin King <colin.king@canonical.com>
+
+commit d505ad1d66c9cd31db5ab0d2c7bcb2a47e5bb29e upstream.
+
+Building with clang:
+
+ CC arch/x86/kernel/rtc.o
+arch/x86/kernel/rtc.c:173:29: warning: duplicate 'const' declaration
+ specifier [-Wduplicate-decl-specifier]
+ static const char * const const ids[] __initconst =
+
+Remove the duplicate const, it is not needed and causes a warning.
+
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Link: http://lkml.kernel.org/r/1421244475-313-1-git-send-email-colin.king@canonical.com
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/rtc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/rtc.c
++++ b/arch/x86/kernel/rtc.c
+@@ -170,7 +170,7 @@ static struct platform_device rtc_device
+ static __init int add_rtc_cmos(void)
+ {
+ #ifdef CONFIG_PNP
+- static const char * const const ids[] __initconst =
++ static const char * const ids[] __initconst =
+ { "PNP0b00", "PNP0b01", "PNP0b02", };
+ struct pnp_dev *dev;
+ struct pnp_id *id;