Re: [PATCH 2/3] powerpc/pseries/hotplug-cpu: fix memleak in dlpar_cpu_add_by_count

2020-11-29 Thread Qinglang Miao
在 2020/11/30 9:51, Michael Ellerman 写道: Qinglang Miao writes: kfree(cpu_drcs) should be called when it fails to perform of_find_node_by_path("/cpus") in dlpar_cpu_add_by_count, otherwise there would be a memleak. In fact, the patch a0ff72f9f5a7 ought to re

[PATCH 2/3] powerpc/pseries/hotplug-cpu: fix memleak in dlpar_cpu_add_by_count

2020-11-28 Thread Qinglang Miao
here might be a mistake when apply that one. Fixes: a0ff72f9f5a7 ("powerpc/pseries/hotplug-cpu: Remove double free in error path") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/power

[PATCH] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-10-28 Thread Qinglang Miao
-by: Qinglang Miao --- arch/powerpc/sysdev/mpic_msgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c index f6b253e2b..36ec0bdd8 100644 --- a/arch/powerpc/sysdev/mpic_msgr.c +++ b/arch/powerpc/sysdev/mpic_msgr.c @@ -191,7

[PATCH -next] ASoC: fsl: imx-mc13783: use devm_snd_soc_register_card()

2020-09-29 Thread Qinglang Miao
Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao --- sound/soc/fsl/imx-mc13783.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c index dd9c1ac81

[PATCH -next] ocxl: simplify the return expression of free_function_dev()

2020-09-21 Thread Qinglang Miao
Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/misc/ocxl/core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/misc/ocxl/core.c b/drivers/misc/ocxl/core.c index b7a09b21a..aebfc53a2 100644 --- a/drivers/misc/ocxl/core.c +++ b/drivers

[PATCH -next v2] KVM: PPC: Book3S HV: XIVE: Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-18 Thread Qinglang Miao
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao --- v2: based on linux-next(20200917), and can be applied to mainline cleanly now. arch/powerpc/kvm/book3s_xive_native.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch

[PATCH -next v2] powerpc/mm: ptdump: Convert to DEFINE_SHOW_ATTRIBUTE

2020-09-18 Thread Qinglang Miao
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao --- v2: based on linux-next(20200917), and can be applied to mainline cleanly now. arch/powerpc/mm/ptdump/bats.c | 24 +++- arch/powerpc/mm/ptdump/hashpagetable.c | 12

[PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/tty/serial/pmac_zilog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 96e7aa479..063484b22 100644

[PATCH -next] powerpc/powernv: fix wrong warning message in opalcore_config_init()

2020-09-16 Thread Qinglang Miao
The logic of the warn output is incorrect. The two args should be exchanged. Signed-off-by: Qinglang Miao --- arch/powerpc/platforms/powernv/opal-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal-core.c b/arch/powerpc/platforms

[PATCH -next] macintosh: smu_sensors: use for_each_child_of_node() macro

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/macintosh/windfarm_smu_sensors.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c

[PATCH -next] PCI: rpadlpar: use for_each_child_of_node() and for_each_node_by_name

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() and for_each_node_by_name macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/pci/hotplug/rpadlpar_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug

[PATCH -next] drivers/macintosh/smu.c: use for_each_child_of_node() macro

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/macintosh/smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 96684581a..45875e8c6 100644 --- a/drivers/macintosh

[PATCH -next] macintosh: windfarm: use for_each_child_of_node() macro

2020-09-14 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/macintosh/windfarm_smu_sat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index cb75dc035

[PATCH -next] powerpc: use for_each_child_of_node() macro

2020-07-27 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- arch/powerpc/platforms/pasemi/misc.c | 3 +-- arch/powerpc/platforms/powermac/low_i2c.c| 6 ++ arch/powerpc/platforms/powermac/pfunc_base.c | 4 ++-- arch/powerpc/platforms/powermac

[PATCH -next] powerpc: Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-16 Thread Qinglang Miao
From: Chen Huang Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Chen Huang --- arch/powerpc/kvm/book3s_xive_native.c | 12 +--- arch/powerpc/mm/ptdump/bats.c | 24 +++- arch/powerpc/mm/ptdump/hashpagetable.c | 12 +---