[PATCH -next] powerpc/powernv/sriov: Remove unused but set variable 'phb'

2020-07-27 Thread Wei Yongjun
eported-by: Hulk Robot Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/powernv/pci-sriov.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-sriov.c b/arch/powerpc/platforms/powernv/pci-sriov.c index 8404d8c3901d..7894745fd4f8 100644 --- a/arch/powerpc

[PATCH -next] powerpc/papr_scm: Make some symbols static

2020-07-25 Thread Wei Yongjun
ic? Those variables are not used outside of papr_scm.c, so this commit marks them static. Fixes: 85343a8da2d9 ("powerpc/papr/scm: Add bad memory ranges to nvdimm bad ranges") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/pseries/papr_scm.c | 4 ++--

[PATCH -next] PCI: rpadlpar: Make some functions static

2020-07-21 Thread Wei Yongjun
Should it be static? drivers/pci/hotplug/rpadlpar_core.c:473:6: warning: symbol 'rpadlpar_io_exit' was not declared. Should it be static? Those functions are not used outside of this file, so marks them static. Also mark rpadlpar_io_exit() as __exit. Reported-by: Hulk Robot Signed-off-by:

[PATCH -next] cpuidle/pseries: Make symbol 'pseries_idle_driver' static

2020-07-14 Thread Wei Yongjun
The sparse tool complains as follows: drivers/cpuidle/cpuidle-pseries.c:25:23: warning: symbol 'pseries_idle_driver' was not declared. Should it be static? 'pseries_idle_driver' is not used outside of this file, so marks it static. Reported-by: Hulk Robot Signed

[PATCH -next] cpufreq: powernv: Make some symbols static

2020-07-14 Thread Wei Yongjun
used outside of this file, so mark them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/cpufreq/powernv-cpufreq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index

[PATCH -next] ocxl: Fix return value check in afu_ioctl()

2019-05-04 Thread Wei Yongjun
t;) Signed-off-by: Wei Yongjun --- drivers/misc/ocxl/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c index 8aa22893ed76..2870c25da166 100644 --- a/drivers/misc/ocxl/file.c +++ b/drivers/misc/ocxl/file.c @@ -25

[PATCH -next] ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait()

2018-06-05 Thread Wei Yongjun
Add the missing unlock before return from function afu_ioctl_enable_p9_wait() in the error handling case. Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9") Signed-off-by: Wei Yongjun --- drivers/misc/ocxl/file.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH -next] powerpc: Fix error return code in ppc4xx_msi_probe()

2018-03-26 Thread Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/4xx/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/4xx/msi.c b/arch

[PATCH -next v2] ipmi/powernv: Fix error return code in ipmi_powernv_probe()

2018-01-17 Thread Wei Yongjun
Fix to return a negative error code from the request_irq() error handling case instead of 0, as done elsewhere in this function. Fixes: dce143c3381c ("ipmi/powernv: Convert to irq event interface") Signed-off-by: Wei Yongjun --- v1 -> v2: add fixes. --- drivers/char/ipmi/ipmi_

[PATCH -next] ipmi/powernv: Fix error return code in ipmi_powernv_probe()

2018-01-17 Thread Wei Yongjun
Fix to return a negative error code from the request_irq() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/char/ipmi/ipmi_powernv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/char/ipmi

[PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function __ibmvnic_reset() in the error handling case. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) di

[PATCH -next v2] KVM: PPC: fix error return code in kvm_vm_ioctl_create_spapr_tce()

2017-02-08 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENOMEM from the memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/powerpc/kvm/book3s_64_vio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_64_vio.c b

[PATCH -next] KVM: PPC: Fix error return code in kvm_vm_ioctl_create_spapr_tce()

2017-02-07 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENOMEM from the memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/powerpc/kvm/book3s_64_vio.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH -next] powerpc/pseries: Fix typo in parameter description

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun Fix typo in parameter description. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/pseries/cmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index 66e7227..7af18da

[PATCH -next] KVM: PPC: Book3S HV: Use list_move_tail instead of list_del/list_add_tail

2016-10-17 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun --- arch/powerpc/kvm/book3s_hv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 3686471

[PATCH -next] PCI: layerscape: Remove redundant dev_err call in ls_pcie_probe()

2016-10-17 Thread Wei Yongjun
From: Wei Yongjun There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/pci/host/pci-layerscape.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci

[PATCH -next] powerpc/4xx: Fix error return code in ppc4xx_msi_probe()

2016-09-28 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code from the ppc4xx_setup_pcieh_hw() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/powerpc/sysdev/ppc4xx_msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH -next] scsi: ibmvfc: fix typo in parameter description

2016-09-08 Thread Wei Yongjun
From: Wei Yongjun Fix typo in parameter description. Signed-off-by: Wei Yongjun --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 6b92169..56b9f45 100644 --- a/drivers

[PATCH -next] ibmvnic: convert to use simple_open()

2016-08-24 Thread Wei Yongjun
From: Wei Yongjun Remove an open coded simple_open() function and replace file operations references to the function with simple_open() instead. Generated by: scripts/coccinelle/api/simple_open.cocci Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 18 ++ 1

[PATCH -next] ibmvnic: fix error return code in ibmvnic_probe()

2016-08-24 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENOMEM from the dma_map_single error handling case instead of 0, as done elsewhere in this function. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 1

[PATCH -next] wan/fsl_ucc_hdlc: remove .owner field for driver

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/net/wan/fsl_ucc_hdlc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c

[PATCH -next] wan/fsl_ucc_hdlc: use module_platform_driver to simplify the code

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun --- drivers/net/wan/fsl_ucc_hdlc.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan

[PATCH v2] ibmvnic: fix to use list_for_each_safe() when delete items

2016-06-21 Thread Wei Yongjun
Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each() macro aptly named list_for_each_safe(). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

Re: [PATCH] ibmvnic: fix to use list_for_each_safe() when delete items

2016-06-21 Thread Wei Yongjun
Hi Thomas Falcon, Thanks for found this. I will send new patch include your changes. Regards, Yongjun Wei On 06/22/2016 12:01 AM, Thomas Falcon wrote: On 06/20/2016 10:50 AM, Thomas Falcon wrote: On 06/17/2016 09:53 PM, weiyj...@163.com wrote: From: Wei Yongjun Since we will remove items

[PATCH -next] ASoC: fsl-ssi: Add missing clk_disable_unprepare() on error in fsl_ssi_probe()

2014-01-09 Thread Wei Yongjun
From: Wei Yongjun Add the missing clk_disable_unprepare() before return from fsl_ssi_probe() in the request irq error handling case. Signed-off-by: Wei Yongjun --- sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc

[PATCH] mv643xx_eth: fix return value check in mv64x60_eth_register_shared_pdev()

2013-10-25 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function platform_device_register_simple() returns RR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- arch/powerpc/sysdev/mv64x60_dev.c | 2 +- 1 file changed, 1

[PATCH] ASoC: fsl_spdif: fix return value check in fsl_spdif_probe()

2013-10-25 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function platform_get_resource() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun --- sound/soc/fsl/fsl_spdif.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] ppc-6xx: add missing iounmap() on error in hlwd_pic_init()

2013-10-12 Thread Wei Yongjun
From: Wei Yongjun Add the missing iounmap() before return from hlwd_pic_init() in the error handling case. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch

[PATCH -next] ASoC: fsl_spdif: remove redundant dev_err call in fsl_spdif_probe()

2013-08-28 Thread Wei Yongjun
From: Wei Yongjun There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- sound/soc/fsl/fsl_spdif.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/fsl

[PATCH] powerpc/fsl_msi: fix error return code in fsl_of_msi_probe()

2013-05-07 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code in the MSI bitmap alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- arch/powerpc/sysdev/fsl_msi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH -next] kvm/ppc/mpic: fix missing unlock in set_base_addr()

2013-05-01 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function set_base_addr() when disables the mapping. Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21 (kvm/ppc/mpic: in-kernel MPIC emulation) Signed-off-by: Wei Yongjun --- arch/powerpc/kvm/mpic.c | 2 +- 1 file changed

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

2013-03-11 Thread Wei Yongjun
From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun --- arch/powerpc/include/asm/parport.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h

[PATCH -next] powerpc/82xx: use for_each_compatible_node() macro

2012-12-03 Thread Wei Yongjun
From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/82xx/pq2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c

[PATCH -next] [POWERPC] celleb: use for_each_compatible_node() macro

2012-12-03 Thread Wei Yongjun
From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/cell/celleb_scc_sio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/cell/celleb_scc_sio.c b/arch/powerpc

[PATCH -next] TTY: hvsi: use for_each_compatible_node() macro

2012-12-03 Thread Wei Yongjun
From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun --- drivers/tty/hvc/hvsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index 5b95b4f..70e0ef7 100644 --- a

[PATCH -next] powerpc/85xx: use for_each_compatible_node() macro

2012-12-03 Thread Wei Yongjun
From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms

[PATCH] powerpc/windfarm: use for_each_node_by_type() macro

2012-12-02 Thread Wei Yongjun
From: Wei Yongjun Use for_each_node_by_type() macro instead of open coding it. Signed-off-by: Wei Yongjun --- drivers/macintosh/windfarm_rm31.c | 2 +- drivers/macintosh/windfarm_pm72.c | 2 +- drivers/macintosh/windfarm_pm112.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH] TTY: hvcs: fix missing unlock on error in hvcs_initialize()

2012-10-21 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock on the error handling path in function hvcs_initialize(). Signed-off-by: Wei Yongjun --- drivers/tty/hvc/hvcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index cab5c7a

[PATCH] powerpc/windfarm: use module_i2c_driver to simplify the code

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/macintosh/windfarm_smu_sat.c| 13 + drivers

[PATCH] powerpc/83xx: use module_i2c_driver to simplify the code

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 12 +--- 1 file changed

[PATCH] powerpc/powernv: move the dereference below the NULL test

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/powernv/pci.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

Re: [PowerPC] Next May 8 boot failure: OOPS during ibmveth moduleinit

2009-05-12 Thread Wei Yongjun
Stephen Rothwell wrote: Hi Dave, This fixes it (I wonder if this bug is lurking in any other drivers): Yes, there are some other exists. This spatch script can help to found this. (http://www.emn.fr/x-info/coccinelle/) # cat netdev_dev_addr.cocci @@ struct net_device *dev; @@ memcpy( - &de