[PATCH v2] tty/hvc_opal: simplify if-if to if-else

2022-04-26 Thread Wan Jiabing
Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing --- Change log: v2: - add braces to the if block. --- drivers/tty/hvc/hvc_opal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index

[PATCH] tty: hvcs: simplify if-if to if-else

2022-04-24 Thread Wan Jiabing
Use if and else instead of if(A) and if (!A) and fix a coding style. Signed-off-by: Wan Jiabing --- drivers/tty/hvc/hvcs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 245da1dfd818..9b7e8246a464 100644

[PATCH] PCI/hotplug: Remove unneeded of_node_put() in pnv_php

2021-10-20 Thread Wan Jiabing
Fix following coccicheck warning: ./drivers/pci/hotplug/pnv_php.c:161:2-13: ERROR: probable double put. Device node iterators put the previous value of the index variable, so an explicit put causes a double put. Signed-off-by: Wan Jiabing --- drivers/pci/hotplug/pnv_php.c | 1 - 1 file changed

[PATCH] powerpc/kexec_file: Add of_node_put() before goto

2021-10-17 Thread Wan Jiabing
Fix following coccicheck warning: ./arch/powerpc/kexec/file_load_64.c:698:1-22: WARNING: Function for_each_node_by_type should have of_node_put() before goto Early exits from for_each_node_by_type should decrement the node reference counter. Signed-off-by: Wan Jiabing --- arch/powerpc/kexec

[PATCH] powerpc/pseries/iommu: Add of_node_put() before break

2021-10-14 Thread Wan Jiabing
Fix following coccicheck warning: ./arch/powerpc/platforms/pseries/iommu.c:924:1-28: WARNING: Function for_each_node_with_property should have of_node_put() before break Early exits from for_each_node_with_property should decrement the node reference counter. Signed-off-by: Wan Jiabing

[PATCH] PS3: Remove unneeded semicolons

2021-06-16 Thread Wan Jiabing
Fix coccicheck warning: ./arch/powerpc/platforms/ps3/system-bus.c:607:2-3: Unneeded semicolon ./arch/powerpc/platforms/ps3/system-bus.c:766:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing --- arch/powerpc/platforms/ps3/system-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] ASoC: fsl_xcvr: Remove unneeded semicolon

2021-05-05 Thread Wan Jiabing
Fix the following coccicheck warning: ./sound/soc/fsl/fsl_xcvr.c:739:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing --- sound/soc/fsl/fsl_xcvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 6cb558165848

[PATCH] [v2] selftests: powerpc: Remove unneeded variables

2021-04-12 Thread Wan Jiabing
t/alignment_handler.c:331:5-7: Unneeded variable: "rc". Return "0" on line 344 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:349:5-7: Unneeded variable: "rc". Return "0" on line 360 ./tools/testing/selftests/powerpc/alignment/alignment_handler

[PATCH] powerpc: alignment: Remove unneeded variables

2021-04-12 Thread Wan Jiabing
t/alignment_handler.c:331:5-7: Unneeded variable: "rc". Return "0" on line 344 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:349:5-7: Unneeded variable: "rc". Return "0" on line 360 ./tools/testing/selftests/powerpc/alignment/alignment_handler

[PATCH] [v2] arch: powerpc: Remove duplicate includes

2021-03-23 Thread Wan Jiabing
and move sched/cputime.h under sched including segament. Signed-off-by: Wan Jiabing --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 - arch/powerpc/kernel/interrupt.c | 1 - arch/powerpc/kernel/time.c| 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff

[PATCH] [v2] tools: testing: Remove duplicate includes

2021-03-23 Thread Wan Jiabing
sched.h has been included at line 33, so remove the duplicate one at line 36. inttypes.h has been included at line 19, so remove the duplicate one at line 23. pthread.h has been included at line 17,so remove the duplicate one at line 20. Signed-off-by: Wan Jiabing --- tools/testing/selftests

[PATCH] tools: testing: inttypes.h is included twice

2021-03-22 Thread Wan Jiabing
inttypes.h has been included at line 19. So we remove the duplicate one at line 23. Signed-off-by: Wan Jiabing --- tools/testing/selftests/powerpc/tm/tm-poison.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/tm/tm-poison.c b/tools/testing/selftests/powerpc

[PATCH] tools: testing: pthread.h is included twice

2021-03-22 Thread Wan Jiabing
pthread.h has been included at line 17. So we remove the duplicate one at line 20. Signed-off-by: Wan Jiabing --- tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c b/tools/testing/selftests

[PATCH] tools: testing: Remove duplicate include of sched.h

2021-03-22 Thread Wan Jiabing
sched.h has been included at line 33. So we remove the duplicate one at line 36. Signed-off-by: Wan Jiabing --- tools/testing/selftests/powerpc/mm/tlbie_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/mm/tlbie_test.c b/tools/testing/selftests/powerpc

[PATCH] arch: powerpc: Remove duplicate include of clock.h

2021-03-22 Thread Wan Jiabing
linux/sched/clock.h has been included at line 33. So we remove the duplicate one at line 56. For better understanding, we also move sched/cputime.h under the sched including segment. Signed-off-by: Wan Jiabing --- arch/powerpc/kernel/time.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH] arch: powerpc: Remove duplicate include of interrupt.h

2021-03-22 Thread Wan Jiabing
asm/interrupt.h has been included at line 12. According to alphabetic order,we remove the duplicate one at line 10. Signed-off-by: Wan Jiabing --- arch/powerpc/kernel/interrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel

[PATCH] arch: powerpc: bug.h is included twice

2021-03-22 Thread Wan Jiabing
asm/bug.h has been included at line 12, so remove the duplicate one at line 21. Signed-off-by: Wan Jiabing --- arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64