[PATCH v5 11/14] irqchip/omap-intc: Fix potential resource leak

2020-07-05 Thread Tiezhu Yang
In the function omap_init_irq_of(), system resource "omap_irq_base" was not released in an error case. Thus add a call of the function "iounmap" in the if branch. Fixes: 8598066cddd1 ("arm: omap: irq: move irq.c to drivers/irqchip/") Signed-off-by: Tiezhu Yang

[PATCH v5 14/14] irqchip/xilinx-intc: Fix potential resource leak

2020-07-05 Thread Tiezhu Yang
Add support for parent intc") Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-xilinx-intc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-xilinx-intc.c b/drivers/irqchip/irq-xilinx-intc.c index 1d3d273..41d9412 100644 --- a/drivers/irqchi

[PATCH v5 07/14] irqchip/dw-apb-ictl: Fix potential resource leaks

2020-07-05 Thread Tiezhu Yang
In the function dw_apb_ictl_init(), system resources "irq" and "domain" were not released in a few error cases. Thus add jump targets for the completion of the desired exception handling. Fixes: 350d71b94fc9 ("irqchip: add DesignWare APB ICTL interrupt controller&quo

[PATCH v5 06/14] irqchip/digicolor: Fix potential resource leaks

2020-07-05 Thread Tiezhu Yang
oller driver") Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-digicolor.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-digicolor.c b/drivers/irqchip/irq-digicolor.c index fc38d2d..18c6e77 100644 --- a/drivers/irqchip/irq-digicol

[PATCH v5 13/14] irqchip/s3c24xx: Fix potential resource leaks

2020-07-05 Thread Tiezhu Yang
In the function s3c_init_intc_of(), system resource "reg_base", "domain" and "intc" were not released in a few error cases. Thus add jump targets for the completion of the desired exception handling. Fixes: f0774d41da0e ("irqchip: s3c24xx: add devicetree s

[PATCH v5 12/14] irqchip/riscv-intc: Fix potential resource leak

2020-07-05 Thread Tiezhu Yang
In the function riscv_intc_init(), system resource "intc_domain" was not released in an error case. Thus add a call of the function "irq_domain_remove" in the if branch. Fixes: 6b7ce8927b5a ("irqchip: RISC-V per-HART local interrupt controller driver") Signed

Re: [PATCH] watchdog: bcm_kona_wdt: Use correct return value for bcm_kona_wdt_probe()

2020-07-06 Thread Tiezhu Yang
On 05/25/2020 09:47 PM, Guenter Roeck wrote: On 5/25/20 12:31 AM, Tiezhu Yang wrote: When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang Reviewed-by: Guenter Roeck Hi, Could you

Re: [PATCH] serial: Remove duplicated macro definition of port type

2020-07-06 Thread Tiezhu Yang
On 05/11/2020 02:40 PM, Jiri Slaby wrote: On 07. 05. 20, 14:03, Tiezhu Yang wrote: There exists the same macro definition of port type from 0 to 13 in include/uapi/linux/serial.h, remove these duplicated code in include/uapi/linux/serial_core.h which includes the former header. Signed-off

[PATCH v3 7/8] irqchip/loongson-liointc: Fix potential dead lock

2020-07-06 Thread Tiezhu Yang
In the function liointc_set_type(), we need to call the function irq_gc_unlock_irqrestore() before returning. Fixes: dbb152267908 ("irqchip: Add driver for Loongson I/O Local Interrupt Controller") Reported-by: Jianmin Lv Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson

[PATCH v3 5/8] irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell()

2020-07-06 Thread Tiezhu Yang
t;) Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-pch-pic.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c index 2a05b93..016f32c 100644 --- a/drivers/irqchip/irq-lo

[PATCH v3 6/8] irqchip/loongson-pch-msi: Remove unneeded variable

2020-07-06 Thread Tiezhu Yang
irq_domain_alloc_irqs_parent() returns 0 on success and non-zero value on failure, it is redudant to check its non-zero return value and then return it, so just remove the variable "ret" and return directly in the function pch_msi_parent_domain_alloc(). Signed-off-by: Tiezhu Yang --

[PATCH v3 1/8] irqchip/loongson-htpic: Remove redundant kfree operation

2020-07-06 Thread Tiezhu Yang
In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htpic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i

[PATCH v3 4/8] irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell()

2020-07-06 Thread Tiezhu Yang
Check the return value of irq_domain_translate_onecell() due to it may returns -EINVAL if failed. Fixes: 818e915fbac5 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htvec.c | 5 - 1 file changed, 4 insert

[PATCH v3 3/8] irqchip/loongson-htvec: Fix potential resource leak

2020-07-06 Thread Tiezhu Yang
In the function htvec_of_init(), system resource "parent_irq" was not released in an error case. Thus add a jump target for the completion of the desired exception handling. Fixes: 818e915fbac5 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Tiezh

[PATCH v3 8/8] dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml

2020-07-06 Thread Tiezhu Yang
Fix the following two typos in loongson,liointc.yaml: fron -> from connected -> connect it's -> its Fixes: b6280c8bb6f5 ("dt-bindings: interrupt-controller: Add Loongson LIOINTC") Signed-off-by: Tiezhu Yang Cc: Rob Herring Cc: devicet...@vger.kernel.org --- .../devicetree

[PATCH v3 2/8] irqchip/loongson-htpic: Remove unneeded select of I8259

2020-07-06 Thread Tiezhu Yang
LOONGSON_HTPIC depends on MACH_LOONGSON64 and MACH_LOONGSON64 already selects I8259 in arch/mips/Kconfig, so no need to select I8259 again when config LOONGSON_HTPIC. Signed-off-by: Tiezhu Yang --- drivers/irqchip/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/irqchip

[PATCH v3 0/8] irqchip: Fix some issues and do some code cleanups about Loongson

2020-07-06 Thread Tiezhu Yang
Loongson into a new patch series and add "Fixes" tag v3: - Add a new patch "irqchip/loongson-liointc: Fix potential dead lock" - Fix another typo in loongson,liointc.yaml Tiezhu Yang (8): irqchip/loongson-htpic: Remove redundant kfree operation irqchip/loongson-htpic: Re

Re: [PATCH v3 04/14] irqchip/davinci-aintc: Fix potential resource leaks

2020-06-27 Thread Tiezhu Yang
On 06/24/2020 09:12 PM, Markus Elfring wrote: There exists potential resource leaks in the error path, fix them. Would you like to reconsider this change description? https://lore.kernel.org/linux-mips/be3acb13-2963-ddf1-a867-7e30fd23a...@loongson.cn/ https://lkml.org/lkml/2020/6/24/498 …

Re: [1/7] irqchip: Fix potential resource leaks

2020-06-27 Thread Tiezhu Yang
On 06/24/2020 08:08 PM, Markus Elfring wrote: How do you think about to extend source code analysis tools accordingly? I have no good idea, maybe some simple match check tools can do this. Would you like to help with any additional software development resources (besides your current

[PATCH v4] perf tools: Check libasan and libubsan in Makefile.config

2020-06-17 Thread Tiezhu Yang
an error log to reflect the reality. Signed-off-by: Tiezhu Yang --- v2: - Check libasan and libubsan in tools/build/Makefile.feature - Modify the patch subject v3: - Check EXTRA_CFLAGS first v4: - Check libasan and libubsan in tools/perf/Makefile.config - Modify the patch subject

[PATCH] um: vector: Use GFP_ATOMIC under spin lock

2020-06-18 Thread Tiezhu Yang
Use GFP_ATOMIC instead of GFP_KERNEL under spin lock to fix possible sleep-in-atomic-context bugs. Fixes: 9807019a62dc ("um: Loadable BPF "Firmware" for vector drivers") Signed-off-by: Tiezhu Yang --- arch/um/drivers/vector_kern.c | 4 ++-- 1 file changed, 2 insertions(+),

Re: [PATCH] PCI: Loongson: Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk()

2020-06-11 Thread Tiezhu Yang
this or for future patches. Hi Bjorn, Thanks for your reminder, sorry for that. I will modify it and then send v2. On Wed, Jun 10, 2020 at 10:39:50AM +0800, Tiezhu Yang wrote: Use DECLARE_PCI_FIXUP_EARLY instead of DECLARE_PCI_FIXUP_HEADER for bridge_class_quirk() in pci-loongson.c, otherwise

[PATCH v2] PCI: loongson: Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk()

2020-06-11 Thread Tiezhu Yang
Use DECLARE_PCI_FIXUP_EARLY instead of DECLARE_PCI_FIXUP_HEADER for bridge_class_quirk() in pci-loongson.c, otherwise the fixup has no effect. Fixes: 1f58cca5cf2b ("PCI: Add Loongson PCI Controller support") Signed-off-by: Tiezhu Yang --- v2: - modify the patch subject used with

[PATCH] MIPS: DTS: Only build subdir of current platform

2020-05-20 Thread Tiezhu Yang
/dts/loongson/loongson3_8core_rs780e.dtb DTB arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S AS arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o AR arch/mips/boot/dts/loongson/built-in.a AR arch/mips/boot/dts/built-in.a Signed-off-by: Tiezhu Yang

[PATCH 3/3] gpio: pxa: Add COMPILE_TEST support

2020-05-21 Thread Tiezhu Yang
Add COMPILE_TEST support to the PXA GPIO driver for better compile testing coverage. Signed-off-by: Tiezhu Yang --- drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 03c01f4..5e90aad 100644 --- a/drivers

[PATCH 1/3] gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()

2020-05-21 Thread Tiezhu Yang
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 72d8cb715477 ("drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang --- drivers/gpio/gpio-bcm-kona.c | 2

[PATCH 2/3] gpio: pxa: Fix return value of pxa_gpio_probe()

2020-05-21 Thread Tiezhu Yang
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 542c25b7a209 ("drivers: gpio: pxa: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang --- drivers/gpio/gpio-pxa.c | 4 ++-- 1 fi

[PATCH 1/2] nvmem: sprd: Fix return value of sprd_efuse_probe()

2020-05-22 Thread Tiezhu Yang
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support") Signed-off-by: Tiezhu Yang --- drivers/nvmem/sprd-efuse.c | 4 ++-- 1 file

[PATCH 0/2] Fix some issues about NVMEM

2020-05-22 Thread Tiezhu Yang
This patch series is based on the latest Linus' tree. Tiezhu Yang (2): nvmem: sprd: Fix return value of sprd_efuse_probe() MAINTAINERS: Add git tree for NVMEM FRAMEWORK MAINTAINERS| 1 + drivers/nvmem/sprd-efuse.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions

[PATCH 2/2] MAINTAINERS: Add git tree for NVMEM FRAMEWORK

2020-05-22 Thread Tiezhu Yang
There is no git tree for NVMEM FRAMEWORK in MAINTAINERS, it is not convinent to rebase, add it. Signed-off-by: Tiezhu Yang --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7b58ca2..bd268978 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12100,6

[PATCH] usb: bdc: Fix return value of bdc_probe()

2020-05-22 Thread Tiezhu Yang
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 893a66d34298 ("usb: bdc: use devm_platform_ioremap_resource() to simplify code") Signed-off-by: Tiezhu Yang --- drivers/usb/gadget/udc/bdc/bdc_

Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config

2020-06-02 Thread Tiezhu Yang
On 06/02/2020 10:15 PM, Jiri Olsa wrote: On Tue, Jun 02, 2020 at 12:15:03PM +0800, Tiezhu Yang wrote: When build perf with ASan or UBSan, if libasan or libubsan can not find, the feature-glibc is 0 and there exists the following error log which is wrong, because we can find gnu/libc-version.h

[PATCH v2] tools build: Check libasan and libubsan in Makefile.feature

2020-06-03 Thread Tiezhu Yang
an error log to reflect the reality. Signed-off-by: Tiezhu Yang --- v2: - Check libasan and libubsan in tools/build/Makefile.feature - Modify the patch subject tools/build/Makefile.feature | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/build/Makefile.feature b/tools/build

Re: [PATCH v2] tools build: Check libasan and libubsan in Makefile.feature

2020-06-16 Thread Tiezhu Yang
On 06/17/2020 03:39 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 15, 2020 at 10:20:10AM +0800, Tiezhu Yang escreveu: On 06/03/2020 07:32 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 03, 2020 at 02:10:04PM +0800, Tiezhu Yang escreveu: When build perf with ASan or UBSan, if libasan

[PATCH v3] tools build: Check libasan and libubsan in Makefile.feature

2020-06-16 Thread Tiezhu Yang
an error log to reflect the reality. Signed-off-by: Tiezhu Yang --- v2: - Check libasan and libubsan in tools/build/Makefile.feature - Modify the patch subject v3: - Check EXTRA_CFLAGS first tools/build/Makefile.feature | 12 1 file changed, 12 insertions(+) diff --git

[PATCH 2/7] irqchip/loongson-htpic: Remove redundant kfree operation

2020-06-23 Thread Tiezhu Yang
In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htpic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i

[PATCH 0/7] Fix potential resource leaks and do some code cleanups about irqchip

2020-06-23 Thread Tiezhu Yang
When I test the irqchip code of Loongson, I read the related code of other chips in drivers/irqchip and I find some potential resource leaks in the error path, I think it is better to fix them. Additionally, do some code cleanups about Loongson to make it more clean and readable. Tiezhu Yang (7

[PATCH 3/7] irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell()

2020-06-23 Thread Tiezhu Yang
Check the return value of irq_domain_translate_onecell() due to it may returns -EINVAL if failed. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htvec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip

[PATCH 1/7] irqchip: Fix potential resource leaks

2020-06-23 Thread Tiezhu Yang
There exists some potential resource leaks in the error path, fix them. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-ath79-misc.c | 3 +++ drivers/irqchip/irq-csky-apb-intc.c | 3 +++ drivers/irqchip/irq-csky-mpintc.c | 26 -- drivers/irqchip/irq

[PATCH 4/7] irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell()

2020-06-23 Thread Tiezhu Yang
Check the return value of irq_domain_translate_twocell() due to it may returns -EINVAL if failed and use variable fwspec for it, and then use a new variable parent_fwspec which is proper for irq_domain_alloc_irqs_parent(). Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-pch-pic.c

[PATCH 4/7 RESEND] irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell()

2020-06-23 Thread Tiezhu Yang
Check the return value of irq_domain_translate_twocell() due to it may returns -EINVAL if failed and use variable fwspec for it, and then use a new variable parent_fwspec which is proper for irq_domain_alloc_irqs_parent(). Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-pch-pic.c

[PATCH 6/7 RESEND] irqchip/loongson-htpic: Remove unneeded select of I8259

2020-06-23 Thread Tiezhu Yang
LOONGSON_HTPIC depends on MACH_LOONGSON64 and MACH_LOONGSON64 already selects I8259 in arch/mips/Kconfig, so no need to select I8259 again when config LOONGSON_HTPIC. Signed-off-by: Tiezhu Yang --- drivers/irqchip/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/irqchip

[PATCH 0/7 RESEND] Fix potential resource leaks and do some code cleanups about irqchip

2020-06-23 Thread Tiezhu Yang
Loongson to make it more clean and readable. Tiezhu Yang (7): irqchip: Fix potential resource leaks irqchip/loongson-htpic: Remove redundant kfree operation irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell() irqchip/loongson-pch-pic: Check return value

[PATCH 1/7 RESEND] irqchip: Fix potential resource leaks

2020-06-23 Thread Tiezhu Yang
There exists some potential resource leaks in the error path, fix them. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-ath79-misc.c | 3 +++ drivers/irqchip/irq-csky-apb-intc.c | 3 +++ drivers/irqchip/irq-csky-mpintc.c | 26 -- drivers/irqchip/irq

[PATCH 5/7 RESEND] irqchip/loongson-pch-msi: Remove unneeded variable

2020-06-23 Thread Tiezhu Yang
irq_domain_alloc_irqs_parent() returns 0 on success and non-zero value on failure, it is redudant to check its non-zero return value and then return it, so just remove the variable "ret" and return directly in the function pch_msi_parent_domain_alloc(). Signed-off-by: Tiezhu Yang --

[PATCH 3/7 RESEND] irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell()

2020-06-23 Thread Tiezhu Yang
Check the return value of irq_domain_translate_onecell() due to it may returns -EINVAL if failed. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htvec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip

[PATCH 2/7 RESEND] irqchip/loongson-htpic: Remove redundant kfree operation

2020-06-23 Thread Tiezhu Yang
In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htpic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i

[PATCH 6/7 RESEND] irqchip/loongson-htpic: Remove unneeded select of I8259

2020-06-23 Thread Tiezhu Yang
LOONGSON_HTPIC depends on MACH_LOONGSON64 and MACH_LOONGSON64 already selects I8259 in arch/mips/Kconfig, so no need to select I8259 again when config LOONGSON_HTPIC. Signed-off-by: Tiezhu Yang --- drivers/irqchip/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/irqchip

[PATCH 2/7 RESEND] irqchip/loongson-htpic: Remove redundant kfree operation

2020-06-23 Thread Tiezhu Yang
In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htpic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i

[PATCH 5/7 RESEND] irqchip/loongson-pch-msi: Remove unneeded variable

2020-06-23 Thread Tiezhu Yang
irq_domain_alloc_irqs_parent() returns 0 on success and non-zero value on failure, it is redudant to check its non-zero return value and then return it, so just remove the variable "ret" and return directly in the function pch_msi_parent_domain_alloc(). Signed-off-by: Tiezhu Yang --

[PATCH 4/7 RESEND] irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell()

2020-06-23 Thread Tiezhu Yang
Check the return value of irq_domain_translate_twocell() due to it may returns -EINVAL if failed and use variable fwspec for it, and then use a new variable parent_fwspec which is proper for irq_domain_alloc_irqs_parent(). Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-pch-pic.c

[PATCH 3/7 RESEND] irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell()

2020-06-23 Thread Tiezhu Yang
Check the return value of irq_domain_translate_onecell() due to it may returns -EINVAL if failed. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-loongson-htvec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-htvec.c b/drivers/irqchip

[PATCH 1/7 RESEND] irqchip: Fix potential resource leaks

2020-06-23 Thread Tiezhu Yang
There exists some potential resource leaks in the error path, fix them. Signed-off-by: Tiezhu Yang --- drivers/irqchip/irq-ath79-misc.c | 3 +++ drivers/irqchip/irq-csky-apb-intc.c | 3 +++ drivers/irqchip/irq-csky-mpintc.c | 26 -- drivers/irqchip/irq

[PATCH 0/7 RESEND] Fix potential resource leaks and do some code cleanups about irqchip

2020-06-23 Thread Tiezhu Yang
it is better to fix them. Additionally, do some code cleanups about Loongson to make it more clean and readable. Tiezhu Yang (7): irqchip: Fix potential resource leaks irqchip/loongson-htpic: Remove redundant kfree operation irqchip/loongson-htvec: Check return value

[PATCH 7/7 RESEND] dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml

2020-06-23 Thread Tiezhu Yang
Fix the following two typos in loongson,liointc.yaml: fron -> from it's -> its Signed-off-by: Tiezhu Yang --- .../devicetree/bindings/interrupt-controller/loongson,liointc.yaml| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bi

Re: [PATCH v2] tools build: Check libasan and libubsan in Makefile.feature

2020-06-14 Thread Tiezhu Yang
On 06/03/2020 07:32 PM, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 03, 2020 at 02:10:04PM +0800, Tiezhu Yang escreveu: When build perf with ASan or UBSan, if libasan or libubsan can not find, the feature-glibc is 0 and there exists the following error log which is wrong, because we can find

[PATCH RESEND] f2fs: optimize f2fs_write_cache_pages

2015-07-16 Thread Tiezhu Yang
he if condition is true and the if statement "goto continue_unlock" appears only once, so it can be optimized to reduce the duplicated code. Signed-off-by: Tiezhu Yang --- fs/f2fs/data.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

[PATCH] f2fs: remove dead code f2fs_check_acl

2016-09-13 Thread Tiezhu Yang
The macro f2fs_check_acl is defined but never used since the initial commit, this patch removes the code that has been dead for several years. Signed-off-by: Tiezhu Yang --- fs/f2fs/acl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/f2fs/acl.h b/fs/f2fs/acl.h index b2334d1..2c68518

Re: [PATCH] f2fs: introduce get_checkpoint_version for cleanup

2016-09-26 Thread Tiezhu Yang
At 2016-09-27 02:57:16, "Jaegeuk Kim" wrote: >Hi Tiezhu, > >On Sun, Sep 25, 2016 at 05:50:44PM +0800, Tiezhu Yang wrote: >> There exists almost same codes when get the value of pre_version >> and cur_version in function validate_checkpoint, this patch adds >&g

[PATCH v2] f2fs: introduce get_checkpoint_version for cleanup

2016-09-26 Thread Tiezhu Yang
There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang --- fs/f2fs/checkpoint.c | 63 ++-- 1

Re: [f2fs-dev] [PATCH v2] f2fs: introduce get_checkpoint_version for cleanup

2016-09-27 Thread Tiezhu Yang
Hi Chao, At 2016-09-27 17:46:30, "Chao Yu" wrote: >On 2016/9/27 10:05, Tiezhu Yang wrote: >> There exists almost same codes when get the value of pre_version >> and cur_version in function validate_checkpoint, this patch adds >> get_checkpoint_version to clean up

[PATCH v3] f2fs: introduce get_checkpoint_version for cleanup

2016-09-27 Thread Tiezhu Yang
There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang --- fs/f2fs/checkpoint.c | 68 ++-- 1

[PATCH] f2fs: fix a typo in f2fs.txt

2017-02-07 Thread Tiezhu Yang
There is a typo "f2f2" in f2fs.txt, this patch fixes it. Signed-off-by: Tiezhu Yang --- Documentation/filesystems/f2fs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 0ab33d4..3d7e

[PATCH v4] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Tiezhu Yang
There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang --- fs/f2fs/checkpoint.c | 66 ++-- 1

Re:[PATCH v4] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Tiezhu Yang
At 2016-09-30 07:47:58, "Tiezhu Yang" wrote: >There exists almost same codes when get the value of pre_version >and cur_version in function validate_checkpoint, this patch adds >get_checkpoint_version to clean up redundant codes. > >Signed-off-by: Tiezhu Yang >---

[PATCH v4 RESEND] f2fs: introduce get_checkpoint_version for cleanup

2016-09-29 Thread Tiezhu Yang
There exists almost same codes when get the value of pre_version and cur_version in function validate_checkpoint, this patch adds get_checkpoint_version to clean up redundant codes. Signed-off-by: Tiezhu Yang --- fs/f2fs/checkpoint.c | 66 ++-- 1

[PATCH] md: make the code more readable in the for-loop

2016-05-08 Thread Tiezhu Yang
This patch modifies raid1.c, raid10.c and raid5.c to make the code more readable in the for-loop and also fixes the scripts/checkpatch.pl error: ERROR: trailing statements should be on next line. Signed-off-by: Tiezhu Yang --- drivers/md/raid1.c | 6 +++--- drivers/md/raid10.c | 2

[PATCH] f2fs: make exit_f2fs_fs more clear

2016-05-17 Thread Tiezhu Yang
) register_filesystem 11) f2fs_create_root_stats 12) proc_mkdir exit_f2fs_fs should do cleanup in the reverse order to make the code more clear. Signed-off-by: Tiezhu Yang --- fs/f2fs/super.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs

Re:Re: [f2fs-dev] [PATCH] f2fs: return proper error code

2016-07-12 Thread Tiezhu Yang
At 2016-07-12 09:45:43, "Chao Yu" wrote: >On 2016/7/11 7:20, Tiezhu Yang wrote: >> When the length of file name is more than F2FS_NAME_LEN, > >Seem @name indicates a xattr/key name, not a file name. Yes, you are right. Sorry for the noise. Thanks,

[PATCH] f2fs: return proper error code

2016-07-10 Thread Tiezhu Yang
When the length of file name is more than F2FS_NAME_LEN, it should return -ENAMETOOLONG. Signed-off-by: Tiezhu Yang --- fs/f2fs/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 28a5023..b225062 100644 --- a/fs/f2fs/xattr.c

[PATCH] scsi: ufs: remove unnecessary goto label

2016-06-24 Thread Tiezhu Yang
When buff_ascii kmalloc failed, there is no need to call kfree, it should return -ENOMEM directly, this patch fixes it. Signed-off-by: Tiezhu Yang --- drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

[PATCH] f2fs: remove unnecessary goto statement

2016-06-27 Thread Tiezhu Yang
When base_addr is NULL, there is no need to call kzfree, it should return -ENOMEM directly. Additionally, it is better to initialize variable 'error' with 0. Signed-off-by: Tiezhu Yang --- fs/f2fs/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/xattr.c b

[PATCH] Documentation: fix wrong value in md.txt

2016-06-16 Thread Tiezhu Yang
ing related code: 1) in function 'raid5_set_cache_size': if (size <= 16 || size > 32768) return -EINVAL; 2) #define NR_STRIPES 256 So the lower limit value of stripe_cache_size should be 17 and the default value should be 256. Signed-off-by: Tiezhu Yang --- Documentation/m

[PATCH] scsi: ufs: fix potential memory leak

2016-06-07 Thread Tiezhu Yang
There exists potential memory leak in ufshcd_parse_clock_info(), this patch fixes it. Signed-off-by: Tiezhu Yang --- drivers/scsi/ufs/ufshcd-pltfrm.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd

Re: [PATCH] scsi: ufs: fix potential memory leak

2016-06-07 Thread Tiezhu Yang
At 2016-06-08 03:12:08, "James Bottomley"   wrote: >On Wed, 2016-06-08 at 02:00 +0800, Tiezhu Yang wrote: >> There exists potential memory leak in ufshcd_parse_clock_info(), >> this patch fixes it. > >What makes you think there's a leak here?  These are all devm_ >

[PATCH v2] scsi: ufs: fix potential memory leak

2016-06-07 Thread Tiezhu Yang
If the function ufshcd_parse_clock_info returns an error, the memory clkfreq allocated by devm_kzalloc will be freed at that time. But when the function ufshcd_parse_clock_info returns 0 on success, there exists potential memory leak, this patch fixes it. Signed-off-by: Tiezhu Yang --- drivers

Re: [PATCH 3/3] MIPS: Loongson64: Add /proc/boardinfo

2020-10-16 Thread Tiezhu Yang
On 10/16/2020 09:11 PM, Pavel Machek wrote: Hi! Add /proc/boardinfo to get mainboard and BIOS info easily on the Loongson platform, this is useful to point out the current used mainboard type and BIOS version when there exists problems related with hardware or firmware. E.g. with this patch:

[PATCH v2] MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug

2020-12-07 Thread Tiezhu Yang
with this patch, we can see the following two sysfs interfaces under DEBUG_FS. /sys/kernel/debug/memblock/memory /sys/kernel/debug/memblock/reserved Signed-off-by: Tiezhu Yang --- v2: - select ARCH_KEEP_MEMBLOCK only if DEBUG_KERNEL arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) di

[PATCH] MIPS: Add basic support for ptrace single step

2021-02-08 Thread Tiezhu Yang
/master/pkg/proc/native/threads_linux.go#L50 [2] https://github.com/go-delve/delve/blob/master/vendor/golang.org/x/sys/unix/syscall_linux.go#L1573 [3] http://www.t-es-t.hu/download/mips/md00047f.pdf Reported-by: Guoqi Chen Signed-off-by: Xingxing Su Signed-off-by: Tiezhu Yang --- arch/mips/include

[PATCH] MIPS: Make check condition for SDBBP consistent with EJTAG spec

2021-02-08 Thread Tiezhu Yang
Signed-off-by: Tiezhu Yang --- arch/mips/kernel/genex.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index bcce32a..6336826 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -349,8 +349,8 @@ NESTED

[PATCH] selftests: breakpoints: Use correct error messages in breakpoint_test_arm64.c

2021-02-04 Thread Tiezhu Yang
When call ptrace(PTRACE_CONT, ...) failed, use correct error messages. Signed-off-by: Tiezhu Yang --- tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

[PATCH v2] MIPS: Make check condition for SDBBP consistent with EJTAG spec

2021-02-08 Thread Tiezhu Yang
Signed-off-by: Tiezhu Yang --- v2: add MIPS_DEBUG_DBP definition arch/mips/include/asm/mipsregs.h | 4 arch/mips/kernel/genex.S | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index a0e8ae5

Re: [PATCH] MIPS: Make check condition for SDBBP consistent with EJTAG spec

2021-02-08 Thread Tiezhu Yang
On 02/09/2021 10:36 AM, Jiaxun Yang wrote: On Tue, Feb 9, 2021, at 12:32 AM, Jiaxun Yang wrote: On Mon, Feb 8, 2021, at 9:14 PM, Tiezhu Yang wrote: According to MIPS EJTAG Specification [1], a Debug Breakpoint exception occurs when an SDBBP instruction is executed, the CP0_DEBUG bit DBp

Re: [PATCH v2] MIPS: Make check condition for SDBBP consistent with EJTAG spec

2021-02-09 Thread Tiezhu Yang
On 02/09/2021 08:11 PM, Thomas Bogendoerfer wrote: On Tue, Feb 09, 2021 at 01:05:25PM +0800, Tiezhu Yang wrote: According to MIPS EJTAG Specification [1], a Debug Breakpoint exception occurs when an SDBBP instruction is executed, the CP0_DEBUG bit DBp indicates that a Debug Breakpoint exception

Re: [PATCH v2] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again

2021-03-25 Thread Tiezhu Yang
On 03/25/2021 06:17 PM, Thomas Bogendoerfer wrote: On Mon, Mar 22, 2021 at 03:12:59PM +0800, Tiezhu Yang wrote: On 03/22/2021 12:46 PM, Maciej W. Rozycki wrote: On Thu, 18 Mar 2021, Tiezhu Yang wrote: diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 160b3a8..4b94ec7 100644 --- a/arch

[PATCH v3] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again

2021-03-25 Thread Tiezhu Yang
again"). Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") Signed-off-by: Tiezhu Yang --- v3: Select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA on MIPS. v2: update the commit message to fix typos found by Sergei Shtyly

[PATCH v3] MIPS: Check __clang__ to avoid performance influence with GCC in csum_tcpudp_nofold()

2021-04-02 Thread Tiezhu Yang
filename 3792429 0 4221 linux-5.12-rc5/net/ipv4/netfilter/nf_reject_ipv4.o Signed-off-by: Tiezhu Yang --- arch/mips/include/asm/checksum.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h index 1e6c1

[PATCH RFC] MIPS: Loongson64: Use _CACHE_UNCACHED instead of _CACHE_UNCACHED_ACCELERATED

2021-04-06 Thread Tiezhu Yang
just make it work well, it is not a proper and final solution, I hope someone will have a better solution to fix this issue in the future. [1] https://lore.kernel.org/patchwork/patch/1285542/ Signed-off-by: Tiezhu Yang --- Hi Thomas, If you are OK with this change, could you please apply it to

[PATCH] MAINTAINERS: Add Mailing list and Web-page for PERFORMANCE EVENTS SUBSYSTEM

2021-03-14 Thread Tiezhu Yang
Add entry "L: linux-perf-us...@vger.kernel.org" to archive the related mail on https://lore.kernel.org/linux-perf-users/, add entry "W: https://perf.wiki.kernel.org/; so that newbies could get some useful materials. Signed-off-by: Tiezhu Yang --- MAINTAINERS | 2 ++ 1 file change

Re: [PATCH v2] MIPS: Check __clang__ to avoid performance influence with GCC in csum_tcpudp_nofold()

2021-03-15 Thread Tiezhu Yang
On 03/15/2021 04:49 AM, Maciej W. Rozycki wrote: On Tue, 9 Mar 2021, Tiezhu Yang wrote: diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h index 1e6c135..80eddd4 100644 --- a/arch/mips/include/asm/checksum.h +++ b/arch/mips/include/asm/checksum.h @@ -128,9 +128,13

Re: [PATCH v2] MIPS: Check __clang__ to avoid performance influence with GCC in csum_tcpudp_nofold()

2021-03-15 Thread Tiezhu Yang
On 03/15/2021 06:24 PM, Alexander Lobakin wrote: From: Tiezhu Yang Date: Tue, 9 Mar 2021 12:18:13 +0800 The asm code in csum_tcpudp_nofold() is performance-critical, I am sorry for the poorly considered implementation about the performance influence with GCC in the commit 198688edbf77 ("

[PATCH] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again

2021-03-17 Thread Tiezhu Yang
probe_read() will not be available. This is similar with the commit d195b1d1d1196 ("powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again"). Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") Signed-off-by: Tiezhu Yang --- a

Re: [PATCH v2] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again

2021-03-22 Thread Tiezhu Yang
On 03/22/2021 12:46 PM, Maciej W. Rozycki wrote: On Thu, 18 Mar 2021, Tiezhu Yang wrote: diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 160b3a8..4b94ec7 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -6,6 +6,7 @@ config MIPS select ARCH_BINFMT_ELF_STATE

Re: [PATCH v2] MIPS: Check __clang__ to avoid performance influence with GCC in csum_tcpudp_nofold()

2021-03-16 Thread Tiezhu Yang
On 03/15/2021 08:42 PM, David Laight wrote: From: Tiezhu Yang Sent: 15 March 2021 12:26 On 03/15/2021 04:49 AM, Maciej W. Rozycki wrote: On Tue, 9 Mar 2021, Tiezhu Yang wrote: diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h index 1e6c135..80eddd4 100644

[PATCH v2] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again

2021-03-17 Thread Tiezhu Yang
probe_read() will not be available. This is similar with the commit d195b1d1d119 ("powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again"). Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") Signed-off-by: Tiezhu Yang --- v2: up

[PATCH] riscv: Return -EFAULT if copy_to_user() failed in signal.c

2021-03-02 Thread Tiezhu Yang
copy_to_user() returns the amount left to copy, it should return -EFAULT if copy to user failed. Signed-off-by: Tiezhu Yang --- arch/riscv/kernel/signal.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index

Re: [PATCH v2 0/3] Add some perf support for mips

2021-02-25 Thread Tiezhu Yang
, Feb 22, 2021 at 02:43:39PM +0800, Tiezhu Yang escreveu: On 02/04/2021 11:35 AM, Tiezhu Yang wrote: v2: add R26 and R27 to the enum perf_event_mips_regs in patch #1 Tiezhu Yang (3): MIPS: kernel: Support extracting off-line stack traces from user-space with perf perf tools: Support

[PATCH v2] riscv: Return -EFAULT if copy_{to,from}_user() failed in signal.c

2021-03-05 Thread Tiezhu Yang
copy_{to,from}_user() returns the amount left to copy, it should return -EFAULT error code if copy {to,from} user failed, just like the return value is an error code when {put,get}_user() failed, this is to make the return value consistent, no function change. Signed-off-by: Tiezhu Yang

Re: [PATCH] MIPS: Add comment about CONFIG_MIPS32_O32 in loongson3_defconfig when build with Clang

2021-03-03 Thread Tiezhu Yang
On 03/04/2021 10:02 AM, Nathan Chancellor wrote: On Thu, Mar 04, 2021 at 09:15:44AM +0800, Tiezhu Yang wrote: When build kernel with Clang [1]: $ make CC=clang loongson3_defconfig $ make CC=clang [snip] I think this might be a better solution. I know that I personally never read defconfig

[PATCH] MIPS: Add comment about CONFIG_MIPS32_O32 in loongson3_defconfig when build with Clang

2021-03-03 Thread Tiezhu Yang
t this bug and suggest the users to remove CONFIG_MIPS32_O32=y in defconfig when build kernel with Clang. [1] https://www.kernel.org/doc/html/latest/kbuild/llvm.html [2] https://bugs.llvm.org/show_bug.cgi?id=38063 Signed-off-by: Tiezhu Yang --- arch/mips/configs/loongson3_defconfig | 3 +++ 1 file

<    1   2   3   4   5   6   >