[PATCH net-next, v3, 1/1] hv_netvsc: introduce netif-msg into netvsc module

2015-04-27 Thread sixiao
From: Simon Xiao 1. Introduce netif-msg to netvsc to control debug logging output and keep msg_enable in netvsc_device_context so that it is kept persistently. 2. Only call dump_rndis_message() when NETIF_MSG_RX_ERR or above is specified in netvsc module debug param. In non-debug mode, in current

RE: [PATCH v2 0/6] Drivers: hv: vmbus: fair round robin algorithm for vmbus_get_outgoing_channel()

2015-04-27 Thread Dexuan Cui
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, April 28, 2015 1:04 > To: KY Srinivasan > Cc: Haiyang Zhang; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org; Dexuan Cui > Subject: [PATCH v2 0/6] Drivers: hv: vmbus: fair round robin a

RE: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

2015-04-27 Thread KY Srinivasan
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, April 27, 2015 7:57 PM > To: KY Srinivasan > Cc: net...@vger.kernel.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; > jasow...@redhat.com > Subject

Re: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

2015-04-27 Thread David Miller
From: "K. Y. Srinivasan" Date: Mon, 27 Apr 2015 18:14:50 -0700 > Commit commit b08cc79155fc26d0d112b1470d1ece5034651a4b eliminated memory > allocation in the packet send path. This commit introduced a bug since it > did not account for the case if the skb was cloned. Fix this bug by > using the p

RE: [PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

2015-04-27 Thread Dexuan Cui
> -Original Message- > From: devel [mailto:driverdev-devel-boun...@linuxdriverproject.org] On > Behalf Of K. Y. Srinivasan > Sent: Tuesday, April 28, 2015 9:15 > To: da...@davemloft.net; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; >

[PATCH net 1/1] hv_netvsc: Fix a bug in netvsc_start_xmit()

2015-04-27 Thread K. Y. Srinivasan
Commit commit b08cc79155fc26d0d112b1470d1ece5034651a4b eliminated memory allocation in the packet send path. This commit introduced a bug since it did not account for the case if the skb was cloned. Fix this bug by using the pre-reserved head room only if the skb is not cloned. Signed-off-by: K. Y

RE: [PATCH 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-27 Thread KY Srinivasan
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Monday, April 27, 2015 6:30 AM > To: KY Srinivasan > Cc: Dexuan Cui; Haiyang Zhang; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH 5/6] Drivers: hv: vmbus: distribute su

[PATCH v2 4/6] Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()

2015-04-27 Thread Vitaly Kuznetsov
We need to call init_vp_index() after we added the channel to the appropriate list (global or subchannel) to be able to use this information when assigning the channel to the particular vcpu. To do so we need to move a couple of functions around. The only real change is the init_vp_index() call. Th

[PATCH v2 1/6] Drivers: hv: vmbus: unify calls to percpu_channel_enq()

2015-04-27 Thread Vitaly Kuznetsov
Remove some code duplication, no functional change intended. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 51 +-- 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c i

[PATCH v2 0/6] Drivers: hv: vmbus: fair round robin algorithm for vmbus_get_outgoing_channel()

2015-04-27 Thread Vitaly Kuznetsov
Changes in v2: - Address Dexuan's review comments: PATCH 3/6: s,channel,primary_channel; PATCH 4/6: add a forward declaration instead of moving code around; PATCH 6/6: fix an off-by-one - Change the algorithm in PATCH 6/6: Instead of a simple round robin we first try to find a (sub)channel

[PATCH v2 6/6] Drivers: hv: vmbus: improve selection of an outgoing channel

2015-04-27 Thread Vitaly Kuznetsov
vmbus_get_outgoing_channel() implements the following algorithm for selecting an outgoing channel (despite the comment before the function saying it distributes the load equally): 1) If we have no subchannels return the primary channel; 2) If primary->next_oc is grater than primary->num_sc reset th

[PATCH v2 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-27 Thread Vitaly Kuznetsov
Primary channels are distributed evenly across all vcpus we have. When the host asks us to create subchannels it usually makes us num_cpus-1 offers and we are supposed to distribute the work evenly among the channel itself and all its subchannels. Make sure they are all assigned to different vcpus.

[PATCH v2 3/6] Drivers: hv: vmbus: decrease num_sc on subchannel removal

2015-04-27 Thread Vitaly Kuznetsov
It is unlikely that that host will ask us to close only one subchannel for a device but let's be consistent. Do both num_sc++ and num_sc-- with channel->lock to be on the safe side. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v2 2/6] Drivers: hv: vmbus: briefly comment num_sc and next_oc

2015-04-27 Thread Vitaly Kuznetsov
next_oc and num_sc fields of struct vmbus_channel deserve a description. Move them closer to sc_list as these fields are related to it. Signed-off-by: Vitaly Kuznetsov --- include/linux/hyperv.h | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux/hyperv

[PATCH 3/3] staging: comedi: serial2002: fix Coverity "Explicit null dereference"

2015-04-27 Thread H Hartley Sweeten
serial2002_setup_subdevices() initializes each subdevice based on the config read from the attached serial device. Part of this initialization is to setup the subdevice range_table_list for the non digital subdevices. The range_table_list is allocated only when a 'range' is passed to the functions.

[PATCH 2/3] staging: comedi: ni_nio_common: don't write non-existing caldac's

2015-04-27 Thread H Hartley Sweeten
ni_write_caldac() checks the boardinfo 'caldac' array to determine what caldac is used for a given 'addr'. It then calculates the 'bitstring' and number of 'bits' used to write a value to that caldac address. After checking the caldac array, if the number of bits is 0 there is no caldac associated

[PATCH v2 0/3] staging: comedi: Coverity fixes

2015-04-27 Thread H Hartley Sweeten
Fix a couple issues reported by Coverity. v2: change (1 << b_chans) to (1U << b_chans) in PATCH 1/3, at the request of Dan Carpenter. Added Ian Abbott's Reviewed-by to all patches. H Hartley Sweeten (3): staging: comedi: comedi_bond: fix 'b_mask' calc in bonding_dio_insn_bits() s

[PATCH 1/3] staging: comedi: comedi_bond: fix 'b_mask' calc in bonding_dio_insn_bits()

2015-04-27 Thread H Hartley Sweeten
'b_chans' may be a valud up to 32. 'b_mask' is an unsigned int and a left shift of more than 31 bits has undefined behavior. Fix the calc so it works correctly with a 'b_chans' of 32.. Reported-by: coverity (CID 1192244) Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-H

答复: [PATCH V2] staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1

2015-04-27 Thread Teddy Wang 王力强
The image->depth != 1 case means the image is color. The current driver only does 2d in mono color image. I think we can let the driver fall back to cfb_imageblit() currently. Then we implement the color image 2d later. If we don't do anything for color image, the color image will not be displa

Re: linux-4.1-rc1/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c:424: bad if test ?

2015-04-27 Thread gre...@linuxfoundation.org
On Mon, Apr 27, 2015 at 08:33:30AM +, David Binderman wrote: > Hello there Greg, > > Static analyser cppcheck says > >  [linux-4.1-rc1/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c:424]: > (style) Expression is always false because 'else if' condition matches > previous condition at

Re: [PATCH 5/6] Drivers: hv: vmbus: distribute subchannels among all vcpus

2015-04-27 Thread Vitaly Kuznetsov
KY Srinivasan writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Friday, April 24, 2015 2:05 AM >> To: Dexuan Cui >> Cc: KY Srinivasan; Haiyang Zhang; de...@linuxdriverproject.org; linux- >> ker...@vger.kernel.org >> Subject: Re: [PATCH 5/6] Driv

Re: [PATCH] staging: comedi: Return error if memory allocation fails

2015-04-27 Thread Dan Carpenter
On Mon, Apr 27, 2015 at 12:44:51PM +, Gujulan Elango, Hari Prasath (H.) wrote: > Should return ENOMEM if memory allocation occurs.There is a wrong code > jump here and this patch addresses this issue. > What? No, the original code is fine and this patch introduces a memory leak. regards, d

[PATCH] staging: comedi: Return error if memory allocation fails

2015-04-27 Thread Gujulan Elango, Hari Prasath (H.)
Should return ENOMEM if memory allocation occurs.There is a wrong code jump here and this patch addresses this issue. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/comedi/comedi_fops.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/stagi

Re: [PATCH] staging: rtl8192u: ieee80211: Silence sparse warning

2015-04-27 Thread Dan Carpenter
Can't we just export the tkip.c function? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: iio: Check return value and handle error

2015-04-27 Thread Gujulan Elango, Hari Prasath (H.)
Check the return value of function and handle error condition appropriately. Signed-off-by: Hari Prasath Gujulan Elango --- drivers/staging/iio/accel/lis3l02dq_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/l

Re: [PATCH V2] staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1

2015-04-27 Thread Sudip Mukherjee
On Mon, Apr 27, 2015 at 04:10:53PM +0800, Huacai Chen wrote: > If image->depth != 1, lynxfb_ops_imageblit() should fallback to call > cfb_imageblit(), not return directly. Otherwise it can't display the > boot logo. I think it is wrong. lynxfb_ops_imageblit() is the imageblit callback if 2D accele

linux-4.1-rc1/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c:424: bad if test ?

2015-04-27 Thread David Binderman
Hello there Greg, Static analyser cppcheck says  [linux-4.1-rc1/drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c:424]: (style) Expression is always false because 'else if' condition matches previous condition at line 422. Source code is   else if (pRaInfo->HighestRate> 0x0b)  

[PATCH V2] staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1

2015-04-27 Thread Huacai Chen
If image->depth != 1, lynxfb_ops_imageblit() should fallback to call cfb_imageblit(), not return directly. Otherwise it can't display the boot logo. V2: Coding style ajustment. Cc: Teddy Wang Cc: Sudip Mukherjee Signed-off-by: Huacai Chen --- drivers/staging/sm750fb/sm750.c |2 ++ 1 files

Re: [PATCH] staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1

2015-04-27 Thread Dan Carpenter
Please run scripts/checkpatch.pl over your patches. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel