[tip:efi/core] efi/libstub/tpm: Make function efi_retrieve_tpm2_eventlog_1_2() static
Commit-ID: 0add16c13f49bda5455d9418d479d6c89f7ab272 Gitweb: https://git.kernel.org/tip/0add16c13f49bda5455d9418d479d6c89f7ab272 Author: Wei Yongjun AuthorDate: Fri, 4 May 2018 07:59:57 +0200 Committer: Ingo Molnar CommitDate: Mon, 14 May 2018 08:57:48 +0200 efi/libstub/tpm: Make function efi_retrieve_tpm2_eventlog_1_2() static Fixes the following sparse warning: drivers/firmware/efi/libstub/tpm.c:62:6: warning: symbol 'efi_retrieve_tpm2_eventlog_1_2' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Ard Biesheuvel Reviewed-by: Jarkko Sakkinen Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-...@vger.kernel.org Link: http://lkml.kernel.org/r/20180504060003.19618-12-ard.biesheu...@linaro.org Signed-off-by: Ingo Molnar --- drivers/firmware/efi/libstub/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c index 9d08cea3f1b0..caa37a6dd9d4 100644 --- a/drivers/firmware/efi/libstub/tpm.c +++ b/drivers/firmware/efi/libstub/tpm.c @@ -59,7 +59,7 @@ void efi_enable_reset_attack_mitigation(efi_system_table_t *sys_table_arg) #endif -void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg) +static void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg) { efi_guid_t tcg2_guid = EFI_TCG2_PROTOCOL_GUID; efi_guid_t linux_eventlog_guid = LINUX_EFI_TPM_EVENT_LOG_GUID;
[tip:irq/urgent] irqchip/exiu: Fix return value check in exiu_init()
Commit-ID: 0e54705b0e01dcaf3eb2a496bb66d5f05012056b Gitweb: https://git.kernel.org/tip/0e54705b0e01dcaf3eb2a496bb66d5f05012056b Author: Wei Yongjun AuthorDate: Tue, 14 Nov 2017 06:57:28 + Committer: Thomas Gleixner CommitDate: Tue, 14 Nov 2017 11:27:22 +0100 irqchip/exiu: Fix return value check in exiu_init() In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). Replace the IS_ERR() test of the return value with NULL test and return a proper error code. Fixes: 706cffc1b912 ("irqchip/exiu: Add support for Socionext Synquacer EXIU controller") Signed-off-by: Wei Yongjun Signed-off-by: Thomas Gleixner Acked-by: Ard Biesheuvel Cc: Marc Zyngier Cc: Jason Cooper Link: https://lkml.kernel.org/r/1510642648-123574-1-git-send-email-weiyongj...@huawei.com --- drivers/irqchip/irq-sni-exiu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c index 1b6e2f7..1927b2f 100644 --- a/drivers/irqchip/irq-sni-exiu.c +++ b/drivers/irqchip/irq-sni-exiu.c @@ -196,8 +196,8 @@ static int __init exiu_init(struct device_node *node, } data->base = of_iomap(node, 0); - if (IS_ERR(data->base)) { - err = PTR_ERR(data->base); + if (!data->base) { + err = -ENODEV; goto out_free; }
[tip:ras/core] RAS: Make local function parse_ras_param() static
Commit-ID: 5f0744e50db1628d6de770b92278445b3de2779f Gitweb: http://git.kernel.org/tip/5f0744e50db1628d6de770b92278445b3de2779f Author: Wei Yongjun AuthorDate: Fri, 19 May 2017 11:39:12 +0200 Committer: Thomas Gleixner CommitDate: Sun, 21 May 2017 21:55:12 +0200 RAS: Make local function parse_ras_param() static Make parse_ras_param() static as it is used locally only. Signed-off-by: Wei Yongjun Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/20170516161034.2973-1-weiyj...@gmail.com Signed-off-by: Thomas Gleixner --- drivers/ras/ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c index 94f8038..ed4c343 100644 --- a/drivers/ras/ras.c +++ b/drivers/ras/ras.c @@ -29,7 +29,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event); EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event); -int __init parse_ras_param(char *str) +static int __init parse_ras_param(char *str) { #ifdef CONFIG_RAS_CEC parse_cec_param(str);
[tip:irq/core] irqchip/mbigen: Fix return value check in mbigen_device_probe()
Commit-ID: 216646e4d82e847791f0ba66c439dedd36cb119f Gitweb: http://git.kernel.org/tip/216646e4d82e847791f0ba66c439dedd36cb119f Author: Wei Yongjun AuthorDate: Thu, 27 Apr 2017 15:21:13 + Committer: Thomas Gleixner CommitDate: Sun, 30 Apr 2017 11:21:16 +0200 irqchip/mbigen: Fix return value check in mbigen_device_probe() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). Use devm_ioremap_resource() instead of devm_ioremap() to fix the IS_ERR() test issue. Fixes: 76e1f77f9c26 ("irqchip/mbigen: Introduce mbigen_of_create_domain()") Signed-off-by: Wei Yongjun Cc: Marc Zyngier Cc: Kefeng Wang Cc: Jason Cooper Link: http://lkml.kernel.org/r/20170427152113.31147-1-weiyj...@gmail.com Signed-off-by: Thomas Gleixner --- drivers/irqchip/irq-mbigen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c index 061cdb8..d2306c8 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -337,8 +337,7 @@ static int mbigen_device_probe(struct platform_device *pdev) mgn_chip->pdev = pdev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mgn_chip->base = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); + mgn_chip->base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(mgn_chip->base)) return PTR_ERR(mgn_chip->base);
[tip:mm/urgent] mm/numa: Remove duplicated include from mprotect.c
Commit-ID: 137baabe351e0554d06c6d5c84059fe343e2791e Gitweb: http://git.kernel.org/tip/137baabe351e0554d06c6d5c84059fe343e2791e Author: Wei Yongjun AuthorDate: Mon, 17 Oct 2016 15:47:39 + Committer: Thomas Gleixner CommitDate: Wed, 19 Oct 2016 17:28:48 +0200 mm/numa: Remove duplicated include from mprotect.c Signed-off-by: Wei Yongjun Cc: Dave Hansen Cc: linux...@kvack.org Cc: Andrew Morton Cc: Mel Gorman Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/1476719259-6214-1-git-send-email-weiyj...@gmail.com Signed-off-by: Thomas Gleixner --- mm/mprotect.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/mprotect.c b/mm/mprotect.c index bcdbe62..1193652 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include
[tip:efi/core] efi: Remove unused include of
Commit-ID: 10714dd37aa7ebb165677b9a793448950ff366ad Gitweb: http://git.kernel.org/tip/10714dd37aa7ebb165677b9a793448950ff366ad Author: Wei Yongjun AuthorDate: Tue, 18 Oct 2016 15:33:12 +0100 Committer: Ingo Molnar CommitDate: Tue, 18 Oct 2016 17:11:16 +0200 efi: Remove unused include of Signed-off-by: Wei Yongjun Signed-off-by: Matt Fleming Cc: Ard Biesheuvel Cc: Ivan Khoronzhuk Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-...@vger.kernel.org Link: http://lkml.kernel.org/r/20161018143318.15673-3-m...@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- drivers/firmware/efi/test/efi_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c index f61bb52..ae51268 100644 --- a/drivers/firmware/efi/test/efi_test.c +++ b/drivers/firmware/efi/test/efi_test.c @@ -8,7 +8,6 @@ * */ -#include #include #include #include
[tip:irq/core] genirq: Make function __irq_do_set_handler() static
Commit-ID: b8129a1f6aaaca02d92186acf19ceb545b4b489a Gitweb: http://git.kernel.org/tip/b8129a1f6aaaca02d92186acf19ceb545b4b489a Author: Wei Yongjun AuthorDate: Sun, 25 Sep 2016 15:36:39 + Committer: Thomas Gleixner CommitDate: Sun, 25 Sep 2016 16:46:52 -0400 genirq: Make function __irq_do_set_handler() static Fixes the following sparse warning: kernel/irq/chip.c:786:1: warning: symbol '__irq_do_set_handler' was not declared. Should it be static? Signed-off-by: Wei Yongjun Link: http://lkml.kernel.org/r/1474817799-18676-1-git-send-email-weiyj...@gmail.com Signed-off-by: Thomas Gleixner --- kernel/irq/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index d8dfdc6..be3c34e 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -782,7 +782,7 @@ void handle_percpu_devid_irq(struct irq_desc *desc) chip->irq_eoi(&desc->irq_data); } -void +static void __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle, int is_chained, const char *name) {
[tip:x86/headers] x86/apic: Remove duplicated include from probe_64.c
Commit-ID: f6329088b3d9898d6212c410d465d096cdcd3746 Gitweb: http://git.kernel.org/tip/f6329088b3d9898d6212c410d465d096cdcd3746 Author: Wei Yongjun AuthorDate: Tue, 19 Jul 2016 12:02:20 + Committer: Thomas Gleixner CommitDate: Tue, 19 Jul 2016 16:02:31 +0200 x86/apic: Remove duplicated include from probe_64.c Remove duplicated include. Signed-off-by: Wei Yongjun Cc: Paul Gortmaker Link: http://lkml.kernel.org/r/1468929740-8999-1-git-send-email-weiyj...@163.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/probe_64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/apic/probe_64.c b/arch/x86/kernel/apic/probe_64.c index d4880a3..c303054 100644 --- a/arch/x86/kernel/apic/probe_64.c +++ b/arch/x86/kernel/apic/probe_64.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include
[tip:x86/headers] x86/ce4100: Remove duplicated include from ce4100.c
Commit-ID: 2384d1d832efc59447b27a283080551caf922086 Gitweb: http://git.kernel.org/tip/2384d1d832efc59447b27a283080551caf922086 Author: Wei Yongjun AuthorDate: Tue, 19 Jul 2016 12:02:11 + Committer: Thomas Gleixner CommitDate: Tue, 19 Jul 2016 16:02:17 +0200 x86/ce4100: Remove duplicated include from ce4100.c Remove duplicated include. Signed-off-by: Wei Yongjun Cc: Paul Gortmaker Link: http://lkml.kernel.org/r/1468929731-8900-1-git-send-email-weiyj...@163.com Signed-off-by: Thomas Gleixner --- arch/x86/platform/ce4100/ce4100.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 7ab4d3f..b27bccd 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c @@ -11,11 +11,9 @@ #include #include #include -#include #include #include #include -#include #include #include
[tip:locking/core] locking/static_keys: Fix non static symbol Sparse warning
Commit-ID: 885885f6b88d22f81e67ee6a61561e480b27d27a Gitweb: http://git.kernel.org/tip/885885f6b88d22f81e67ee6a61561e480b27d27a Author: Wei Yongjun AuthorDate: Fri, 17 Jun 2016 17:19:40 + Committer: Ingo Molnar CommitDate: Thu, 7 Jul 2016 09:06:46 +0200 locking/static_keys: Fix non static symbol Sparse warning Fix the following sparse warnings: kernel/jump_label.c:473:23: warning: symbol 'jump_label_module_nb' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1466183980-8903-1-git-send-email-weiyj...@163.com Signed-off-by: Ingo Molnar --- kernel/jump_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/jump_label.c b/kernel/jump_label.c index 05254ee..ac4ab95 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -422,7 +422,7 @@ jump_label_module_notify(struct notifier_block *self, unsigned long val, return notifier_from_errno(ret); } -struct notifier_block jump_label_module_nb = { +static struct notifier_block jump_label_module_nb = { .notifier_call = jump_label_module_notify, .priority = 1, /* higher than tracepoints */ };
[tip:x86/kaslr] x86, kaslr: Remove unused including
Commit-ID: 19259943f0954dcd1817f94776376bf51c6a46d5 Gitweb: http://git.kernel.org/tip/19259943f0954dcd1817f94776376bf51c6a46d5 Author: Wei Yongjun AuthorDate: Sat, 7 Dec 2013 21:02:36 +0800 Committer: H. Peter Anvin CommitDate: Tue, 14 Jan 2014 10:45:56 -0800 x86, kaslr: Remove unused including Remove including that don't need it. Signed-off-by: Wei Yongjun Link: http://lkml.kernel.org/r/capglhd-fjx1rybjwfau1vhrftvhwwmll3x46bouc5unxhpj...@mail.gmail.com Acked-by: Kees Cook Signed-off-by: H. Peter Anvin --- arch/x86/boot/compressed/aslr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index 84be175..90a21f4 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c @@ -10,7 +10,6 @@ #include #include #include -#include /* Simplified build-specific string for starting entropy. */ static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/platform] x86/olpc/xo1/sci: Don't call input_free_device () after input_unregister_device()
Commit-ID: 3482e664dc7f44e0ffb1fcf1de7af74977748f31 Gitweb: http://git.kernel.org/tip/3482e664dc7f44e0ffb1fcf1de7af74977748f31 Author: Wei Yongjun AuthorDate: Wed, 24 Apr 2013 10:46:24 +0800 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2013 08:44:47 +0200 x86/olpc/xo1/sci: Don't call input_free_device() after input_unregister_device() input_free_device() should only be used if input_register_device() was not called yet or if it failed. Once device was unregistered use input_unregister_device() and memory will be freed once last reference to the device is dropped. Signed-off-by: Wei Yongjun Cc: d...@laptop.org Cc: p...@laptop.org Cc: gre...@linuxfoundation.org Link: http://lkml.kernel.org/r/capglhd84cboeucog%2byndhvgqtftroujdkzgskh3o0b-q93e...@mail.gmail.com Signed-off-by: Ingo Molnar --- arch/x86/platform/olpc/olpc-xo1-sci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c index 74704be..9a2e590 100644 --- a/arch/x86/platform/olpc/olpc-xo1-sci.c +++ b/arch/x86/platform/olpc/olpc-xo1-sci.c @@ -460,7 +460,6 @@ static int setup_power_button(struct platform_device *pdev) static void free_power_button(void) { input_unregister_device(power_button_idev); - input_free_device(power_button_idev); } static int setup_ebook_switch(struct platform_device *pdev) @@ -491,7 +490,6 @@ static int setup_ebook_switch(struct platform_device *pdev) static void free_ebook_switch(void) { input_unregister_device(ebook_switch_idev); - input_free_device(ebook_switch_idev); } static int setup_lid_switch(struct platform_device *pdev) @@ -526,6 +524,7 @@ static int setup_lid_switch(struct platform_device *pdev) err_create_attr: input_unregister_device(lid_switch_idev); + lid_switch_idev = NULL; err_register: input_free_device(lid_switch_idev); return r; @@ -535,7 +534,6 @@ static void free_lid_switch(void) { device_remove_file(&lid_switch_idev->dev, &dev_attr_lid_wake_mode); input_unregister_device(lid_switch_idev); - input_free_device(lid_switch_idev); } static int xo1_sci_probe(struct platform_device *pdev) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:perf/urgent] perf: Fix error return code
Commit-ID: c481420248c6730246d2a1b1773d5d7007ae0835 Gitweb: http://git.kernel.org/tip/c481420248c6730246d2a1b1773d5d7007ae0835 Author: Wei Yongjun AuthorDate: Fri, 12 Apr 2013 11:05:54 +0800 Committer: Ingo Molnar CommitDate: Fri, 12 Apr 2013 06:33:56 +0200 perf: Fix error return code Fix to return -ENOMEM in the allocation error case instead of 0 (if pmu_bus_running == 1), as done elsewhere in this function. Signed-off-by: Wei Yongjun Cc: a.p.zijls...@chello.nl Cc: pau...@samba.org Cc: a...@ghostprotocols.net Link: http://lkml.kernel.org/r/capglhd8j_fwcgqe%3dklwjpbj%2b%3do0pw6z-seq%3dntpu08c2w1t...@mail.gmail.com [ Tweaked the error code setting placement and the changelog. ] Signed-off-by: Ingo Molnar --- kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/events/core.c b/kernel/events/core.c index 7f0d67e..7e0962e 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5987,6 +5987,7 @@ skip_type: if (pmu->pmu_cpu_context) goto got_cpu_context; + ret = -ENOMEM; pmu->pmu_cpu_context = alloc_percpu(struct perf_cpu_context); if (!pmu->pmu_cpu_context) goto free_dev; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:perf/core] perf report: Remove duplicated include
Commit-ID: db3c6bf811581c626471a6aecdf0024575b707d7 Gitweb: http://git.kernel.org/tip/db3c6bf811581c626471a6aecdf0024575b707d7 Author: Wei Yongjun AuthorDate: Wed, 13 Mar 2013 12:24:42 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 15 Mar 2013 13:06:08 -0300 perf report: Remove duplicated include Signed-off-by: Wei Yongjun Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/CAPgLHd9=exah1hv4jevvta4tzfsjnx+8+g3zqmmukqq5qrq...@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-report.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 3f4a79b..296bd21 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -13,7 +13,6 @@ #include "util/annotate.h" #include "util/color.h" #include -#include "util/cache.h" #include #include "util/symbol.h" #include "util/callchain.h" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/