[PATCH] power: supply: charger-manager: fix typo

2021-01-20 Thread angkery
From: Junlin Yang Change 'exeeds' to 'exceeds'. Signed-off-by: Junlin Yang --- drivers/power/supply/charger-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c index

[PATCH] power: supply: charger-manager: fix the wrong status of health

2021-01-16 Thread angkery
From: Junlin Yang cm->emergency_stop will only be the value in the enumeration, and can not be less than zero, it will get an exception value. So replace it with the corresponding value. Signed-off-by: Junlin Yang --- drivers/power/supply/charger-manager.c | 4 ++-- 1 file changed, 2

[PATCH] can: mcp251xfd: mcp251xfd_handle_ivmif(): fix wrong NULL pointer check

2021-01-18 Thread angkery
From: Junlin Yang if alloc_can_err_skb() returns NULL, we should check skb instead of cf. Signed-off-by: Junlin Yang --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c

[PATCH] usb: typec: tcpci_maxim: remove redundant assignment

2021-01-23 Thread angkery
From: Junlin Yang PTR_ERR(chip->tcpci) has been used as a return value, it is not necessary to assign it to ret, so remove it. Signed-off-by: Junlin Yang --- drivers/usb/typec/tcpm/tcpci_maxim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c

[PATCH v3 1/2] usb: typec: tcpci_maxim: remove redundant assignment

2021-01-24 Thread angkery
From: Junlin Yang PTR_ERR(chip->tcpci) has been used as a return value, it is not necessary to assign it to ret, so remove it. Signed-off-by: Junlin Yang --- v3:remove the newline modification. drivers/usb/typec/tcpm/tcpci_maxim.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v3 2/2] usb: typec: tcpci_maxim: add terminating newlines to logging

2021-01-24 Thread angkery
From: Junlin Yang Add terminating '\n' to the formats where missed. Signed-off-by: Junlin Yang --- v3:Modify it again and submit it separately from patch 1. drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v2] usb: typec: tcpci_maxim: remove redundant assignment

2021-01-24 Thread angkery
From: Junlin Yang PTR_ERR(chip->tcpci) has been used as a return value, it is not necessary to assign it to ret, so remove it. And add terminating '\n' to the formats where missed too. Signed-off-by: Junlin Yang --- v2: add terminating '\n' to the formats where missed too.

[PATCH] watchdog: diag288_wdt: Remove redundant assignment

2021-02-03 Thread angkery
From: Junlin Yang The assign for 'ret' is redundant and can be removed, because it will be assigned before use. Signed-off-by: Junlin Yang --- drivers/watchdog/diag288_wdt.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/watchdog/diag288_wdt.c b/drivers/watchdog/diag288_wdt.c

[PATCH] mt76: Convert to DEFINE_SHOW_ATTRIBUTE

2021-03-27 Thread angkery
From: Junlin Yang Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Junlin Yang --- .../net/wireless/mediatek/mt76/mt7915/debugfs.c| 36 -- .../net/wireless/mediatek/mt76/mt7921/debugfs.c| 18 ++- 2 files changed, 9 insertions(+), 45

[PATCH] pinctrl: ti: fix error return code of ti_iodelay_dt_node_to_map()

2021-03-30 Thread angkery
From: Junlin Yang when devm_kcalloc fails, use -ENOMEM instead of -EINVAL, and consistent with other devm_kcalloc return values. Signed-off-by: Junlin Yang --- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/kmb: remove unneeded semicolon

2021-03-12 Thread angkery
From: Junlin Yang Fixes coccicheck warnings: ./drivers/gpu/drm/kmb/kmb_dsi.c:284:3-4: Unneeded semicolon ./drivers/gpu/drm/kmb/kmb_dsi.c:304:3-4: Unneeded semicolon ./drivers/gpu/drm/kmb/kmb_dsi.c:321:3-4: Unneeded semicolon ./drivers/gpu/drm/kmb/kmb_dsi.c:340:3-4: Unneeded semicolon

[PATCH] Revert "phy: ti: j721e-wiz: add missing of_node_put"

2021-03-16 Thread angkery
From: Junlin Yang This reverts commit 00f2e6f668b05c259f3f8d1e943318bcad8486e7. The duplicate from #796 should be removed. Signed-off-by: Junlin Yang --- drivers/phy/ti/phy-j721e-wiz.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c

[PATCH] firmware: qcom_scm: remove a duplicative condition

2021-03-10 Thread angkery
From: Junlin Yang Fixes coccicheck warnings: ./drivers/firmware/qcom_scm.c:324:20-22: WARNING !A || A && B is equivalent to !A || B Signed-off-by: Junlin Yang --- drivers/firmware/qcom_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/qcom_scm.c

[PATCH] esp6: remove a duplicative condition

2021-03-10 Thread angkery
From: Junlin Yang Fixes coccicheck warnings: ./net/ipv6/esp6_offload.c:319:32-34: WARNING !A || A && B is equivalent to !A || B Signed-off-by: Junlin Yang --- net/ipv6/esp6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/esp6_offload.c

[PATCH] drm/omap: dsi: fix unsigned expression compared with zero

2021-03-11 Thread angkery
From: Junlin Yang r is "u32" always >= 0,mipi_dsi_create_packet may return little than zero. so r < 0 condition is never accessible. Fixes coccicheck warnings: ./drivers/gpu/drm/omapdrm/dss/dsi.c:2155:5-6: WARNING: Unsigned expression compared with zero: r < 0 Signed-off-by: Junlin Yang ---

[PATCH] Input: i8042: Remove unneeded variable

2021-02-25 Thread angkery
From: Junlin Yang The variable "delay" is initialized to zero and then returned. So remove the delay variable and return zero. Generated by:scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Junlin Yang --- drivers/input/serio/i8042.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH] csky: fix typos

2021-03-05 Thread angkery
From: Junlin Yang fixes three typos found by codespell. Signed-off-by: Junlin Yang --- arch/csky/include/asm/asid.h| 2 +- arch/csky/include/asm/barrier.h | 2 +- arch/csky/include/asm/vdso.h| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH] ibmvnic: remove excessive irqsave

2021-03-04 Thread angkery
From: Junlin Yang ibmvnic_remove locks multiple spinlocks while disabling interrupts: spin_lock_irqsave(>state_lock, flags); spin_lock_irqsave(>rwi_lock, flags); there is no need for the second irqsave,since interrupts are disabled at that point, so remove the second irqsave:

Re: [PATCH] ibmvnic: remove excessive irqsave

2021-03-04 Thread angkery
On Fri, 5 Mar 2021 06:49:14 +0100 Christophe Leroy wrote: > Le 05/03/2021 ?? 02:43, angkery a ??crit?0?2: > > From: Junlin Yang > > > > ibmvnic_remove locks multiple spinlocks while disabling interrupts: > > spin_lock_irqsave(>state_lock, flags); > >

[PATCH] net/mlx5: use kvfree() for memory allocated with kvzalloc()

2021-03-03 Thread angkery
From: Junlin Yang It is allocated with kvzalloc(), the corresponding release function should not be kfree(), use kvfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Junlin Yang --- drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.c | 10

[PATCH] Input: Remove unneeded variable

2021-02-25 Thread angkery
From: Junlin Yang The variable "ret" is initialized to zero and then returned. So remove the ret variable and return zero. Generated by:scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Junlin Yang --- drivers/input/input.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH] ethernet: ucc_geth: Use kmemdup instead of kmalloc and memcpy

2021-03-05 Thread angkery
From: Junlin Yang Fixes coccicheck warnings: ./drivers/net/ethernet/freescale/ucc_geth.c:3594:11-18: WARNING opportunity for kmemdup Signed-off-by: Junlin Yang --- drivers/net/ethernet/freescale/ucc_geth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH] iwlwifi: mvm: Use kmemdup instead of kzalloc and memcpy

2021-03-05 Thread angkery
From: Junlin Yang Fixes coccicheck warnings: ./drivers/net/wireless/intel/iwlwifi/mvm/rfi.c:110:8-15: WARNING opportunity for kmemdup Signed-off-by: Junlin Yang --- drivers/net/wireless/intel/iwlwifi/mvm/rfi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH v1] ibmvnic: remove excessive irqsave

2021-03-05 Thread angkery
From: Junlin Yang ibmvnic_remove locks multiple spinlocks while disabling interrupts: spin_lock_irqsave(>state_lock, flags); spin_lock_irqsave(>rwi_lock, flags); As reported by coccinelle, the second _irqsave() overwrites the value saved in 'flags' by the first _irqsave(), therefore when the

[PATCH] pata_ipx4xx_cf: Fix unsigned comparison with less than zero

2021-04-09 Thread angkery
From: Junlin Yang The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int, and change the position to keep the code format. ./drivers/ata/pata_ixp4xx_cf.c:168:5-8: WARNING:

Re: [PATCH] pata_ipx4xx_cf: Fix unsigned comparison with less than zero

2021-04-09 Thread angkery
On Fri, 9 Apr 2021 20:02:56 +0300 Sergei Shtylyov wrote: > On 4/9/21 7:49 PM, Sergei Shtylyov wrote: > > >> From: Junlin Yang > >> > >> The return from the call to platform_get_irq() is int, it can be > >> a negative error code, however this is being assigned to an > >> unsigned int variable

[PATCH v2] pata_ipx4xx_cf: Fix unsigned comparison with less than zero

2021-04-10 Thread angkery
From: Junlin Yang The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int, and change the position to keep the code format. Fixes coccicheck warnings:

[PATCH v1] pata_ipx4xx_cf: Fix unsigned comparison with less than zero

2021-04-09 Thread angkery
From: Junlin Yang The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int, and change the position to keep the code format. Fixes coccicheck warnings:

[PATCH] remoteproc: qcom: wcss: Remove unnecessary PTR_ERR()

2021-04-08 Thread angkery
From: Junlin Yang Remove unnecessary PTR_ERR(), it has been assigned to ret before, so return ret directly. Signed-off-by: Junlin Yang --- drivers/remoteproc/qcom_q6v5_wcss.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH] phy: ti: j721e-wiz: add missing of_node_put

2021-02-16 Thread angkery
From: Junlin Yang Fix OF node leaks by calling of_node_put in for_each_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang --- drivers/phy/ti/phy-j721e-wiz.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] bus: qcom-ebi2: add missing of_node_put

2021-02-16 Thread angkery
From: Junlin Yang Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang --- drivers/bus/qcom-ebi2.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] pinctrl: equilibrium: add missing of_node_put

2021-02-16 Thread angkery
From: Junlin Yang Fix OF node leaks by calling of_node_put in for_each_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang --- drivers/pinctrl/pinctrl-equilibrium.c | 16 +--- 1 file changed, 13

[PATCH] phy: rockchip-typec: add missing of_node_put

2021-02-16 Thread angkery
From: Junlin Yang Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang --- drivers/phy/rockchip/phy-rockchip-typec.c | 1 + 1 file changed, 1

[PATCH] pinctrl: stm32: add missing of_node_put

2021-02-15 Thread angkery
From: Junlin Yang Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang --- drivers/pinctrl/stm32/pinctrl-stm32.c | 5 - 1 file changed, 4

[PATCH] spi: cadence-quadspi: add missing of_node_put

2021-02-15 Thread angkery
From: Junlin Yang Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang --- drivers/spi/spi-cadence-quadspi.c | 6 +- 1 file changed, 5 insertions(+),