[PATCH linux-next] macintosh/windfarm: fix comparing pointer to 0

2022-09-18 Thread cgel . zte
From: Xu Panda Comparing pointer whith NULL instead of comparing pointer to 0. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- drivers/macintosh/windfarm_pm121.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/windfarm_pm121.c

[PATCH linux-next] ocxl: Remove the unneeded result variable

2022-09-06 Thread cgel . zte
From: ye xingchen Return the value opal_npu_spa_clear_cache() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- arch/powerpc/platforms/powernv/ocxl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH linux-next] crypto: nx - Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: ye xingchen Return the value set_msg_len() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/crypto/nx/nx-aes-ccm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH linux-next] crypto: nx: remove redundant variable rc

2022-08-31 Thread cgel . zte
From: Jinpeng Cui Return value directly from set_msg_len() instead of getting value from redundant variable rc. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui --- drivers/crypto/nx/nx-aes-ccm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH linux-next] powerpc/pseries/vas: Remove the unneeded result variable

2022-08-25 Thread cgel . zte
From: ye xingchen Return the value vas_register_coproc_api() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- arch/powerpc/platforms/pseries/vas.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

[PATCH linux-next] macintosh:adb:recordmcount:use !E in conditional statements

2022-07-31 Thread cgel . zte
From: ye xingchen Use !E to replace the type of x == 0. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/macintosh/adb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH V2] ASoC: imx-audmux: remove unnecessary check of clk_disable_unprepare/clk_prepare_enable

2022-06-05 Thread cgel . zte
From: Minghao Chi Because clk_disable_unprepare/clk_prepare_enable already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- v1->v2: remove the check of audmux_clk before

[PATCH] ASoC: imx-audmux: remove unnecessary check of clk_disable_unprepare

2022-06-02 Thread cgel . zte
From: Minghao Chi Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- sound/soc/fsl/imx-audmux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-)

[PATCH] powerpc/fsl_msi: fix return error value in error handing path

2022-04-24 Thread cgel . zte
From: Lv Ruyi This function fsl_msi_setup_hwirq() seems to return zero on success and non-zero on failure, but it returns zero in error handing path. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- arch/powerpc/sysdev/fsl_msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] ASoC: fsl_asrc: using pm_runtime_resume_and_get to simplify the code

2022-04-19 Thread cgel . zte
From: Minghao Chi Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- sound/soc/fsl/fsl_asrc.c | 6 ++ 1 file changed, 2

[PATCH] ASoC: fsl_sai: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

2022-04-14 Thread cgel . zte
From: Minghao Chi Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- sound/soc/fsl/fsl_sai.c | 6 ++ 1 file changed, 2

[PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

2022-04-12 Thread cgel . zte
From: Minghao Chi Using pm_runtime_resume_and_get is more appropriate for simplifing code Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- sound/soc/fsl/fsl_esai.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c

[PATCH] powerpc/powernv: fix missing of_node_put in uv_init()

2022-04-07 Thread cgel . zte
From: Lv Ruyi of_find_compatible_node() returns node pointer with refcount incremented, use of_node_put() on it when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- arch/powerpc/platforms/powernv/ultravisor.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] powerpc/sysdev: fix refcount leak in icp_opal_init()

2022-04-01 Thread cgel . zte
From: Lv Ruyi The of_find_compatible_node() function returns a node pointer with refcount incremented, use of_node_put() on it when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- arch/powerpc/sysdev/xics/icp-opal.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] powerpc/sysdev: Use of_device_get_match_data()

2022-03-03 Thread cgel . zte
From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- arch/powerpc/sysdev/fsl_msi.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch

[PATCH V2] platforms/83xx: Use of_device_get_match_data()

2022-02-24 Thread cgel . zte
From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. v1->v2: Add a judgment on the return value of the A function as NULL Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- arch/powerpc/platforms/83xx/suspend.c | 7 ++- 1 file chan

[PATCH] platforms/83xx: Use of_device_get_match_data()

2022-02-20 Thread cgel . zte
From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- arch/powerpc/platforms/83xx/suspend.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/83xx

[PATCH] drivers/macintosh/ams: remove unneeded result variable

2022-01-17 Thread cgel . zte
From: Minghao Chi Return value from i2c_add_driver() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/macintosh/ams/ams-i2c.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH v2] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-12-22 Thread cgel . zte
From: Changcheng Deng Fix the following coccicheck warning: ./arch/powerpc/platforms/cell/axon_msi.c: 456: 0-23: WARNING: fops_msic should be defined with DEFINE_DEBUGFS_ATTRIBUTE DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() imposes some significant overhead as compared to

[PATCH] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-12-21 Thread cgel . zte
From: Changcheng Deng Fix the following coccicheck warning: ./arch/powerpc/platforms/cell/axon_msi.c: 456: 0-23: WARNING: fops_msic should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Reported-by: Zeal Robot

[PATCH misc-next] drivers/misc: remove redundant rc variable

2021-12-14 Thread cgel . zte
From: Minghao Chi Return value from ocxl_context_attach() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/misc/ocxl/file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH] ASoC: imx-hdmi: add put_device() after of_find_device_by_node()

2021-11-09 Thread cgel . zte
From: Ye Guojin This was found by coccicheck: ./sound/soc/fsl/imx-hdmi.c,209,1-7,ERROR missing put_device; call of_find_device_by_node on line 119, but without a corresponding object release within this function. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- sound/soc/fsl/imx-hdmi.c

[PATCH] powerpc: xmon: remove the duplicated operand of the bitwise operator

2021-11-04 Thread cgel . zte
From: Ye Guojin The operands of the bitwise OR operator are duplicated, remove one of them. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- arch/powerpc/xmon/ppc-opc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/xmon/ppc-opc.c

[PATCH] scsi: ibmvfc: replace snprintf in show functions with sysfs_emit

2021-11-04 Thread cgel . zte
From: Jing Yao coccicheck complains about the use of snprintf() in sysfs show functions: WARNING use scnprintf or sprintf Use sysfs_emit instead of scnprintf or sprintf makes more sense. Reported-by: Zeal Robot Signed-off-by: Jing Yao --- drivers/scsi/ibmvscsi/ibmvfc.c | 16

[PATCH v2] drivers: scsi: replace snprintf in show functions with sysfs_emit

2021-11-02 Thread cgel . zte
From: Jing Yao coccicheck complains about the use of snprintf() in sysfs show functions: WARNING use scnprintf or sprintf Use sysfs_emit instead of scnprintf or sprintf makes more sense. Reported-by: Zeal Robot Signed-off-by: Jing Yao --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 ++-- 1

[PATCH] powerpc/xmon: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-11-01 Thread cgel . zte
From: Changcheng Deng Fix the following coccicheck warning: ./arch/powerpc/xmon/xmon.c: 4064: 0-23: WARNING: xmon_dbgfs_ops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- arch/powerpc/xmon/xmon.c | 2 +- 1 file changed, 1

[PATCH] drivers: scsi: replace snprintf in show functions with sysfs_emit

2021-10-28 Thread cgel . zte
From: Jing Yao Reported-by: Zeal Robot Signed-off-by: Jing Yao --- drivers/scsi/ibmvscsi/ibmvfc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index d0eab5700dc5..9f20fefc2c02 100644 ---

[PATCH] scsi: ibmvfc: replace scnprintf in show functions with sysfs_emit

2021-10-27 Thread cgel . zte
From: Changcheng Deng Fix the coccicheck warning: WARNING: use scnprintf or sprintf Use sysfs_emit instead of scnprintf or sprintf makes more sense. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/scsi/ibmvscsi/ibmvfc.c | 16 ++-- 1 file changed, 6

[PATCH linux-next] module: remove duplicate include in interrupt.c

2021-08-16 Thread cgel . zte
From: Lv Ruyi 'asm/interrupt.h' included in 'interrupt.c' is duplicated. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- arch/powerpc/kernel/interrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index

[PATCH linux-next] powerpc/tm: remove duplicate include in tm-poison.c

2021-08-05 Thread cgel . zte
From: yong yiran 'inttypes.h' included in 'tm-poison.c' is duplicated. Remove all but the first include of inttypes.h from tm-poison.c. Reported-by: Zeal Robot Signed-off-by: yong yiran --- tools/testing/selftests/powerpc/tm/tm-poison.c | 1 - 1 file changed, 1 deletion(-) diff --git