[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-27 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 changed, 1 inser

[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 --- drivers/ne

[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 +- 1 file

[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 +- 1 file

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

[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 changed, 1

[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; ^ Signed-off-by: Wei Yongjun

[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-by: Wei Yongjun --- net/ipv4

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

2018-07-28 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 +- 1 file

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

2018-07-25 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(+), 1 deletion

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

[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/igmp.c index

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

2018-07-05 Thread Wei Yongjun
'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/drivers/net/ethernet

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

2018-07-05 Thread Wei Yongjun
/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/dsa/vitesse-vsc73xx.c b/drivers

[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-off-by: W

[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 insertion(+), 1

[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 changed, 2

[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 <weiyongj...@huawei.com> --- net/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[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 <weiyongj...@huawei.com> --- net/ipv4/bpfilter/sockopt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 del

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

2018-03-31 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 <weiyongj...@huawei.com> --- net/8021q/vlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2018-03-29 Thread Wei Yongjun
pci_set_drvdata() and devm_kfree(). Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- 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/

[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 <weiyongj...@huawei.com> --- drivers/net/ethernet/cavium/common/cavium_ptp.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff

[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 <weiyongj...@huawei.com> --- drivers/net/ethern

[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 <weiyongj...@huawei.com> --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[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 <weiyongj...@huawei.com> --- drivers/net/et

[PATCH net-next] ice: Fix error return code in ice_init_hw()

2018-03-28 Thread Wei Yongjun
Fix to return error code ICE_ERR_NO_MEMORY from the alloc error handling case instead of 0, as done elsewhere in this function. Fixes: dc49c7723676 ("ice: Get MAC/PHY/link info and scheduler topology") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/et

[PATCH net-next] tipc: tipc_node_create() can be static

2018-03-26 Thread Wei Yongjun
Fixes the following sparse warning: net/tipc/node.c:336:18: warning: symbol 'tipc_node_create' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/tipc/node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tipc/

[PATCH net-next] tipc: fix error handling in tipc_udp_enable()

2018-03-26 Thread Wei Yongjun
Release alloced resource before return from the error handling case in tipc_udp_enable(), otherwise will cause memory leak. Fixes: 52dfae5c85a4 ("tipc: obtain node identity from interface by default") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/tipc/udp_media.c

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

2018-03-26 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:508:5: warning: symbol 'hw_atl_utils_mpi_set_speed' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/aquantia/atlantic/

[PATCH net-next v2] sctp: fix error return code in sctp_sendmsg_new_asoc()

2018-03-12 Thread Wei Yongjun
Return error code -EINVAL in the address len check error handling case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' in the for loop. Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg") Signed-off-by: Wei Yongjun <weiyongj...@huaw

[PATCH net-next] mlxsw: spectrum_kvdl: Make some functions static

2018-03-12 Thread Wei Yongjun
' was not declared. Should it be static? drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:397:5: warning: symbol 'mlxsw_sp_kvdl_large_chunks_occ_get' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl

[PATCH net-next] sctp: fix error return code in sctp_sendmsg_new_asoc()

2018-03-12 Thread Wei Yongjun
Return error code -EINVAL in the address len check error handling case since 'err' can be overwrite to 0 by 'err = sctp_verify_addr()' in the for loop. Fixes: 2c0dbaa0c43d ("sctp: add support for SCTP_DSTADDRV4/6 Information for sendmsg") Signed-off-by: Wei Yongjun <weiyongj.

[PATCH net-next] cxgb4: make symbol pedits static

2018-01-23 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c:46:27: warning: symbol 'pedits' was not declared. Should it be static? Fixes: 27ece1f357b7 ("cxgb4: add tc flower support for ETH-DMAC rewrite") Signed-off-by: Wei Yongjun <weiyongj.

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

2018-01-22 Thread Wei Yongjun
Fix to return error code -EINVAL instead of 0 when num_vfs above limit_vfs, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/net

[PATCH net-next] net: aquantia: make symbol hw_atl_boards static

2018-01-22 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:50:34: warning: symbol 'hw_atl_boards' was not declared. Should it be static? Fixes: 4948293ff963 ("net: aquantia: Introduce new AQC devices and capabilities") Signed-off-by: Wei Yongjun

[PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()

2018-01-22 Thread Wei Yongjun
Fix to return error code -ENOMEM from the aq_ndev_alloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/a

[PATCH net-next] mlxsw: spectrum: Make function mlxsw_sp_kvdl_part_occ() static

2018-01-16 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:289:5: warning: symbol 'mlxsw_sp_kvdl_part_occ' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 2

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

2018-01-16 Thread Wei Yongjun
Fixes the following sparse warnings: net/core/devlink.c:2297:25: warning: symbol 'devlink_resource_find' was not declared. Should it be static? net/core/devlink.c:2322:6: warning: symbol 'devlink_resource_validate_children' was not declared. Should it be static? Signed-off-by: Wei Yongjun

[PATCH -next] bpf: cpumap: make some functions static

2018-01-16 Thread Wei Yongjun
-by: Wei Yongjun <weiyongj...@huawei.com> --- kernel/bpf/cpumap.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c index ce5b669..d392826 100644 --- a/kernel/bpf/cpumap.c +++ b/kernel/bpf/cpumap.c @@ -143,7

[PATCH net-next] mlxsw: spectrum: qdiscs: Make function mlxsw_sp_qdisc_prio_unoffload static

2018-01-15 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c:464:1: warning: symbol 'mlxsw_sp_qdisc_prio_unoffload' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_q

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

2018-01-11 Thread Wei Yongjun
A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 504398f0a78e ("i40evf: use spinlock to protect (mac|vlan)_filter_list") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 8 1 file changed, 4

[PATCH net-next] net: phy: mdio-bcm-unimac: fix potential NULL dereference in unimac_mdio_probe()

2018-01-11 Thread Wei Yongjun
); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/phy/mdio-bcm-unimac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy

[PATCH net-next] net: socionext: Fix error return code in netsec_netdev_open()

2018-01-11 Thread Wei Yongjun
Fix to return error code -ENODEV from the of_phy_connect() error handling case instead of 0, as done elsewhere in this function. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/socion

[PATCH net-next] netfilter: nf_flow_table: remove duplicated include from nf_flow_table_ipv6.c

2018-01-10 Thread Wei Yongjun
Remove duplicated include. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/ipv6/netfilter/nf_flow_table_ipv6.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv6/netfilter/nf_flow_table_ipv6.c b/net/ipv6/netfilter/nf_flow_table_ipv6.c index 0c3b9d3..fff2160 100644 ---

[PATCH net-next] netfilter: nf_queue: remove duplicated include from nf_queue.c

2018-01-10 Thread Wei Yongjun
Remove duplicated include. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/netfilter/nf_queue.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 7f55af5..d67a96a 100644 --- a/net/netfilter/nf_queue.c +++ b/net/net

[PATCH net-next] tcp: make local function tcp_recv_timestamp static

2018-01-09 Thread Wei Yongjun
Fixes the following sparse warning: net/ipv4/tcp.c:1736:6: warning: symbol 'tcp_recv_timestamp' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/ipv4/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/t

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

2018-01-09 Thread Wei Yongjun
Fix to return a negative error code from the xdp_rxq_info_reg() error handling case instead of 0, as done elsewhere in this function. Fixes: 0ddf543226ac ("xdp/mlx5: setup xdp_rxq_info") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/mellanox/mlx5/co

[PATCH net-next] i40e: Make local function i40e_get_link_speed static

2018-01-09 Thread Wei Yongjun
Fixes the following sparse warning: drivers/net/ethernet/intel/i40e/i40e_main.c:5440:5: warning: symbol 'i40e_get_link_speed' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file chan

[PATCH net-next] netfilter: core: make local function __nf_unregister_net_hook static

2018-01-09 Thread Wei Yongjun
Fixes the following sparse warning: net/netfilter/core.c:380:6: warning: symbol '__nf_unregister_net_hook' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/netfilter/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH net-next] netfilter: nf_tables: fix a typo in nf_tables_getflowtable()

2018-01-09 Thread Wei Yongjun
Fix a typo, we should check 'flowtable' instead of 'table'. Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next] net: dsa: lan9303: Fix error return code in lan9303_check_device()

2018-01-03 Thread Wei Yongjun
Fix to return error code -ENODEV from the chip not found error handling case instead of 0(ret have been overwritten to 0 by lan9303_read()), as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file chan

[PATCH net-next v3] net: sched: fix skb leak in dev_requeue_skb()

2017-12-27 Thread Wei Yongjun
der. Fixes: a53851e2c321 ("net: sched: explicit locking in gso_cpu fallback") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- v2 -> v3: move lock out of while loop --- net/sched/sch_generic.c | 29 + 1 file changed, 21 insertions(+), 8 deletion

[PATCH net-next v2] net: sched: fix skb leak in dev_requeue_skb()

2017-12-24 Thread Wei Yongjun
;) Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- v1 -> v2: add net-next prefix --- diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 981c08f..0df2dbf 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -111,10 +111,16 @@ static inline void qdisc_enqu

[PATCH] net: sched: fix skb leak in dev_requeue_skb()

2017-12-24 Thread Wei Yongjun
;) Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 981c08f..0df2dbf 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -111,10 +111,16 @@ static inline void qdisc_enqueue_skb_bad_txq(struct Qdisc *q,

[PATCH net-next] openvswitch: Using kfree_rcu() to simplify the code

2017-11-13 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 <weiyongj...@huawei.com> --- net/openvswitch/meter.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCH net-next] openvswitch: Make local function ovs_nsh_key_attr_size() static

2017-11-13 Thread Wei Yongjun
Fixes the following sparse warnings: net/openvswitch/flow_netlink.c:340:8: warning: symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/openvswitch/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH net-next] openvswitch: Fix return value check in ovs_meter_cmd_features()

2017-11-13 Thread Wei Yongjun
In case of error, the function ovs_meter_cmd_reply_start() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> ---

[PATCH net-next] dpaa_eth: fix error return code in dpaa_eth_probe()

2017-11-06 Thread Wei Yongjun
Fix to return a negative error code from the dpaa_bp_alloc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH net-next] mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create()

2017-11-06 Thread Wei Yongjun
Fix to return a negative error code from the VID create error handling case instead of 0, as done elsewhere in this function. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/etherne

[PATCH net-next] net/ncsi: Make local function ncsi_get_filter() static

2017-11-02 Thread Wei Yongjun
Fixes the following sparse warnings: net/ncsi/ncsi-manage.c:41:5: warning: symbol 'ncsi_get_filter' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/ncsi/ncsi-manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ne

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

2017-11-02 Thread Wei Yongjun
Fix to return a negative error code from thecxgb4_alloc_atid() error handling case instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +++- 1

[PATCH net-next] phylink: make local function phylink_phy_change() static

2017-11-02 Thread Wei Yongjun
Fixes the following sparse warnings: drivers/net/phy/phylink.c:570:6: warning: symbol 'phylink_phy_change' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/phy/phylink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH net-next] sctp: fix error return code in sctp_send_add_streams()

2017-10-31 Thread Wei Yongjun
Fix to returnerror code -ENOMEM from the sctp_make_strreset_addstrm() error handling case instead of 0. 'retval' can be overwritten to 0 after call sctp_stream_alloc_out(). Fixes: e090abd0d81c ("sctp: factor out stream->out allocation") Signed-off-by: Wei Yongjun <weiyongj...@huaw

[PATCH net-next] net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit()

2017-10-27 Thread Wei Yongjun
Remove platform_device_put() call after platform_device_unregister() from function bcmgenet_mii_exit(), otherwise, we will call platform_device_put() twice. Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Signed-off-by: Wei Yongjun

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

2017-10-27 Thread Wei Yongjun
. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c b/drivers/net/ethernet/aq

[PATCH net-next] net: hns3: make local functions static

2017-10-10 Thread Wei Yongjun
' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drive

[PATCH net-next] xfrm: Make function xfrm_dev_register static

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: net/xfrm/xfrm_device.c:141:5: warning: symbol 'xfrm_dev_register' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/xfrm/xfrm_device.c | 2 +- 1 fil

[PATCH net-next] net/mlx5e: Fix possible memory leak

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 'encap_header' is malloced and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: 232c001398ae ("net/mlx5e: Add support to neighbour update flow") Signed-off-by: Wei Yongjun <wei

[PATCH net-next] qed: Remove unused including

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove including that is not needed. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 1 - drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 1 - drivers/net/ethernet/qlogic/qed/qed

[PATCH net-next] ibmvnic: fix missing unlock on error in __ibmvnic_reset()

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Add the missing unlock before return from function __ibmvnic_reset() in the error handling case. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/

[PATCH net-next] xen/9pfs: p9_trans_xen_init and p9_trans_xen_exit can be static

2017-05-18 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warnings: net/9p/trans_xen.c:528:5: warning: symbol 'p9_trans_xen_init' was not declared. Should it be static? net/9p/trans_xen.c:540:6: warning: symbol 'p9_trans_xen_exit' was not declared. Should it be static? Sign

[PATCH] xen/9pfs: fix return value check in xen_9pfs_front_probe()

2017-05-16 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> In case of error, the function xenbus_read() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 71ebd71921e4 ("xen/9pfs: connect to the backend") Signed-off

[PATCH net-next] fib_rules: fix error return code

2017-04-26 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 622ec2c9d524 ("net: core: add UID to flows, rules, and routes") Signed-off-by: Wei Yongjun <weiyongj...@huawei

[PATCH net-next] drivers: net: xgene-v2: Fix error return code in xge_mdio_config()

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix to return error code -ENODEV from the no PHY found error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/apm/xgene-v2/mdio.c | 1 + 1 fil

[PATCH net-next] qed: fix invalid use of sizeof in qed_alloc_qm_data()

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 ins

[PATCH net-next] can: ti_hecc: fix return value check in ti_hecc_probe()

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT

[PATCH net-next v2] devlink: fix return value check in devlink_dpipe_header_put()

2017-04-11 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix the return value check which testing the wrong variable in devlink_dpipe_header_put(). Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> Acked-by: Jiri Pi

[PATCH net-next] devlink: fix return value check in devlink_dpipe_header_put()

2017-04-10 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix the retrn value check which testing the wrong variable in devlink_dpipe_header_put(). Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/core/de

[PATCH net-next] net_sched: nla_memdup_cookie() can be static

2017-02-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: net/sched/act_api.c:532:5: warning: symbol 'nla_memdup_cookie' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/sched/act_api.c | 2 +- 1 file changed,

[PATCH net-next] ipv6: sr: fix non static symbol warnings

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warnings: net/ipv6/seg6_iptunnel.c:58:5: warning: symbol 'nla_put_srh' was not declared. Should it be static? net/ipv6/seg6_iptunnel.c:238:5: warning: symbol 'seg6_input' was not declared. Should it be static? ne

[PATCH net-next] net/sched: act_mirred: remove duplicated include from act_mirred.c

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove duplicated include. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/sched/act_mirred.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 84682f0..af49c7d 100644 ---

[PATCH net-next v2] net: wan: slic_ds26522: Use module_spi_driver to simplify the code

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/wan/slic_ds26522.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --g

[PATCH net-next v2] net: wan: slic_ds26522: Remove .owner field for driver

2017-02-06 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/wan/slic_ds26522.c | 1 - 1 file changed

[PATCH net-next] lwt_bpf: bpf_lwt_prog_cmp() can be static

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: net/core/lwt_bpf.c:355:5: warning: symbol 'bpf_lwt_prog_cmp' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- net/core/lwt_bpf.c | 2 +- 1 file changed,

[PATCH net-next] cdc-ether: usbnet_cdc_zte_status() can be static

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/net/usb/cdc_ether.c:469:6: warning: symbol 'usbnet_cdc_zte_status' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/net/usb/cdc_ether.c |

[PATCH net-next] net: thunderx: Fix error return code in nicvf_open()

2017-01-11 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 712c31853440 ("net: thunderx: Program LMAC credits based on MTU") Signed-off-by: Wei Yongjun <weiyongj...@huawe

  1   2   3   >