[PATCH -next] powerpc/eeh: fix compile warning with CONFIG_PROC_FS=n

2020-09-05 Thread Yang Yingliang
Fix the compile warning: arch/powerpc/kernel/eeh.c:1639:12: error: 'proc_eeh_show' defined but not used [-Werror=unused-function] static int proc_eeh_show(struct seq_file *m, void *v) Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/powerpc/kernel/eeh.c | 2 ++ 1 file changed

[PATCH -next] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-05 Thread Yang Yingliang
Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/powerpc/mm/book3s64/mmu_context.c | 4 arch/powerpc

Re: [PATCH -next] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-06 Thread Yang Yingliang
On 2020/9/6 14:50, Christophe Leroy wrote: Le 05/09/2020 à 13:25, Yang Yingliang a écrit : Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot

Re: [PATCH -next] tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
On 2020/9/18 19:17, Greg KH wrote: On Fri, Sep 18, 2020 at 05:20:30PM +0800, Yang Yingliang wrote: Fix the link error by selecting SERIAL_CORE_CONSOLE. aarch64-linux-gnu-ld: drivers/tty/hvc/hvc_dcc.o: in function `dcc_early_write': hvc_dcc.c:(.text+0x164): undefined reference

[PATCH -next v2] tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-19 Thread Yang Yingliang
this by selecting SERIAL_CORE_CONSOLE. Fixes: d1a1af2cdf19 ("hvc: dcc: Add earlycon support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/tty/hvc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfig index d1

[PATCH -next] tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
Fix the link error by selecting SERIAL_CORE_CONSOLE. aarch64-linux-gnu-ld: drivers/tty/hvc/hvc_dcc.o: in function `dcc_early_write': hvc_dcc.c:(.text+0x164): undefined reference to `uart_console_write' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/tty/hvc/Kconfig | 1 + 1

[PATCH -next v2] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-16 Thread Yang Yingliang
Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- v2: - enclose radix_init_pseries with CONFIG_PPC_RADIX_MMU

[PATCH -next v2 5/9] ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_micfil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 3cf789ed6cbe..8c0c75ce9490 100644

[PATCH -next v2 8/9] ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2b57b60431bb..ecbc1c365d5b 100644 --- a/sound

[PATCH -next v2 7/9] ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_spdif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 2a76714eb8e6..d812a3ff5845 100644

[PATCH -next v2 1/9] ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_asrc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 0e1ad8efebd3..24b41881a68f 100644 --- a/sound

[PATCH -next v2 0/9] ASoC: fsl: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
patch #1 ~ #8: Use devm_platform_get_and_ioremap_resource() patch #9 check return value of platform_get_resource_byname() v2: change error message in patch #9 Yang Yingliang (9): ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_aud2htx: Use

[PATCH -next v2 4/9] ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_esai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index f356ae5925af..a961f837cd09 100644 --- a/sound

[PATCH -next v2 3/9] ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_easrc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index b1765c7d3bcd..19c3c3b5939e 100644

[PATCH -next v2 6/9] ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_sai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 407a45e48eee..223fcd15bfcc 100644 --- a/sound

[PATCH -next v2 2/9] ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()

2021-06-14 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_aud2htx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c index a328697511f7..99ab7f0241cf 100644

[PATCH -next v2 9/9] ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()

2021-06-14 Thread Yang Yingliang
It will cause null-ptr-deref if platform_get_resource_byname() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_xcvr.c | 4 1 file changed, 4 insertions(+) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index df7c189d97dd

[PATCH -next 7/9] ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_spdif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 2a76714eb8e6..d812a3ff5845 100644

[PATCH -next 4/9] ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_esai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index f356ae5925af..a961f837cd09 100644 --- a/sound

[PATCH -next 3/9] ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_easrc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index b1765c7d3bcd..19c3c3b5939e 100644

[PATCH -next 0/9] ASoC: fsl: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
patch #1 ~ #8: Use devm_platform_get_and_ioremap_resource() patch #9 check return value of platform_get_resource_byname() Yang Yingliang (9): ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource() ASoC: fsl_easrc

[PATCH -next 2/9] ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_aud2htx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c index a328697511f7..99ab7f0241cf 100644

[PATCH -next 6/9] ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_sai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 407a45e48eee..223fcd15bfcc 100644 --- a/sound

[PATCH -next 1/9] ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_asrc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 0e1ad8efebd3..24b41881a68f 100644 --- a/sound

[PATCH -next 9/9] ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname()

2021-06-11 Thread Yang Yingliang
It will cause null-ptr-deref if platform_get_resource_byname() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_xcvr.c | 4 1 file changed, 4 insertions(+) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index df7c189d97dd

[PATCH -next 8/9] ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2b57b60431bb..ecbc1c365d5b 100644 --- a/sound

[PATCH -next 5/9] ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()

2021-06-11 Thread Yang Yingliang
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang --- sound/soc/fsl/fsl_micfil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 3cf789ed6cbe..8c0c75ce9490 100644

[PATCH] powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()

2022-10-16 Thread Yang Yingliang
If remapping 'data->trig_page' fails, the 'data->eoi_mmio' need be unmapped before returning from xive_spapr_populate_irq_data(). Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Yang Yingliang --- arch/powerpc/sysdev/

[PATCH] macintosh: fix possible memory leak in macio_add_one_device()

2022-10-22 Thread Yang Yingliang
in macio_release_dev(), so the kfree() can be removed. Signed-off-by: Yang Yingliang --- drivers/macintosh/macio_asic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 1ec1e5984563..3bc1f374e657 100644 --- a/drivers

[PATCH] ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()

2022-10-26 Thread Yang Yingliang
freed in i2sbus_release_dev(), so it can return 0 directly. Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa") Signed-off-by: Yang Yingliang --- sound/aoa/soundbus/i2sbus/core.c | 4 1 file changed, 4 insertions(+) diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/sound

[PATCH v2] powerpc/fsl_rio: add missing of_node_put() in fsl_rio_setup()

2022-10-29 Thread Yang Yingliang
The of node returned by of_find_compatible_node() or for_each_child_of_node() with refcount decremented, of_node_put() need be called after using it to avoid refcount leak. Fixes: abc3aeae3aaa ("fsl-rio: Add two ports and rapidio message units support") Signed-off-by: Yang Yingliang --

[PATCH v2] powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()

2022-10-29 Thread Yang Yingliang
If platform_device_add() is not called or failed, it can not call platform_device_del() to clean up memory, it should call platform_device_put() in error case. Fixes: 26f6cb999366 ("[POWERPC] fsl_soc: add support for fsl_spi") Signed-off-by: Yang Yingliang --- v1 -> v2: Correct

Re: [PATCH] ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()

2022-10-27 Thread Yang Yingliang
On 2022/10/27 14:38, Takashi Iwai wrote: On Thu, 27 Oct 2022 03:34:38 +0200, Yang Yingliang wrote: dev_set_name() in soundbus_add_one() allocates memory for name, it need be freed when of_device_register() fails, call soundbus_dev_put() to give up the reference that hold in device_initialize

Re: [PATCH v2] powerpc/fsl_rio: add missing of_node_put() in fsl_rio_setup()

2022-11-02 Thread Yang Yingliang
On 2022/11/2 21:45, Christophe Leroy wrote: Le 29/10/2022 à 14:26, Yang Yingliang a écrit : The of node returned by of_find_compatible_node() or for_each_child_of_node() with refcount decremented, of_node_put() need be called after using it to avoid refcount leak. Is that necessary to do

[PATCH -next] powerpc/64s/hash: change stress_hpt_timer_fn to static

2022-12-28 Thread Yang Yingliang
stress_hpt_timer_fn is only used in hash_utils.c now, change it to static. Fixes: 6b34a099faa1 ("powerpc/64s/hash: add stress_hpt kernel boot option to increase hash faults") Signed-off-by: Yang Yingliang --- arch/powerpc/mm/book3s64/hash_utils.c | 2 +- 1 file changed, 1 inser

[PATCH] macintosh/macio-adb: add missing iounmap() on error in macio_init()

2023-01-04 Thread Yang Yingliang
Add missing iounmap(), if request_irq() fails. Signed-off-by: Yang Yingliang --- drivers/macintosh/macio-adb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c index 55a9f8c3a150..779f1268286e 100644 --- a/drivers/macintosh/macio

[PATCH v3] powerpc/fsl_rio: add missing of_node_put() in fsl_rio_setup()

2022-11-24 Thread Yang Yingliang
The of node returned by of_find_compatible_node() with refcount decremented, of_node_put() need be called after using it to avoid refcount leak. Fixes: abc3aeae3aaa ("fsl-rio: Add two ports and rapidio message units support") Signed-off-by: Yang Yingliang --- v2 -> v3: dro

Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Yang Yingliang
On 2022/11/21 14:31, Andrew Donnellan wrote: On Sat, 2022-11-19 at 22:44 +0800, Yang Yingliang wrote: As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, so when finish using it, pci_dev_put() needs be called. In get_dvsec_vendor0(), in normal

Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Yang Yingliang
Hi, On 2022/11/21 14:28, Christophe Leroy wrote: Le 19/11/2022 à 15:44, Yang Yingliang a écrit : As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, so when finish using it, pci_dev_put() needs be called. In get_dvsec_vendor0(), in normal path

[PATCH v2] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-21 Thread Yang Yingliang
unconditionally. And add comment above get_dvsec_vendor0() to tell callers to call pci_dev_put(). Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is reloaded on a link reset") Suggested-by: Andrew Donnellan Signed-off-by: Yang Yingliang --- v1 -> v2: Add

[PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-19 Thread Yang Yingliang
, in error path, pci_dev_put() also needs be called. pci_get_domain_bus_and_slot() is called when PCI_FUNC() returns non-zero, check this before put. Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is reloaded on a link reset") Signed-off-by: Yang Yingliang --- drivers/misc/ocx

[PATCH] powerpc/imc-pmu: use GFP_ATOMIC under spin_lock()

2023-01-15 Thread Yang Yingliang
After commit 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section"), init_nest_pmu_ref() is called under spin_lock(), use GFP_ATOMIC while calling kcalloc(). Fixes: 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section") Signed-of

[PATCH v2] macintosh: fix possible memory leak in macio_add_one_device()

2022-11-03 Thread Yang Yingliang
n be freed in kobject_cleanup() when the refcount hit to 0. macio device is freed in macio_release_dev(), so the kfree() can be removed. Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Christophe Leroy

Re: [PATCH] misc: ocxl: fix possible name leak in ocxl_file_register_afu()

2022-11-14 Thread Yang Yingliang
Hi, On 2022/11/14 19:23, Frederic Barrat wrote: On 11/11/2022 15:59, Yang Yingliang wrote: If device_register() returns error in ocxl_file_register_afu(), the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up

[PATCH] misc: ocxl: fix possible name leak in ocxl_file_register_afu()

2022-11-11 Thread Yang Yingliang
in kobject_cleanup(), and info is freed in info_release(). Fixes: 75ca758adbaf ("ocxl: Create a clear delineation between ocxl backend & frontend") Signed-off-by: Yang Yingliang --- drivers/misc/ocxl/file.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dri

[PATCH 2/2] cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

2022-11-11 Thread Yang Yingliang
the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails. Fixes: f204e0b8cedd ("cxl: Driver code for powernv PCIe based cards for userspace access") Signed-off-by: Yang Yingliang --- drivers/misc/cxl/

[PATCH 1/2] cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()

2022-11-11 Thread Yang Yingliang
the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails. Fixes: 14baf4d9c739 ("cxl: Add guest-specific code") Signed-off-by: Yang Yingliang --- drivers/misc/cxl/guest.c | 24 ++-- 1 fi

[PATCH] soc: fsl: cpm1: qmc: fix error return code in qmc_probe()

2023-11-28 Thread Yang Yingliang
If platform_get_irq() fails, it need return error code in qmc_probe(). Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Yang Yingliang --- drivers/soc/fsl/qe/qmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qmc.c