Re: [PATCH stable v5.10 0/7] arm64: Default to 32-bit wide ZONE_DMA

2021-03-07 Thread Jing Xiangfeng
: On Wed, Mar 03, 2021 at 03:33:12PM +0800, Jing Xiangfeng wrote: Using two distinct DMA zones turned out to be problematic. Here's an attempt go back to a saner default. What problem does this solve? How does this fit into the stable kernel rules? We changed the way we setup memory zones in arm64

[PATCH stable v5.10 5/7] arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges

2021-03-03 Thread Jing Xiangfeng
of the Raspberry Pi 4 it'll only span the 30-bit address space, and have ZONE_DMA32 cover the rest of the 32-bit address space. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201119175400.9995-6-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing

[PATCH stable v5.10 6/7] arm64: mm: Set ZONE_DMA size based on early IORT scan

2021-03-03 Thread Jing Xiangfeng
/20201119175400.9995-7-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng --- arch/arm64/mm/init.c | 5 +++- drivers/acpi/arm64/iort.c | 55 +++ include/linux/acpi_iort.h | 4 +++ 3 files changed, 63 insertions(+), 1

[PATCH stable v5.10 3/7] of/address: Introduce of_dma_get_max_cpu_address()

2021-03-03 Thread Jing Xiangfeng
. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201119175400.9995-4-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng --- drivers/of/address.c | 42 ++ include/linux

[PATCH stable v5.10 7/7] mm: Remove examples from enum zone_type comment

2021-03-03 Thread Jing Xiangfeng
Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20201119175400.9995-8-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng --- include/linux/mmzone.h | 20 1 file changed, 20 deletions

[PATCH stable v5.10 4/7] of: unittest: Add test for of_dma_get_max_cpu_address()

2021-03-03 Thread Jing Xiangfeng
/r/20201119175400.9995-5-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng --- drivers/of/unittest.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 06cc988faf78..98cc0163301b 100644

[PATCH stable v5.10 1/7] arm64: mm: Move reserve_crashkernel() into mem_init()

2021-03-03 Thread Jing Xiangfeng
. Specifically into bootmem_init() since request_standard_resources() depends on it. Signed-off-by: Nicolas Saenz Julienne Tested-by: Jeremy Linton Link: https://lore.kernel.org/r/20201119175400.9995-2-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng

[PATCH stable v5.10 2/7] arm64: mm: Move zone_dma_bits initialization into zone_sizes_init()

2021-03-03 Thread Jing Xiangfeng
-by: Jeremy Linton Link: https://lore.kernel.org/r/20201119175400.9995-3-nsaenzjulie...@suse.de Signed-off-by: Catalin Marinas Cc: Signed-off-by: Jing Xiangfeng --- arch/arm64/mm/init.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c

[PATCH stable v5.10 0/7] arm64: Default to 32-bit wide ZONE_DMA

2021-03-03 Thread Jing Xiangfeng
Using two distinct DMA zones turned out to be problematic. Here's an attempt go back to a saner default. Ard Biesheuvel (1): arm64: mm: Set ZONE_DMA size based on early IORT scan Nicolas Saenz Julienne (6): arm64: mm: Move reserve_crashkernel() into mem_init() arm64: mm: Move zone_dma_bits

[PATCH] scsi: storvsc: Fix error return in storvsc_probe()

2020-11-26 Thread Jing Xiangfeng
Fix to return a error code "-ENOMEM" from the error handling case instead of 0. Fixes: 436ad9413353 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun") Signed-off-by: Jing Xiangfeng --- drivers/scsi/storvsc_drv.c | 4 +++- 1 file changed, 3 inser

[PATCH] memstick: r592: Fix error return in r592_probe()

2020-11-24 Thread Jing Xiangfeng
Fix to return a error code from the error handling case instead of 0. Fixes: 926341250102 ("memstick: add driver for Ricoh R5C592 card reader") Signed-off-by: Jing Xiangfeng --- drivers/memstick/host/r592.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH] staging: olpc_dcon: Do not call platform_device_unregister() in dcon_probe()

2020-11-19 Thread Jing Xiangfeng
In dcon_probe(), when platform_device_add() failes to add the device, it jumps to call platform_device_unregister() to remove the device, which is unnecessary. So use platform_device_put() instead. Fixes: 53c43c5ca133 ("Revert "Staging: olpc_dcon: Remove obsolete driver"")

[PATCH] Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware()

2020-11-16 Thread Jing Xiangfeng
btusb_mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to err_release_fw to fix it. Fixes: f645125711c8 ("Bluetooth: btusb: fix up firmware download sequence") Signed-off-by: Jing Xiangfeng --- drivers/bluetooth/btusb.c | 2 +- 1 file changed, 1 inser

[PATCH] Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware()

2020-11-16 Thread Jing Xiangfeng
mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to free_fw to fix it. Fixes: 737cd06072a7 ("Bluetooth: btmtksdio: fix up firmware download sequence") Signed-off-by: Jing Xiangfeng --- drivers/bluetooth/btmtksdio.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] scsi: aacraid: Correct goto target in aac_resume()

2020-11-11 Thread Jing Xiangfeng
In current code, it jumps to call pci_disable_device() when pci_enable_device() failes to initialize device. Add a label 'fail_enable' to fix it. Fixes: de665f28f788 ("aacraid: Add Power Management support") Signed-off-by: Jing Xiangfeng --- drivers/scsi/aacraid/linit.c | 5 +++

[PATCH] staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c

2020-11-11 Thread Jing Xiangfeng
aging: Gasket driver framework + Apex driver") Signed-off-by: Jing Xiangfeng --- drivers/staging/gasket/gasket_interrupt.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/gasket_interrupt.c b/drivers/staging/gasket/gasket_interru

[PATCH] HID: intel-ish-hid: Remove unnecessary assignment to variable rv

2020-11-09 Thread Jing Xiangfeng
This assignment to rv is unused in an error path. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/hid/intel-ish-hid/ishtp-hid.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c index

[PATCH v2] mfd: htc-i2cpld: Add the missed i2c_put_adapter() in htcpld_register_chip_i2c()

2020-11-05 Thread Jing Xiangfeng
htcpld_register_chip_i2c() misses to call i2c_put_adapter() in an error path. Add the missed function call to fix it. Fixes: 6048a3dd2371 ("mfd: Add HTCPLD driver") Signed-off-by: Jing Xiangfeng --- v2: - add the tag Fixes --- drivers/mfd/htc-i2cpld.c | 2 ++ 1 file changed, 2

Re: [PATCH] mfd: htc-i2cpld: Add the missed i2c_put_adapter() in htcpld_register_chip_i2c()

2020-11-05 Thread Jing Xiangfeng
On 2020/11/4 14:50, Markus Elfring wrote: htcpld_register_chip_i2c() misses to call i2c_put_adapter() in an error path. Add the missed function call to fix it. Would you like to add the tag “Fixes”? OK, I'll send a v2 with it. Thanks Regards, Markus .

[PATCH] mfd: htc-i2cpld: Add the missed i2c_put_adapter() in htcpld_register_chip_i2c()

2020-11-03 Thread Jing Xiangfeng
htcpld_register_chip_i2c() misses to call i2c_put_adapter() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng --- drivers/mfd/htc-i2cpld.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index

[PATCH] scsi: qla4xxx: Remove redundant assignment to variable rval

2020-11-03 Thread Jing Xiangfeng
The variable rval has been initialized with 'QLA_ERROR'. The assignment is redundant in an error path. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/qla4xxx/ql4_os.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx

[PATCH] vdpa/mlx5: Fix error return in map_direct_mr()

2020-10-26 Thread Jing Xiangfeng
Fix to return the variable "err" from the error handling case instead of "ret". Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Jing Xiangfeng --- drivers/vdpa/mlx5/core/mr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 dele

[PATCH] drm: Add the missed device_unregister() in drm_sysfs_connector_add()

2020-10-22 Thread Jing Xiangfeng
drm_sysfs_connector_add() misses to call device_unregister() when sysfs_create_link() fails to create. Add the missed function call to fix it. Fixes: e1a29c6c5955 ("drm: Add ddc link in sysfs created by drm_connector") Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/drm_sy

[PATCH] ssb: Fix error return in ssb_bus_scan()

2020-10-21 Thread Jing Xiangfeng
Fix to return error code -EINVAL from the error handling case instead of 0. Signed-off-by: Jing Xiangfeng --- drivers/ssb/scan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index f49ab1aa2149..4161e5d1f276 100644 --- a/drivers/ssb/scan.c +++ b

[PATCH] RDMA/core: Fix error return in _ib_modify_qp()

2020-10-16 Thread Jing Xiangfeng
Fix to return error code PTR_ERR() from the error handling case instead of 0. Fixes: 51aab12631dd ("RDMA/core: Get xmit slave for LAG") Signed-off-by: Jing Xiangfeng --- drivers/infiniband/core/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/

[PATCH v3] thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()

2020-10-15 Thread Jing Xiangfeng
ring_request_msix() misses to call ida_simple_remove() in an error path. Add a label 'err_ida_remove' and jump to it. Fixes: 046bee1f9ab8 ("thunderbolt: Add MSI-X support") Signed-off-by: Jing Xiangfeng --- drivers/thunderbolt/nhi.c | 19 +++ 1 file changed, 15 insert

Re: [PATCH v2] thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()

2020-10-14 Thread Jing Xiangfeng
On 2020/10/14 16:48, Andy Shevchenko wrote: On Wed, Oct 14, 2020 at 09:46:04AM +0800, Jing Xiangfeng wrote: ring_request_msix() misses to call ida_simple_remove() in an error path. Add a label 'err_ida_remove' and jump to it. ... @@ -406,11 +406,22 @@ static int ring_request_msix(struct

[PATCH v2] thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()

2020-10-13 Thread Jing Xiangfeng
ring_request_msix() misses to call ida_simple_remove() in an error path. Add a label 'err_ida_remove' and jump to it. Fixes: 046bee1f9ab8 ("thunderbolt: Add MSI-X support") Signed-off-by: Jing Xiangfeng --- drivers/thunderbolt/nhi.c | 17 ++--- 1 file changed, 14 insert

Re: [PATCH] thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()

2020-10-13 Thread Jing Xiangfeng
On 2020/10/13 19:43, Andy Shevchenko wrote: On Tue, Oct 13, 2020 at 10:45:18AM +0800, Jing Xiangfeng wrote: ring_request_msix() misses to call ida_simple_remove() in an error path. Add the missed function call to fix it. ... ring->irq = pci_irq_vector(ring->nhi->pdev, rin

[PATCH] thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()

2020-10-12 Thread Jing Xiangfeng
ring_request_msix() misses to call ida_simple_remove() in an error path. Add the missed function call to fix it. Fixes: 046bee1f9ab8 ("thunderbolt: Add MSI-X support") Signed-off-by: Jing Xiangfeng --- drivers/thunderbolt/nhi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH] staging: fieldbus: anybuss: jump to correct label in an error path

2020-10-12 Thread Jing Xiangfeng
In current code, controller_probe() misses to call ida_simple_remove() in an error path. Jump to correct label to fix it. Fixes: 17614978ed34 ("staging: fieldbus: anybus-s: support the Arcx anybus controller") Signed-off-by: Jing Xiangfeng --- drivers/staging/fieldbus/anybuss/arcx-an

[PATCH] HSI: omap_ssi: Don't jump to free ID in ssi_add_controller()

2020-10-11 Thread Jing Xiangfeng
In current code, it jumps to ida_simple_remove() when ida_simple_get() failes to allocate an ID. Just return to fix it. Fixes: 0fae198988b8 ("HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module") Signed-off-by: Jing Xiangfeng --- drivers/hsi/controllers/omap_ssi_core.c

[PATCH] ASoC: pxa: remove unnecessary assignment to variable ret

2020-09-29 Thread Jing Xiangfeng
ret is always zero here in this code path. So remove this assignment. Signed-off-by: Jing Xiangfeng --- sound/arm/pxa2xx-ac97.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index ea8e233150c8..813e608dca82 100644 --- a/sound/arm/pxa2xx

[PATCH] caif_virtio: Remove redundant initialization of variable err

2020-09-29 Thread Jing Xiangfeng
After commit a8c7687bf216 ("caif_virtio: Check that vringh_config is not null"), the variable err is being initialized with '-EINVAL' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/net/caif/caif_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-29 Thread Jing Xiangfeng
On 2020/9/16 5:44, Martin K. Petersen wrote: Jing, esas2r_probe() calls scsi_host_put() in an error path. However, esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Wouldn't it be better to move the scsi_host_put() call after the error message? There is

[PATCH] thermal: core: add the misse nlmsg_free() for thermal_genl_sampling_temp()

2020-09-29 Thread Jing Xiangfeng
thermal_genl_sampling_temp() misses to call nlmsg_free() in an error path. Jump to out_free to fix it. Signed-off-by: Jing Xiangfeng --- drivers/thermal/thermal_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_netlink.c b/drivers/thermal

[PATCH] staging: mfd: hi6421-spmi-pmic: Fix error return in hi6421_spmi_pmic_probe()

2020-09-29 Thread Jing Xiangfeng
Fix to return error code -ENOMEM from the error handling case instead of 0. Signed-off-by: Jing Xiangfeng --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c b/drivers/staging

[PATCH] scsi: myrb: remove redundant assignment to variable timeout

2020-09-28 Thread Jing Xiangfeng
The variable timeout has been initialized with a value '0'. The assignment before while loop is redundant. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/myrb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index b2869c5dd7fb

Re: [PATCH] staging: most: don't access hdm_ch before checking it valid

2020-09-28 Thread Jing Xiangfeng
On 2020/9/28 19:48, Dan Carpenter wrote: On Mon, Sep 28, 2020 at 06:48:38PM +0800, Jing Xiangfeng wrote: In try_start_dim_transfer(), pointer hdm_ch is accessed before checking. This may lead to a potential null pointer dereference. Fix this by dereferencing hdm_ch after calling BUG_ON

[PATCH] staging: most: don't access hdm_ch before checking it valid

2020-09-28 Thread Jing Xiangfeng
In try_start_dim_transfer(), pointer hdm_ch is accessed before checking. This may lead to a potential null pointer dereference. Fix this by dereferencing hdm_ch after calling BUG_ON(). Signed-off-by: Jing Xiangfeng --- drivers/staging/most/dim2/dim2.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] scsi: bfa: fix error return in bfad_pci_init()

2020-09-25 Thread Jing Xiangfeng
Fix to return error code -ENODEV from the error handling case instead of 0. Fixes: 11ea3824140c ("scsi: bfa: fix calls to dma_set_mask_and_coherent()") Signed-off-by: Jing Xiangfeng --- drivers/scsi/bfa/bfad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/bfa/bfad.c

[PATCH] scsi: snic: Remove unnecessary condition to simplify the code

2020-09-25 Thread Jing Xiangfeng
ret is always zero or an error in this code path. So the assignment to ret is redundant, and the code jumping to a label is unneed. Let's remove them to simplify the code. No functional changes. Signed-off-by: Jing Xiangfeng --- drivers/scsi/snic/snic_scsi.c | 4 1 file changed, 4

[PATCH -next] virtiofs: Move the assignment to ret outside the loop

2020-09-22 Thread Jing Xiangfeng
There is no need to do the assignment each time. So move the assignment to ret outside the loop. Signed-off-by: Jing Xiangfeng --- fs/fuse/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index e394dba08cc4..f18cd7b53ec7 100644 --- a/fs

Re: [PATCH] rapidio: fix the missed put_device() for rio_mport_add_riodev

2020-09-22 Thread Jing Xiangfeng
On 2020/9/22 16:04, Dan Carpenter wrote: On Tue, Sep 22, 2020 at 03:25:25PM +0800, Jing Xiangfeng wrote: rio_mport_add_riodev() misses to call put_device() when the device already exists. Add the missed function call to fix it. Looks good. Reviewed-by: Dan Carpenter I notice

[PATCH] udf: Remove redundant initialization of variable ret

2020-09-22 Thread Jing Xiangfeng
After commit 9293fcfbc181 ("udf: Remove struct ustr as non-needed intermediate storage"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- fs/udf/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] rapidio: fix the missed put_device() for rio_mport_add_riodev

2020-09-22 Thread Jing Xiangfeng
rio_mport_add_riodev() misses to call put_device() when the device already exists. Add the missed function call to fix it. Fixes: e8de370188d0 ("rapidio: add mport char device driver") Signed-off-by: Jing Xiangfeng --- drivers/rapidio/devices/rio_mport_cdev.c | 5 - 1 file

[PATCH] userns: Remove redundant assignment to variable ret

2020-09-21 Thread Jing Xiangfeng
After commit d2f007dbe7e4 ("userns: also map extents in the reverse map to kernel IDs"), the assignment to ret is redundant. So remove it. Signed-off-by: Jing Xiangfeng --- kernel/user_namespace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/user_namespace.

[PATCH] net: unix: remove redundant assignment to variable 'err'

2020-09-20 Thread Jing Xiangfeng
After commit 37ab4fa7844a ("net: unix: allow bind to fail on mutex lock"), the assignment to err is redundant. So remove it. Signed-off-by: Jing Xiangfeng --- net/unix/af_unix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 92

[PATCH v2] scsi: arcmsr: Remove the superfluous break

2020-09-19 Thread Jing Xiangfeng
Remove the superfluous break, as there is a 'return' before it. Fixes: 6b3937227479 ("arcmsr: fix command timeout under heavy load") Signed-off-by: Jing Xiangfeng --- drivers/scsi/arcmsr/arcmsr_hba.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c

[PATCH] KVM: PPC: Book3S: Remove redundant initialization of variable ret

2020-09-19 Thread Jing Xiangfeng
The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- arch/powerpc/kvm/book3s_64_vio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c

[PATCH] ARM: OMAP2+: Remove redundant assignment to variable ret

2020-09-18 Thread Jing Xiangfeng
The variable ret has been initialized with '-ENOMEM'. The assignment in the if branch is redundant. So remove it. Signed-off-by: Jing Xiangfeng --- arch/arm/mach-omap2/omap_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/omap_device.c b

[PATCH] xen: remove redundant initialization of variable ret

2020-09-18 Thread Jing Xiangfeng
After commit 9f51c05dc41a ("pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/xen/pvcalls-front.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Jing Xiangfeng
On 2020/9/18 22:56, Gustavo A. R. Silva wrote: On Fri, Sep 18, 2020 at 05:32:30PM +0800, Jing Xiangfeng wrote: Remove the superfluous break, as there is a 'return' before it. Apparently, the change is correct. Please, just add a proper Fixes tag by yourself this time. Thanks

[PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Jing Xiangfeng
Remove the superfluous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/arcmsr/arcmsr_hba.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index ec895d0319f0..74add6d247d5 100644

[PATCH] scsi: remove redundant initialization of variable ret

2020-09-18 Thread Jing Xiangfeng
The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/arm/oak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c index 7c9d361e91a9..78f33d57c3e8

[PATCH v2] fbcon: Remove the superfluous break

2020-09-17 Thread Jing Xiangfeng
Remove the superfluous break, as there is a 'return' before it. Fixes: bad07ff74c32 ("fbcon: smart blitter usage for scrolling") Signed-off-by: Jing Xiangfeng Reviewed-by: Nick Desaulniers Reviewed-by: Gustavo A. R. Silva --- drivers/video/fbdev/core/fbcon.c | 2 -- 1 file

Re: [PATCH] fbcon: Remove the superfluous break

2020-09-17 Thread Jing Xiangfeng
On 2020/9/18 2:52, Gustavo A. R. Silva wrote: On 9/17/20 08:15, Jing Xiangfeng wrote: Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng Reviewed-by: Gustavo A. R. Silva Also, the following Fixes tag should be included in the changelog text

Re: [PATCH] fbcon: Remove the superfluous break

2020-09-17 Thread Jing Xiangfeng
On 2020/9/18 1:36, Nick Desaulniers wrote: On Thu, Sep 17, 2020 at 6:15 AM Jing Xiangfeng wrote: Remove the superfuous break, as there is a 'return' before it. superfluous (missed "l") Thanks for correcting! Signed-off-by: Jing Xiangfeng Reviewed-by: Nick Desaulnier

[PATCH] fbcon: Remove the superfluous break

2020-09-17 Thread Jing Xiangfeng
Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng --- drivers/video/fbdev/core/fbcon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 0b49b0f44edf..623359aadd1e 100644

[PATCH] drm/ttm: remove redundant initialization of variable ret

2020-09-17 Thread Jing Xiangfeng
The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/ttm/ttm_tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index

[PATCH] scsi: qedf: remove redundant assignment to variable 'rc'

2020-09-16 Thread Jing Xiangfeng
This assignment is meaningless, so remove it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/qedf/qedf_io.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index acd9774a9387..c04078283121 100644 --- a/drivers/scsi/qedf/qedf_io.c

Re: [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-16 Thread Jing Xiangfeng
On 2020/9/16 5:44, Martin K. Petersen wrote: Jing, esas2r_probe() calls scsi_host_put() in an error path. However, esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Wouldn't it be better to move the scsi_host_put() call after the error message? There is

[PATCH] libnvdimm: Fix dereference of pointer ndns before it is null checked

2020-09-15 Thread Jing Xiangfeng
In current code, the pointer ndns is being dereferenced on the initialization of pointer parent_uuid before ndns is null check. This could lead to a potential null pointer dereference. Fix this by dereferencing ndns after ndns has been null pointer sanity checked. Signed-off-by: Jing Xiangfeng

[PATCH] ssb: Remove meaningless jump label to simplify the code

2020-09-14 Thread Jing Xiangfeng
The out jump label has nothing to do. So remove it to simplify the code. Signed-off-by: Jing Xiangfeng --- drivers/ssb/pci.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 7c3ae52f2b15..dac54041ad8d 100644 --- a/drivers/ssb

[PATCH] scsi: target: remove redundant assignment to variable 'ret'

2020-09-13 Thread Jing Xiangfeng
The variable ret has been initialized with a value '0'. The assignment in switch-case is redundant. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/target/iscsi/iscsi_target.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target

[PATCH] sbus: char: Remove meaningless jump label out_free

2020-09-11 Thread Jing Xiangfeng
After commit 57a4a3d7f756 ("display7seg: Introduce the use of the managed version of kzalloc"), The out_free jump label has nothing to do but goto out. So remove it. Signed-off-by: Jing Xiangfeng --- drivers/sbus/char/display7seg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletion

[PATCH] i3c: master: Fix error return in cdns_i3c_master_probe()

2020-09-10 Thread Jing Xiangfeng
Fix to return negative error code -ENOMEM from the error handling case instead of 0. Signed-off-by: Jing Xiangfeng --- drivers/i3c/master/i3c-master-cdns.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c

[PATCH] scsi: mvumi: Fix error return in mvumi_io_attach()

2020-09-10 Thread Jing Xiangfeng
Fix to return error code PTR_ERR() from the error handling case instead of 0. Signed-off-by: Jing Xiangfeng --- drivers/scsi/mvumi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 8906aceda4c4..0354898d7cac 100644 --- a/drivers/scsi/mvumi.c

Re: [PATCH] drm/mm: prevent a potential null-pointer dereference

2020-09-10 Thread Jing Xiangfeng
On 2020/9/10 16:58, Christian König wrote: Am 10.09.20 um 04:38 schrieb Jing Xiangfeng: The macro 'DECLARE_NEXT_HOLE_ADDR' may hit a potential null-pointer dereference. So use 'entry' after checking it. I don't see a potential null-pointer dereference here. Where should

[PATCH v2] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()

2020-09-10 Thread Jing Xiangfeng
lpass_core_sc7180_probe() misses to call pm_clk_destroy() and pm_runtime_disable() in error paths. Correct goto target to fix it. This issue is found by code inspection. Fixes: edab812d802d ("clk: qcom: lpass: Add support for LPASS clock controller for SC7180") Signed-off-by: Jing

Re: [PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()

2020-09-10 Thread Jing Xiangfeng
On 2020/9/10 17:03, Stephen Boyd wrote: Quoting Jing Xiangfeng (2020-08-27 07:16:29) lpass_core_sc7180_probe() misses to call pm_clk_destroy() and pm_runtime_disable() in error paths. Correct goto target to fix it. This issue is found by code inspection. Signed-off-by: Jing Xiangfeng

[PATCH] drm/mm: prevent a potential null-pointer dereference

2020-09-09 Thread Jing Xiangfeng
The macro 'DECLARE_NEXT_HOLE_ADDR' may hit a potential null-pointer dereference. So use 'entry' after checking it. Fixes: 5fad79fd66ff ("drm/mm: cleanup and improve next_hole_*_addr()") Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/drm_mm.c | 7 +-- 1 file changed, 5 insert

[PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()

2020-09-09 Thread Jing Xiangfeng
esas2r_probe() calls scsi_host_put() in an error path. However, esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead. Signed-off-by: Jing Xiangfeng --- drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/esas2r

[PATCH] scsi: ibmvfc: Fix error return in ibmvfc_probe()

2020-09-07 Thread Jing Xiangfeng
Fix to return error code PTR_ERR() from the error handling case instead of 0. Signed-off-by: Jing Xiangfeng --- drivers/scsi/ibmvscsi/ibmvfc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index ea7c8930592d..70daa0605082

[PATCH] atm: eni: fix the missed pci_disable_device() for eni_init_one()

2020-09-03 Thread Jing Xiangfeng
eni_init_one() misses to call pci_disable_device() in an error path. Jump to err_disable to fix it. Signed-off-by: Jing Xiangfeng --- drivers/atm/eni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 39be444534d0..316a9947541f

[PATCH] fsi: Fix an IS_ERR() vs NULL check in occ_probe()

2020-09-01 Thread Jing Xiangfeng
The platform_device_register_full() function returns error pointers, it never returns NULL. Signed-off-by: Jing Xiangfeng --- drivers/fsi/fsi-occ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c index 7da9c81759ac..9eeb856c8905

[PATCH] clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe()

2020-08-27 Thread Jing Xiangfeng
lpass_core_sc7180_probe() misses to call pm_clk_destroy() and pm_runtime_disable() in error paths. Correct goto target to fix it. This issue is found by code inspection. Signed-off-by: Jing Xiangfeng --- drivers/clk/qcom/lpasscorecc-sc7180.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH] vdpa/mlx5: Remove duplicate include

2020-08-27 Thread Jing Xiangfeng
Remove linux/mlx5/device.h which is included more than once Signed-off-by: Jing Xiangfeng --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 70676a6d1691..b4bdbe062b7c 100644

[PATCH] scsi: megaraid: Remove unnecessary assignment to variable ret

2020-08-25 Thread Jing Xiangfeng
The variable ret is being initialized with 'FAILED'. So we can remove this assignement. Signed-off-by: Jing Xiangfeng --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid

[PATCH] USB: usblcd: Remove the superfluous break

2020-08-18 Thread Jing Xiangfeng
Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng --- drivers/usb/misc/usblcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index 61e9e987fe4a..bb546f624a45 100644 --- a/drivers/usb/misc

[PATCH v2] scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe()

2020-08-06 Thread Jing Xiangfeng
Fix to return error code PTR_ERR() from the error handling case instead of 0. Fixes: 22617e216331 ("scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime changes") Signed-off-by: Jing Xiangfeng --- drivers/scsi/ufs/ti-j721e-ufs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dr

Re: [PATCH] scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe()

2020-08-06 Thread Jing Xiangfeng
Please ignore this patch. Thanks On 2020/8/6 14:44, Jing Xiangfeng wrote: Fix to return error code IS_ERR() from the error handling case instead of 0. Fixes: 22617e216331 ("scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime changes") Signed-off-by: Jing Xiangfeng --- dr

[PATCH] scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe()

2020-08-06 Thread Jing Xiangfeng
Fix to return error code IS_ERR() from the error handling case instead of 0. Fixes: 22617e216331 ("scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime changes") Signed-off-by: Jing Xiangfeng --- drivers/scsi/ufs/ti-j721e-ufs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dr

[PATCH] drm/nouveau/acr: fix a coding style in nvkm_acr_lsfw_load_bl_inst_data_sig()

2020-08-02 Thread Jing Xiangfeng
This patch performs the following changes: 1. remove a redundant parentheses around the nvkm_acr_lsfw_add() calls 2. do assignment before this if condition, it is more readable Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 ++- 1 file changed, 2

[PATCH] scsi: lpfc: Add the missed misc_deregister() for lpfc_init()

2020-07-31 Thread Jing Xiangfeng
lpfc_init() misses to call misc_deregister() in an error path. Add a label 'unregister' to fix it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/lpfc/lpfc_init.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc

[PATCH v2] clk: ti: clkctrl: fix the missed kfree() for _ti_omap4_clkctrl_setup()

2020-07-28 Thread Jing Xiangfeng
_ti_omap4_clkctrl_setup() misses to call kfree() in an error path. Jump to cleanup to fix it. Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name") Signed-off-by: Jing Xiangfeng --- drivers/clk/ti/clkctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] clk: ti: clkctrl: add the missed kfree() for _ti_omap4_clkctrl_setup()

2020-07-27 Thread Jing Xiangfeng
On 2020/7/28 9:24, Stephen Boyd wrote: Quoting Jing Xiangfeng (2020-07-20 05:23:43) _ti_omap4_clkctrl_setup() misses to call kfree() in an error path. Add the missed function call to fix it. Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name") Signed-of

[PATCH] scsi: iscsi: jump to correct label in an error path

2020-07-26 Thread Jing Xiangfeng
In current code, it jumps to put_host() when scsi_host_lookup() failes to get host. Jump to correct label to fix it. Signed-off-by: Jing Xiangfeng --- drivers/scsi/scsi_transport_iscsi.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/scsi

[PATCH] ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm()

2020-07-23 Thread Jing Xiangfeng
The of_clk_get() function returns error pointers, it never returns NULL. Fixes: 4ea3711aece4 ("ARM: OMAP2+: omap-iommu.c conversion to ti-sysc") Signed-off-by: Jing Xiangfeng --- arch/arm/mach-omap2/omap-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc

[PATCH] clk: ti: clkctrl: add the missed kfree() for _ti_omap4_clkctrl_setup()

2020-07-20 Thread Jing Xiangfeng
_ti_omap4_clkctrl_setup() misses to call kfree() in an error path. Add the missed function call to fix it. Fixes: 6c3090520554 ("clk: ti: clkctrl: Fix hidden dependency to node name") Signed-off-by: Jing Xiangfeng --- drivers/clk/ti/clkctrl.c | 4 +++- 1 file changed, 3 insert

[PATCH] ipmi: remve duplicate code in __ipmi_bmc_register()

2020-07-20 Thread Jing Xiangfeng
__ipmi_bmc_register() jumps to the label 'out_free_my_dev_name' in an error path. So we can remove duplicate code in the if (rv). Signed-off-by: Jing Xiangfeng --- drivers/char/ipmi/ipmi_msghandler.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b

[PATCH] orangefs: remove unnecessary assignment to variable ret

2020-07-17 Thread Jing Xiangfeng
The variable ret is guaranteed to be 0 in this if (). So we can remove this assignement. Signed-off-by: Jing Xiangfeng --- fs/orangefs/orangefs-mod.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/orangefs/orangefs-mod.c b/fs/orangefs/orangefs-mod.c index 289b648ae196..74a3d6337ef4

[PATCH v2] ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback

2020-07-17 Thread Jing Xiangfeng
axg_card_add_tdm_loopback() misses to call kfree() in an error path. We can use devm_kasprintf() to fix the issue, also improve maintainability. So use it instead. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Signed-off-by: Jing Xiangfeng --- sound/soc

Re: [PATCH] ASoC: meson: add the missed kfree() for axg_card_add_tdm_loopback

2020-07-16 Thread Jing Xiangfeng
On 2020/7/16 21:29, Jerome Brunet wrote: On Thu 16 Jul 2020 at 15:25, Jing Xiangfeng wrote: axg_card_add_tdm_loopback() misses to call kfree() in an error path. Add the missed function call to fix it. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style")

[PATCH] ASoC: meson: add the missed kfree() for axg_card_add_tdm_loopback

2020-07-16 Thread Jing Xiangfeng
axg_card_add_tdm_loopback() misses to call kfree() in an error path. Add the missed function call to fix it. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Signed-off-by: Jing Xiangfeng --- sound/soc/meson/axg-card.c | 4 +++- 1 file changed, 3 insert

Re: [PATCH v2] scsi: fcoe: add missed kfree() in an error path

2020-07-16 Thread Jing Xiangfeng
On 2020/7/14 1:53, Ewan D. Milne wrote: See below. On Thu, 2020-07-09 at 20:05 +0800, Jing Xiangfeng wrote: fcoe_fdmi_info() misses to call kfree() in an error path. Add a label 'free_fdmi' and jump to it. Fixes: f07d46bbc9ba ("fcoe: Fix smatch warning in fcoe_fdmi_info function&quo

Re: [PATCH] drm: remove redundant assignment to variable 'ret'

2020-07-15 Thread Jing Xiangfeng
On 2020/7/15 20:05, Daniel Vetter wrote: On Wed, Jul 15, 2020 at 03:05:59PM +0800, Jing Xiangfeng wrote: The variable ret has been assigned the value '-EINVAL'. The assignment in the if() is redundant. We can remove it. Nope, that's not correct. Before this assignement ret is guaranteed

[PATCH] drm/nouveau: add the missed kfree() for nouveau_bo_alloc()

2020-07-15 Thread Jing Xiangfeng
nouveau_bo_alloc() misses to call kfree() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu

[PATCH] drm: remove redundant assignment to variable 'ret'

2020-07-15 Thread Jing Xiangfeng
The variable ret has been assigned the value '-EINVAL'. The assignment in the if() is redundant. We can remove it. Signed-off-by: Jing Xiangfeng --- drivers/gpu/drm/drm_auth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index

[PATCH] ASoC: Intel: bytcht_es8316: Add missed put_device()

2020-07-14 Thread Jing Xiangfeng
snd_byt_cht_es8316_mc_probe() misses to call put_device() in an error path. Add the missed function call to fix it. Fixes: ba49cf6f8e4a ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect") Signed-off-by: Jing Xiangfeng --- sound/soc/intel/boards/bytcht_es8316.c | 4 ++

  1   2   >