[PATCH net-next] net: sundance: use module_pci_driver to simplify the code

2021-04-07 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/dlink/sundance.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/net/ethernet/dlink

[PATCH net-next] net: atheros: atl2: use module_pci_driver to simplify the code

2021-04-07 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- .../atheros/atlx/atl2.c| 24 +- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/net/ethernet/atheros/atlx

[PATCH net-next] net: fealnx: use module_pci_driver to simplify the code

2021-04-07 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/fealnx.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/fealnx.c b/drivers/net

[PATCH net-next] tulip: windbond-840: use module_pci_driver to simplify the code

2021-04-07 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- .../ethernet/dec/tulip/winbond-840.c| 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip

[PATCH net-next] tulip: de2104x: use module_pci_driver to simplify the code

2021-04-07 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- .../net/ethernet/dec/tulip/de2104x.c| 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip

[PATCH net-next] net: encx24j600: use module_spi_driver to simplify the code

2021-04-07 Thread Wei Yongjun
module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun --- .../net/ethernet/microchip/encx24j600.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/ethernet/microchip/encx24j600.c b/drivers/net

[PATCH net-next] enic: use module_pci_driver to simplify the code

2021-04-07 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- .../net/ethernet/cisco/enic/enic_main.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic

[PATCH -next] mac80211: minstrel_ht: remove unused variable 'mg' in minstrel_ht_next_jump_rate()

2021-03-25 Thread Wei Yongjun
his commit remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- net/mac80211/rc80211_minstrel_ht.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index ecad9b10984f..f21c85eb906a 100644

[PATCH net-next] netdevsim: switch to memdup_user_nul()

2021-03-24 Thread 'Wei Yongjun
From: Wei Yongjun Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/netdevsim/health.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/netdevsim/health.c b

[PATCH bpf-next] bpf: Make symbol 'bpf_task_storage_busy' static

2021-03-11 Thread 'Wei Yongjun
From: Wei Yongjun The sparse tool complains as follows: kernel/bpf/bpf_task_storage.c:23:1: warning: symbol '__pcpu_scope_bpf_task_storage_busy' was not declared. Should it be static? This symbol is not used outside of bpf_task_storage.c, so this commit marks it static. Fixes: bc

[PATCH -next] iwlwifi: mvm: fix old-style static const declaration

2021-03-04 Thread 'Wei Yongjun
From: Wei Yongjun GCC reports warning as follows: drivers/net/wireless/intel/iwlwifi/mvm/rfi.c:14:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] 14 | const static struct iwl_rfi_lut_entry iwl_rfi_table[IWL_RFI_LUT_SIZE] = { | ^ Move

[PATCH] iwlwifi: mvm: add terminate entry for dmi_system_id tables

2021-02-23 Thread Wei Yongjun
Make sure dmi_system_id tables are NULL terminated. Fixes: a2ac0f48a07c ("iwlwifi: mvm: implement approved list for the PPAG feature") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] net: stmmac: Fix missing spin_lock_init in visconti_eth_dwmac_probe()

2021-02-23 Thread Wei Yongjun
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. Fixes: b38dd98ff8d0 ("net: stmmac: Add Toshiba Visconti SoCs glue driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/stmicro/stmmac/dwmac-

[PATCH net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe()

2021-02-09 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the ioremap() error handling case instead of 0, as done elsewhere in this function. Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- .../net/ethernet/mellanox/mlx5/c

[PATCH net-next] net/mlx5e: Fix error return code in mlx5e_tc_esw_init()

2021-02-09 Thread Wei Yongjun
tunnel endpoint device") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx

[PATCH] Bluetooth: sco: Fix crash when using BT_SNDMTU/BT_RCVMTU option

2020-11-16 Thread Wei Yongjun
Hulk Robot Signed-off-by: Wei Yongjun diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 79ffcdef0b7a..22a110f37abc 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -1003,6 +1003,11 @@ static int sco_sock_getsockopt(struct socket *sock, int level, int optname,

[PATCH net-next] ice: mark PM functions as __maybe_unused

2020-07-27 Thread Wei Yongjun
g to happen based on the configuration, which is the standard for these types of functions. Fixes: 769c500dcc1e ("ice: Add advanced power mgmt for WoL") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/intel/ice/ice_main.c | 4 ++-- 1 file changed, 2 insertions(

Re: [PATCH v2 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Wei Yongjun
On 2020/7/14 15:32, Weilong Chen wrote: > When vlan_newlink call register_vlan_dev fails, it might return error > with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should > free the memory. But currently rtnl_newlink only free the memory which > state is NETREG_UNINITIALIZED. > > BUG:

[PATCH] ip6_gre: fix null-ptr-deref in ip6gre_init_net()

2020-07-13 Thread Wei Yongjun
o NULL, later access to ign->fb_tunnel_dev cause null-ptr-deref. Fix it by saving 'ign->fb_tunnel_dev' to local variable ndev. Fixes: dafabb6590cb ("ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun diff --git a/

[PATCH net-next v2] net: make symbol 'flush_works' static

2020-07-13 Thread Wei Yongjun
ogs()") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- v1 - > v2: add fixes tag --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index eab4ebe3c21c..b61075828358 100644 --- a/net/core/dev.c +++ b/net/core

[PATCH net-next] net: make symbol 'flush_works' static

2020-07-10 Thread Wei Yongjun
The sparse tool complains as follows: net/core/dev.c:5594:1: warning: symbol '__pcpu_scope_flush_works' was not declared. Should it be static? 'flush_works' is not used outside of dev.c, so marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- net/core/

[PATCH net-next] sun/cassini: mark cas_resume() as __maybe_unused

2020-07-07 Thread Wei Yongjun
Mark cas_resume() as __maybe_unused to make it clear. Fixes: f193f4ebde3d ("sun/cassini: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/sun/cassini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH -next] perf/core: Make some symbols static

2020-07-06 Thread Wei Yongjun
erf_pmu_snapshot_aux' and 'dev_attr_nr_addr_filters' are not used outside of this file, so mark them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- kernel/events/core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/events/core.c b

Re: [PATCH net-next] mlx4: Mark PM functions as __maybe_unused

2020-07-02 Thread Wei Yongjun
On 2020/7/2 17:36, Leon Romanovsky wrote: > On Thu, Jul 02, 2020 at 05:19:46PM +0800, Wei Yongjun wrote: >> In certain configurations without power management support, the >> following warnings happen: >> >> drivers/net/ethernet/mellanox/mlx4/main.c:4388:12: >>

[PATCH net-next] mlx4: Mark PM functions as __maybe_unused

2020-07-02 Thread Wei Yongjun
hat this is going to happen based on the configuration, which is the standard for these types of functions. Fixes: 0e3e206a3e12 ("mlx4: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx4/main.c | 4 ++-- 1 file changed

[PATCH net-next] ksz884x: mark pcidev_suspend() as __maybe_unused

2020-07-02 Thread Wei Yongjun
ice *dev_d) |^~ Mark pcidev_suspend() as __maybe_unused to make it clear. Fixes: 64120615d140 ("ksz884x: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/micrel/ksz884x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next] qed: Make symbol 'qed_hw_err_type_descr' static

2020-07-01 Thread Wei Yongjun
From: Hulk Robot Fix sparse build warning: drivers/net/ethernet/qlogic/qed/qed_main.c:2480:6: warning: symbol 'qed_hw_err_type_descr' was not declared. Should it be static? Signed-off-by: Hulk Robot --- drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH] iavf: fix error return code in iavf_init_get_resources()

2020-06-18 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +++- 1 file changed, 3

[PATCH net v2] mptcp: fix memory leak in mptcp_subflow_create_socket()

2020-06-14 Thread Wei Yongjun
LL_64_after_hwframe+0x49/0xb3 Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket") Signed-off-by: Wei Yongjun --- v1 -> v2: add net prefix to subject line --- net/mptcp/subflow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mptcp/subflo

[PATCH] mptcp: fix memory leak in mptcp_subflow_create_socket()

2020-06-12 Thread Wei Yongjun
LL_64_after_hwframe+0x49/0xb3 Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket") Signed-off-by: Wei Yongjun diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index bf132575040d..bbdb74b8bc3c 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1053,8 +

[PATCH 1/2 v3] net: ethernet: ti: fix some return value check of cpsw_ale_create()

2020-05-19 Thread Wei Yongjun
agged traffic on host port") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ti/cpsw_ale.c| 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 4 ++-- drivers/net/ethernet/ti/netcp_ethss.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/d

[PATCH 2/2 v3] net: ethernet: ti: am65-cpsw-nuss: fix error handling of am65_cpsw_nuss_probe

2020-05-19 Thread Wei Yongjun
ot Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 2517ffba8178..88f52a2f85b3 100644 --- a/drivers/net/ethern

[PATCH 0/2 v3] net: ethernet: ti: fix some return value check

2020-05-19 Thread Wei Yongjun
This patchset convert cpsw_ale_create() to return PTR_ERR() only, and changed all the caller to check IS_ERR() instead of NULL. Since v2: 1) rebased on net.git, as Jakub's suggest 2) split am65-cpsw-nuss.c changes, as Grygorii's suggest Wei Yongjun (2): net: ethernet: ti: fix s

[PATCH net-next] net: dsa: vsc73xx: convert to devm_platform_ioremap_resource

2020-05-08 Thread Wei Yongjun
Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Wei Yongjun --- drivers/net/dsa/vitesse-vsc73xx-platform.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/dsa/vitesse-vsc73xx

[PATCH net-next v2] net: ethernet: ti: fix some return value check of cpsw_ale_create()

2020-05-08 Thread Wei Yongjun
() error handling case instead of 0 in am65_cpsw_nuss_probe(). Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Fixes: 4b41d3436796 ("net: ethernet: ti: cpsw: allow untagged traffic on host port") Reported-by: Hulk Robot Signed-off-by:

[PATCH net-next] nfp: abm: fix error return code in nfp_abm_vnic_alloc()

2020-05-08 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 174ab544e3bc ("nfp: abm: add cls_u32 offload for simple band classification") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/ne

[PATCH net-next] octeontx2-vf: Fix error return code in otx2vf_probe()

2020-05-07 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the alloc failed error handling case instead of 0, as done elsewhere in this function. Fixes: 3184fb5ba96e ("octeontx2-vf: Virtual function driver support") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/net/ethern

[PATCH net-next] net: ethernet: ti: fix error return code in am65_cpsw_nuss_probe()

2020-05-07 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the cpsw_ale_create() error handling case instead of 0, as done elsewhere in this function. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Reported-by: Hulk Robot Signed-off-by: W

[PATCH -next] bpf: fix error return code in map_lookup_and_delete_elem()

2020-04-30 Thread Wei Yongjun
Fix to return negative error code -EFAULT from the copy_to_user() error handling case instead of 0, as done elsewhere in this function. Fixes: bd513cd08f10 ("bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall") Signed-off-by: Wei Yongjun --- kernel/bpf/syscall.c | 4 +++- 1 file changed, 3

[PATCH -next] ptp: ptp_ines: convert to devm_platform_ioremap_resource

2020-04-29 Thread Wei Yongjun
Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Wei Yongjun --- drivers/ptp/ptp_ines.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c index

[PATCH net-next v2] drivers: net: davinci_mdio: fix potential NULL dereference in davinci_mdio_probe()

2020-04-28 Thread Wei Yongjun
res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Fixes: 03f66f067560 ("net: ethernet: ti: davinci_mdio: use devm_ioremap()") Signed-off-by: Wei Yongjun Reviewed-by:

[PATCH net-next] net/mlx5: DR, Fix error return code in dr_domain_init_resources()

2019-09-05 Thread Wei Yongjun
Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4ec9e7b02697 ("net/mlx5: DR, Expose steering domain functionality") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_do

[PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset()

2019-09-05 Thread Wei Yongjun
The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b

[PATCH -next v2] btf: fix return value check in btf_vmlinux_init()

2019-08-15 Thread Wei Yongjun
In case of error, the function kobject_create_and_add() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs") Signed-off-by: Wei Yongjun Acked-by: Andrii Nakryiko -

[PATCH -next] btf: fix return value check in btf_vmlinux_init()

2019-08-15 Thread Wei Yongjun
In case of error, the function kobject_create_and_add() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs") Signed-off-by: Wei Yongjun --- kernel/bpf/sysfs

[PATCH v2] ag71xx: fix return value check in ag71xx_probe()

2019-07-18 Thread Wei Yongjun
In case of error, the function of_get_mac_address() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Wei Yongjun Reviewed-by: Oleksij Rempel --

[PATCH v2] ag71xx: fix error return code in ag71xx_probe()

2019-07-18 Thread Wei Yongjun
Fix to return error code -ENOMEM from the dmam_alloc_coherent() error handling case instead of 0, as done elsewhere in this function. Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Wei Yongjun Reviewed-by: Oleksij Rempel --- v1 -> v2: fix subsystem prefix

[PATCH] net: ethernet: fix error return code in ag71xx_probe()

2019-07-17 Thread Wei Yongjun
Fix to return error code -ENOMEM from the dmam_alloc_coherent() error handling case instead of 0, as done elsewhere in this function. Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/atheros/ag71xx.c | 4 +++- 1 file

[PATCH] net: ag71xx: fix return value check in ag71xx_probe()

2019-07-17 Thread Wei Yongjun
In case of error, the function of_get_mac_address() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/athero

[PATCH] net: dsa: sja1105: Fix missing unlock on error in sk_buff()

2019-07-16 Thread Wei Yongjun
Add the missing unlock before return from function sk_buff() in the error handling case. Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") Signed-off-by: Wei Yongjun --- net/dsa/tag_sja1105.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add()

2019-07-05 Thread Wei Yongjun
Fix to return negative error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/netronome/nfp/crypto/tls.c | 1 + 1 file

[PATCH net-next] gve: Fix error return code in gve_alloc_qpls()

2019-07-04 Thread Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/google/gve/gve_main.c | 4 +++- 1 file changed, 3 insert

[PATCH net-next] drivers: net: davinci_mdio: fix return value check in davinci_mdio_probe()

2019-05-03 Thread Wei Yongjun
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 03f66f067560 ("net: ethernet: ti: davinci_mdio: use devm_ioremap()") Signed-off-by: Wei Yongjun --- drivers/net/e

[PATCH] net: sched: using kfree_rcu() to simplify the code

2019-02-16 Thread Wei Yongjun
The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun --- net/sched/sch_api.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c

[PATCH net-next] net: hns3: make function hclge_set_all_vf_rst() static

2019-02-16 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2431:5: warning: symbol 'hclge_set_all_vf_rst' was not declared. Should it be static? Fixes: aa5c4f175be6 ("net: hns3: add reset handling for VF when doing PF reset") Signed

[PATCH net-next] netfilter: ipt_CLUSTERIP: make symbol 'cip_netdev_notifier' static

2019-02-16 Thread Wei Yongjun
Fixes the following sparse warnings: net/ipv4/netfilter/ipt_CLUSTERIP.c:867:23: warning: symbol 'cip_netdev_notifier' was not declared. Should it be static? Fixes: 5a86d68bcf02 ("netfilter: ipt_CLUSTERIP: fix deadlock in netns exit routine") Signed-off-by: Wei Yongjun ---

[PATCH net-next] igc: Make function igc_write_rss_indir_tbl() static

2019-02-15 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/intel/igc/igc_ethtool.c:646:6: warning: symbol 'igc_write_rss_indir_tbl' was not declared. Should it be static? Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/int

[PATCH net-next] net: sgi: use GFP_ATOMIC under spin lock

2019-02-15 Thread Wei Yongjun
The function meth_init_tx_ring() is called from meth_tx_timeout(), in which spin_lock is held, so we should use GFP_ATOMIC instead. Fixes: 8d4c28fbc284 ("meth: pass struct device to DMA API functions") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/sgi/meth.c | 2 +- 1 file

[PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()

2019-01-22 Thread Wei Yongjun
In case of error, the function devm_clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos") Signed-off-by: Wei Yongjun --- drivers/net/ethern

[PATCH net-next] devlink: Fix error return code in devlink_health_buffer_prepare_skb()

2019-01-21 Thread Wei Yongjun
Fix to return a negative error code -EMSGSIZE from the error handling case, otherwise 0 or uninitialized value may be returned. Fixes: cb5ccfbe73b3 ("devlink: Add health buffer support") Signed-off-by: Wei Yongjun --- net/core/devlink.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH net-next] xprtrdma: Fix error return code in rpcrdma_buffer_create()

2019-01-16 Thread Wei Yongjun
Fix to return a negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 6d2d0ee27c7a ("xprtrdma: Replace rpcrdma_receive_wq with a per-xprt workqueue") Signed-off-by: Wei Yongjun --- net/sunrpc/xprtrdma/verbs.c | 4 +++- 1 fi

[PATCH net-next] can: flexcan: flexcan_chip_start(): fix the error return code in flexcan_setup_stop_mode()

2018-12-03 Thread Wei Yongjun
The error return code PTR_ERR(gpr_np) is always 0 since gpr_np is equal to NULL in this error handling case. Fix it by return -ENOENT. Fixes: de3578c198c6 ("can: flexcan: add self wakeup support") Signed-off-by: Wei Yongjun --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 inser

[PATCH] xfrm: Fix error return code in xfrm_output_one()

2018-10-26 Thread Wei Yongjun
force clears the dst_entry.") Signed-off-by: Wei Yongjun --- net/xfrm/xfrm_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index 4ae87c5c..fef6b2d 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -102,6 +102,7

[PATCH] octeontx2-af: Use GFP_ATOMIC under spin lock

2018-10-24 Thread Wei Yongjun
The function nix_update_mce_list() is called from nix_update_bcast_mce_list(), and a spin lock is held here, so we should use GFP_ATOMIC instead. Fixes: 4b05528ebf0c ("octeontx2-af: Update bcast list upon NIXLF alloc/free") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/marvell

[PATCH -next] fore200e: fix missing unlock on error in bsq_audit()

2018-10-14 Thread Wei Yongjun
Add the missing unlock before return from function bsq_audit() in the error handling case. Fixes: 1d9d8be91788 ("fore200e: check for dma mapping failures") Signed-off-by: Wei Yongjun --- drivers/atm/fore200e.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/atm/fore200e.c

[PATCH net-next] net: sched: make function qdisc_free_cb() static

2018-09-27 Thread Wei Yongjun
Fixes the following sparse warning: net/sched/sch_generic.c:944:6: warning: symbol 'qdisc_free_cb' was not declared. Should it be static? Fixes: 3a7d0d07a386 ("net: sched: extend Qdisc with rcu") Signed-off-by: Wei Yongjun --- net/sched/sch_generic.c | 2 +- 1 file change

[PATCH net-next] net: aquantia: Make function aq_fw1x_set_power() static

2018-09-26 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:873:5: warning: symbol 'aq_fw1x_set_power' was not declared. Should it be static? Fixes: a0da96c08cfa ("net: aquantia: implement WOL support") Signed-off-by: Wei Yongjun ---

[PATCH net-next] net/tls: Make function get_rec() static

2018-09-26 Thread Wei Yongjun
Fixes the following sparse warning: net/tls/tls_sw.c:655:16: warning: symbol 'get_rec' was not declared. Should it be static? Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Wei Yongjun --- net/tls/tls_sw.c | 2 +

[PATCH net-next] net/core: make function ___gnet_stats_copy_basic() static

2018-09-26 Thread Wei Yongjun
Fixes the following sparse warning: net/core/gen_stats.c:166:1: warning: symbol '___gnet_stats_copy_basic' was not declared. Should it be static? Fixes: 5e111210a443 ("net/core: Add new basic hardware counter") Signed-off-by: Wei Yongjun --- net/core/gen_stats.c | 2 +

[PATCH RESEND] PCI: hv: Fix return value check in hv_pci_assign_slots()

2018-09-20 Thread Wei Yongjun
In case of error, the function pci_create_slot() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot information") Signed-off-by: Wei Yongjun --- Sinc

[PATCH net-next] net: hns: make function hns_gmac_wait_fifo_clean() static

2018-09-14 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c:322:5: warning: symbol 'hns_gmac_wait_fifo_clean' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 2 +- 1 file changed, 1

[PATCH net-next] net: lantiq: Fix return value check in xrx200_probe()

2018-09-14 Thread Wei Yongjun
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Wei Yongjun --- d

[PATCH net-next] net: dsa: gswip: Fix copy-paste error in gswip_gphy_fw_probe()

2018-09-14 Thread Wei Yongjun
The return value from of_reset_control_array_get_exclusive() is not checked correctly. The test is done against a wrong variable. This patch fix it. Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Wei Yongjun --- drivers/net/dsa/lantiq_g

[PATCH net-next] net: dsa: gswip: Fix return value check in gswip_probe()

2018-09-14 Thread Wei Yongjun
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Signed-off-by: Wei Yongjun --- drive

[PATCH net-next] net/mlx5e: Make function mlx5i_grp_sw_update_stats() static

2018-09-05 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: warning: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- 1 file

[PATCH net-next] ieee802154: hwsim: fix missing unlock on error in hwsim_add_one()

2018-08-07 Thread Wei Yongjun
Add the missing unlock before return from function hwsim_add_one() in the error handling case. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Wei Yongjun --- drivers/net/ieee802154/mac802154_hwsim.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH net-next] ieee802154: hwsim: fix copy-paste error in hwsim_set_edge_lqi()

2018-08-07 Thread Wei Yongjun
The return value from kzalloc() is not checked correctly. The test is done against a wrong variable. This patch fix it. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: Wei Yongjun --- drivers/net/ieee802154/mac802154_hwsim.c | 2 +- 1 file

[PATCH net-next] rxrpc: Remove set but not used variable 'nowj'

2018-08-01 Thread Wei Yongjun
Fixes gcc '-Wunused-but-set-variable' warning: net/rxrpc/proc.c: In function 'rxrpc_call_seq_show': net/rxrpc/proc.c:66:29: warning: variable 'nowj' set but not used [-Wunused-but-set-variable] unsigned long timeout = 0, nowj;

[PATCH net-next] tcp: remove set but not used variable 'skb_size'

2018-07-31 Thread Wei Yongjun
Fixes gcc '-Wunused-but-set-variable' warning: net/ipv4/tcp_output.c: In function 'tcp_collapse_retrans': net/ipv4/tcp_output.c:2700:6: warning: variable 'skb_size' set but not used [-Wunused-but-set-variable] int skb_size, next_skb_size; ^ Signed-off-

[PATCH net-next] xfrm: Make function xfrmi_get_link_net() static

2018-07-27 Thread Wei Yongjun
Fixes the following sparse warning: net/xfrm/xfrm_interface.c:745:12: warning: symbol 'xfrmi_get_link_net' was not declared. Should it be static? Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Wei Yongjun --- net/xfrm/xfrm_interface.c | 2 +

[PATCH net-next] lan743x: Make symbol lan743x_pm_ops static

2018-07-24 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/microchip/lan743x_main.c:2944:25: warning: symbol 'lan743x_pm_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH net-next] tcp: make function tcp_retransmit_stamp() static

2018-07-24 Thread Wei Yongjun
Fixes the following sparse warnings: net/ipv4/tcp_timer.c:25:5: warning: symbol 'tcp_retransmit_stamp' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/ipv4/tcp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_timer.c

[PATCH net-next] net: igmp: make function __ip_mc_inc_group() static

2018-07-24 Thread Wei Yongjun
Fixes the following sparse warnings: net/ipv4/igmp.c:1391:6: warning: symbol '__ip_mc_inc_group' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/ipv4/igmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/ig

[PATCH net-next] net: aquantia: Make some functions static

2018-07-05 Thread Wei Yongjun
g: symbol 'hw_atl_utils_mpi_set_state' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/

[PATCH net-next] net: dsa: vsc73xx: Make some functions static

2018-07-05 Thread Wei Yongjun
tic? drivers/net/dsa/vitesse-vsc73xx.c:1122:6: warning: symbol 'vsc73xx_get_ethtool_stats' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/dsa/vitesse-vsc73xx.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ds

[PATCH net-next] net: sched: act_pedit: fix possible memory leak in tcf_pedit_init()

2018-07-03 Thread Wei Yongjun
'keys_ex' is malloced by tcf_pedit_keys_ex_parse() in tcf_pedit_init() but not all of the error handle path free it, this may cause memory leak. This patch fix it. Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to the conventional network headers") Signed

[PATCH] hinic: reset irq affinity before freeing irq

2018-06-27 Thread Wei Yongjun
c cpu for NUMA") Signed-off-by: Wei Yongjun diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c b/drivers/net/ethernet/huawei/hinic/hinic_rx.c index e2e5cdc..4c0f7ed 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c @@ -43

[PATCH net-next] net/mlx5e: fix error return code in mlx5e_alloc_rq()

2018-06-04 Thread Wei Yongjun
Fix to return error code -ENOMEM from the kvzalloc_node() error handling case instead of 0, as done elsewhere in this function. Fixes: 069d11465a80 ("net/mlx5e: RX, Enhance legacy Receive Queue memory scheme") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/en_

[PATCH net-next] net/mlx5e: Make function mlx5e_change_rep_mtu() static

2018-06-04 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:903:5: warning: symbol 'mlx5e_change_rep_mtu' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- 1 file changed, 1 inser

[PATCH net-next] net/smc: fix error return code in smc_setsockopt()

2018-05-30 Thread Wei Yongjun
Fix to return error code -EINVAL instead of 0 if optlen is invalid. Fixes: 01d2f7e2cdd3 ("net/smc: sockopts TCP_NODELAY and TCP_CORK") Signed-off-by: Wei Yongjun --- net/smc/af_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/smc/af_smc.c b/net/smc/af_s

[PATCH net-next] net/mlx5: Make function mlx5_fpga_tls_send_teardown_cmd() static

2018-05-30 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c:199:6: warning: symbol 'mlx5_fpga_tls_send_teardown_cmd' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c | 4 ++-- 1 file

[PATCH net-next] hv_netvsc: fix error return code in netvsc_probe()

2018-05-30 Thread Wei Yongjun
Fix to return a negative error code from the failover register fail error handling case instead of 0, as done elsewhere in this function. Fixes: 1ff78076d8dd ("netvsc: refactor notifier/event handling code to use the failover framework") Signed-off-by: Wei Yongjun --- drivers/

[PATCH net-next] netfilter: nat: make symbol nat_hook static

2018-05-26 Thread Wei Yongjun
Fixes the following sparse warning: net/netfilter/nf_nat_core.c:1039:20: warning: symbol 'nat_hook' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_

[PATCH net-next] net: bpfilter: make function bpfilter_mbox_request() static

2018-05-26 Thread Wei Yongjun
Fixes the following sparse warnings: net/ipv4/bpfilter/sockopt.c:13:5: warning: symbol 'bpfilter_mbox_request' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/ipv4/bpfilter/sockopt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH net-next] vlan: vlan_hw_filter_capable() can be static

2018-03-30 Thread Wei Yongjun
Fixes the following sparse warning: net/8021q/vlan_core.c:168:6: warning: symbol 'vlan_hw_filter_capable' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- net/8021q/vlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/8021q/vlan_co

[PATCH net-next V2] net: hns3: remove unnecessary pci_set_drvdata() and devm_kfree()

2018-03-29 Thread Wei Yongjun
ssary pci_set_drvdata() and devm_kfree(). Signed-off-by: Wei Yongjun --- v1 -> v2: change commit log --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet

[PATCH net-next] net: cavium: use module_pci_driver to simplify the code

2018-03-28 Thread Wei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- drivers/net/ethernet/cavium/common/cavium_ptp.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next] cxgb4: fix error return code in adap_init0()

2018-03-28 Thread Wei Yongjun
Fix to return a negative error code from the hash filter init error handling case instead of 0, as done elsewhere in this function. Fixes: 5c31254e35a8 ("cxgb4: initialize hash-filter configuration") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +

[PATCH net-next] net: bcmgenet: return NULL instead of plain integer

2018-03-28 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/broadcom/genet/bcmgenet.c:1351:16: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH net-next] net: hns3: remove unnecessary pci_set_drvdata() and devm_kfree()

2018-03-28 Thread Wei Yongjun
The devm_kfree function allocates memory that is released when a driver detaches. Also the driver core clears the driver data to NULL after device release. So remove the unnecessary pci_set_drvdata() and devm_kfree(). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/hisilicon/hns3

  1   2   3   >