[PATCH] powerpc: Use ARRAY_SIZE for array length

2023-11-22 Thread Jiapeng Chong
Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./arch/powerpc/xmon/ppc-opc.c:957:67-68: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7612 Signed-off-by: Jiapeng Chong

[PATCH] powerpc/fadump: Use swap() instead of open coding it

2022-01-28 Thread Jiapeng Chong
Clean the following coccicheck warning: ./arch/powerpc/kernel/fadump.c:1291:34-35: WARNING opportunity for swap(). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/fadump.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/powerpc

[PATCH] powerpc/interrupts: Fix duplicate included asm/interrupt.h

2021-06-21 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/kernel/interrupt.c: asm/interrupt.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/interrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch

[PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/perf/req-gen/perf.h: _clear.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/perf/req-gen/perf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch

[PATCH] powerpc: Fix duplicate included linux/sched/clock.h

2021-06-07 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/kernel/time.c: linux/sched/clock.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/time.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch

[PATCH] selftests/powerpc: Fix duplicate included pthread.h

2021-05-13 Thread Jiapeng Chong
Clean up the following includecheck warning: ./tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c: pthread.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c | 1 - 1 file changed

[PATCH] powerpc/xive: Fix unsigned comparison with less than zero

2021-05-07 Thread Jiapeng Chong
coccicheck warning: ./arch/powerpc/sysdev/xive/common.c:1157:6-14: WARNING: Unsigned expression compared with zero: xid -> irq < 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/sysdev/xive/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2] soc: fsl: qe: Remove unused function

2021-04-21 Thread Jiapeng Chong
c_from_irq' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Modified submission information. drivers/soc/fsl/qe/qe_ic.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c index 0390af9..b573

Re: [PATCH] soc: fsl: qe: remove unused function

2021-04-21 Thread Jiapeng Chong
'qe_ic_from_irq' [-Wunused-function]. Would be wise to tell that the last users of the function where removed by commit d7c2878cfcfa ("soc: fsl: qe: remove unused qe_ic_set_* functions") https://github.com/torvalds/linux/commit/d7c2878cfcfa Reported-by: Abaci Robot Signed-off-b

[PATCH] soc: fsl: qe: remove unused function

2021-04-15 Thread Jiapeng Chong
Fix the following clang warning: drivers/soc/fsl/qe/qe_ic.c:234:29: warning: unused function 'qe_ic_from_irq' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/soc/fsl/qe/qe_ic.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/soc/fsl/qe

[PATCH] powerpc/iommu/debug: Remove redundant NULL check

2021-03-22 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./fs/io_uring.c:5989:4-9: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch

[PATCH v2] sched: replace if (cond) BUG() with WARN_ON()

2021-03-17 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/platforms/cell/spufs/sched.c:908:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - replace BUG with WARN_ON. arch/powerpc/platforms/cell/spufs

[PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/platforms/cell/spufs/sched.c:908:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/platforms/cell/spufs/sched.c | 3 +-- 1 file changed, 1 insertion

[PATCH] powerpc/pci: fix warning comparing pointer to 0

2021-03-15 Thread Jiapeng Chong
Fix the following coccicheck warning: ./arch/powerpc/platforms/maple/pci.c:37:16-17: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/platforms/maple/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc

[PATCH v2] ide: fix warning comparing pointer to 0

2021-03-11 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/ide/pmac.c:1680:38-39: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- Changes in v2: - Modified if condition. drivers/ide/pmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] ide: fix warning comparing pointer to 0

2021-03-11 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/ide/pmac.c:1680:38-39: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/ide/pmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index

[PATCH] powerpc/prom: remove unneeded semicolon

2021-03-11 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/kernel/prom_init.c:2986:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom_init.c

[PATCH] powerpc: fix warning comparing pointer to 0

2021-03-09 Thread Jiapeng Chong
Fix the following coccicheck warning: ./arch/powerpc/platforms/powermac/pfunc_core.c:688:40-41: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/platforms/powermac/pfunc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

2021-03-04 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:60-61: WARNING opportunity for kobj_to_dev(). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi

[PATCH] powerpc: remove unneeded semicolon

2021-02-23 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/kernel/prom_init.c:2986:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom_init.c

[PATCH] powerpc/xive: Assign boolean values to a bool variable

2021-02-06 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/kvm/book3s_xive.c:1856:2-17: WARNING: Assignment of 0/1 to bool variable. ./arch/powerpc/kvm/book3s_xive.c:1854:2-17: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kvm

[PATCH] scsi: ibmvfc: convert sysfs sprintf/snprintf family to sysfs_emit

2021-02-02 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/scsi/ibmvscsi/ibmvfc.c: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/scsi/ibmvscsi/ibmvfc.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers