[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 delet

[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 b/net/ipv6/esp6_off

[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(&adapter->state_lock, flags); spin_lock_irqsave(&adapter->rwi_lock, flags); As reported by coccinelle, the second _irqsave() overwrites the value saved in 'flags' by the first _irqsave(), th

[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 a/drivers/net/w

[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 a/drivers/net/ethern

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(&adapter->state_lock, flag

[PATCH] ibmvnic: remove excessive irqsave

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

[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] 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 b/drivers/