From: Greg Kroah-Hartman Date: Sat, 22 Jul 2017 10:48:38 +0000 (+0200) Subject: 3.18-stable patches X-Git-Tag: v3.18.63~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ed214ad7a3c3eb958ff42f0445497042999c32c;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: kvm-x86-memset-whole-irq_eoi.patch x86-rtc-remove-duplicate-const-specifier.patch --- diff --git a/queue-3.18/kvm-x86-memset-whole-irq_eoi.patch b/queue-3.18/kvm-x86-memset-whole-irq_eoi.patch new file mode 100644 index 00000000000..9e2c184553e --- /dev/null +++ b/queue-3.18/kvm-x86-memset-whole-irq_eoi.patch @@ -0,0 +1,47 @@ +From 8678654e3c7ad7b0f4beb03fa89691279cba71f9 Mon Sep 17 00:00:00 2001 +From: Jiri Slaby +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 + +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 +Cc: Paolo Bonzini +Cc: Radim Krčmář +Cc: Thomas Gleixner +Cc: Ingo Molnar +Cc: H. Peter Anvin +Cc: x86@kernel.org +Cc: kvm@vger.kernel.org +Cc: linux-kernel@vger.kernel.org +Reviewed-by: Paolo Bonzini +[Added x86 subject tag] +Signed-off-by: Radim Krčmář +Signed-off-by: Greg Kroah-Hartman + +--- + 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); + } diff --git a/queue-3.18/series b/queue-3.18/series index 736d57e1418..d4ae8ed5b84 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -1 +1,3 @@ disable-new-gcc-7.1.1-warnings-for-now.patch +kvm-x86-memset-whole-irq_eoi.patch +x86-rtc-remove-duplicate-const-specifier.patch diff --git a/queue-3.18/x86-rtc-remove-duplicate-const-specifier.patch b/queue-3.18/x86-rtc-remove-duplicate-const-specifier.patch new file mode 100644 index 00000000000..7a3af40a348 --- /dev/null +++ b/queue-3.18/x86-rtc-remove-duplicate-const-specifier.patch @@ -0,0 +1,38 @@ +From d505ad1d66c9cd31db5ab0d2c7bcb2a47e5bb29e Mon Sep 17 00:00:00 2001 +From: Colin King +Date: Wed, 14 Jan 2015 14:07:55 +0000 +Subject: x86/rtc: Remove duplicate const specifier + +From: Colin King + +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 +Link: http://lkml.kernel.org/r/1421244475-313-1-git-send-email-colin.king@canonical.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + 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;