[PATCH] wireless: ath: return error code upstream

2018-12-25 Thread Kangjie Lu
ath6kl_wmi_cmd_send could fail, so let's return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/net/wireless/ath/ath6kl/wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index

[PATCH] isdn: eicon: fix a missing check of api_parse

2018-12-25 Thread Kangjie Lu
api_parse can fail, and if it fails, we should not use the ss_parms which can be incorrect. The fix checks its return value and stops using ss_parms if api_parse fails. Signed-off-by: Kangjie Lu --- drivers/isdn/hardware/eicon/message.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-

[PATCH] net: marvell: fix a missing check of acpi_match_device

2018-12-25 Thread Kangjie Lu
When acpi_match_device fails, its return value is NULL. Directly using the return value without a check may result in a NULL-pointer dereference. The fix checks if acpi_match_device fails, and if so, returns -EINVAL. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |

[PATCH] tipc: fix a missing check of genlmsg_put

2018-12-25 Thread Kangjie Lu
genlmsg_put could fail. The fix inserts a check of its return value, and if it fails, returns -EMSGSIZE. Signed-off-by: Kangjie Lu --- net/tipc/netlink_compat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 6376467e78f8..764aa29

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Jason Wang
On 2018/12/26 上午12:25, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10

[PATCH] net: sfc: checks status of efx_mcdi_rpc

2018-12-25 Thread Kangjie Lu
efx_mcdi_rpc() could fail. The fix checks its status and issues an error message if it fails. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/sfc/mcdi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index dfad93fca0a6.

[PATCH] wan: fix a missing check of spi_write_then_read

2018-12-25 Thread Kangjie Lu
When spi_write_then_read() fails, "data" can be uninitialized and thus may contain a random value; the following execution checks "data" with a mask, the result could be random. The fix inserts a check of spi_write_then_read(): if it fails, always returns -1. Signed-off-by: Kangjie Lu --- drive

[PATCH] ethernet: atl1e: checking the status of atl1e_write_phy_reg

2018-12-25 Thread Kangjie Lu
atl1e_write_phy_reg() could fail. The fix issues an error message when it fails. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/eth

[PATCH] dsa: return error code upstream

2018-12-25 Thread Kangjie Lu
Both bcm_sf2_sw_indir_rw and mdiobus_write_nested could fail, so let's return their error codes upstream. Signed-off-by: Kangjie Lu --- drivers/net/dsa/bcm_sf2.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index

Re: thoughts stac/clac and get user for vhost

2018-12-25 Thread Jason Wang
On 2018/12/26 上午12:41, Michael S. Tsirkin wrote: Hi! I was just wondering: packed ring batches things naturally. E.g. user_access_begin check descriptor valid smp_rmb copy descriptor user_access_end But without speculation on the descriptor (which may only work for in-order or even a viola

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-25 Thread Jason Wang
On 2018/12/25 下午8:52, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06:09:19PM +0800, Jason Wang wrote: On 2018/12/25 上午2:12, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Jason Wang
On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:

[PATCH] ipset: fix a missing check of nla_parse

2018-12-25 Thread Kangjie Lu
When nla_parse fails, we should not use the results (the first argument). The fix checks if it fails, and if so, returns its error code upstream. Signed-off-by: Kangjie Lu --- net/netfilter/ipset/ip_set_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/netfilter/i

[PATCH] wireless: marvell: add checks for the return value of sysfs_create_group

2018-12-25 Thread Kangjie Lu
sysfs_create_group() could fail, so let's check its return values and issue error messages if it fails. Signed-off-by: Kangjie Lu --- drivers/net/wireless/marvell/libertas/mesh.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/w

[PATCH] sunrpc: remove redundant code

2018-12-25 Thread Kangjie Lu
If no bytes to decode, just use "xdr->p" instead of calling xdr_inline_decode to get it. The fix cleans up the code. Signed-off-by: Kangjie Lu --- net/sunrpc/xprtrdma/rpc_rdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xpr

[PATCH] sunrpc: fix a missing check of xdr_inline_decode

2018-12-25 Thread Kangjie Lu
xdr_inline_decode() could fail. When it fails, the return value is NULL and should not be dereferenced. The fix checks if xdr_inline_decode fails, and if so, returns. Signed-off-by: Kangjie Lu --- net/sunrpc/xprtrdma/backchannel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sunrpc/

[PATCH] net: stmicro: fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s

[PATCH] net: (cpts) fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/ti/cpts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.

[PATCH] net: brcm80211: add a check for the status of usb_register

2018-12-25 Thread Kangjie Lu
usb_register() may fail, so let's check its status and issue an error message if it fails. Signed-off-by: Kangjie Lu --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfma

Re: [PATCH 00/20] drop useless LIST_HEAD

2018-12-25 Thread Tom Psyborg
there was discussion about this just some days ago. CC 4-5 lists is more than enough On 23/12/2018, Julia Lawall wrote: > > > On Sun, 23 Dec 2018, Tom Psyborg wrote: > >> Why do you CC this to so many lists? > > Because the different files are in different subsystems. The cover letter > goes to

Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-25 Thread Sergio Paracuellos
On Tue, Dec 25, 2018 at 1:39 PM Andrew Lunn wrote: > > On Tue, Dec 25, 2018 at 12:45:11PM +0100, Sergio Paracuellos wrote: > > Hi David, > > > > On Mon, Dec 24, 2018 at 11:15 PM David Miller wrote: > > > > > > From: Sergio Paracuellos > > > Date: Sat, 22 Dec 2018 08:39:09 +0100 > > > > > > > Swi

thoughts stac/clac and get user for vhost

2018-12-25 Thread Michael S. Tsirkin
Hi! I was just wondering: packed ring batches things naturally. E.g. user_access_begin check descriptor valid smp_rmb copy descriptor user_access_end So packed layout should show the gain with this approach. That could be motivation enough to finally enable vhost packed ring support. Thoughts?

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: > > On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: > > > On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote:

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-25 Thread David Miller
From: Heiner Kallweit Date: Tue, 25 Dec 2018 09:30:45 +0100 > On 24.12.2018 23:23, David Miller wrote: >> From: Heiner Kallweit >> Date: Sun, 23 Dec 2018 15:00:26 +0100 >> >>> Currently we return immediately if callback config_init isn't defined. >>> This prevents the fixups from being executed

Re: [net-next 01/10] igb: reduce CPU0 latency when updating statistics

2018-12-25 Thread Ido Schimmel
On Thu, Dec 20, 2018 at 12:56:25PM -0800, Jeff Kirsher wrote: > This change is based off of the work and suggestion of Jan Jablonsky > . > > The Watchdog workqueue in igb driver is scheduled every 2s for each > network interface. That includes updating a statistics protected by > spinlock. Functio

Re: [PATCH net] net: phy: replace preliminary fix for PHY driver sometimes not binding to the device

2018-12-25 Thread Heiner Kallweit
On 24.12.2018 12:21, Heiner Kallweit wrote: > phy_device_create() uses request_module() to load the PHY driver module > based on the PHY ID of the device. There is some timing issue which > sometimes prevents the PHY driver to bind to the device. In such cases > the genphy driver is used what can c

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 06:09:19PM +0800, Jason Wang wrote: > > On 2018/12/25 上午2:12, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: > > > On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 11:42:18AM +0800, Jason Wang wrote:

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Michael S. Tsirkin
On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: > > On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: > > On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: > > > On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: > > > > On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote:

Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-25 Thread Andrew Lunn
On Tue, Dec 25, 2018 at 12:45:11PM +0100, Sergio Paracuellos wrote: > Hi David, > > On Mon, Dec 24, 2018 at 11:15 PM David Miller wrote: > > > > From: Sergio Paracuellos > > Date: Sat, 22 Dec 2018 08:39:09 +0100 > > > > > Switch bindings for spi managed mode are using spaces instead of tabs. > >

Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-25 Thread Sergio Paracuellos
Hi David, On Mon, Dec 24, 2018 at 11:15 PM David Miller wrote: > > From: Sergio Paracuellos > Date: Sat, 22 Dec 2018 08:39:09 +0100 > > > Switch bindings for spi managed mode are using spaces instead of tabs. > > Fix them to get a file with a proper kernel indentation style. > > > > Signed-off-b

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-25 Thread Jason Wang
On 2018/12/25 上午2:12, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:42:18AM +0800, Jason Wang wrote: On 2018/12/13 下午11:27, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Jason Wang
On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 11:57:35AM +0800, Jason Wang wrote: On 2018/12/13 下午11:44, Michael S. Tsirkin wrote: On Thu, Dec 13, 2018 at 06

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Jason Wang
On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at 10:43:03AM +0800, Jason Wang wrote: On 2018/12/13 下午10:31, Michael S. Tsirkin wrote: Just to make sure I unders

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-25 Thread Gal Pressman
On 25-Dec-18 01:12, Jason Gunthorpe wrote: > On Sun, Dec 23, 2018 at 06:42:20PM +0200, Gal Pressman wrote: >> On 22-Dec-18 01:52, Jason Gunthorpe wrote: >>> On Thu, Dec 20, 2018 at 09:12:43PM -0800, Joe Perches wrote: Care to submit a coding_style.rst patch or improve the one below this?

Re: [PATCH net] net: phy: fix phy_init_hw fixup handling

2018-12-25 Thread Heiner Kallweit
On 24.12.2018 23:23, David Miller wrote: > From: Heiner Kallweit > Date: Sun, 23 Dec 2018 15:00:26 +0100 > >> Currently we return immediately if callback config_init isn't defined. >> This prevents the fixups from being executed. I see no dependency >> between fixups and config_init, therefore ch

Re: [PATCH][V2] drivers/net: appletalk/cops: remove redundant if statement and mask

2018-12-25 Thread Sergei Shtylyov
On 24.12.2018 22:41, Colin King wrote: From: Colin Ian King The two different assignments for pkt_len are actually the same and so the if statement is redundant and can be removed. Masking a u8 return value from inb() with 0xFF is also redundant and can also be emoved. Removed. :-) Sim