Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Dan Carpenter
When I read the code, I just assumed desc was a pointer and it should have been: if (!desc) return NULL; For me, "if (rc) " is way more readable than "if (rc != 0) ". So readability could go either way depending on what you're used to, I suppose. It should definitely ==

Re: [PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning issue

2016-05-16 Thread Amit Ghadge
Hello Greg KH, I make patch same like other, I'm new and I nerver see changelog in other patches. Where to add changelog? I followed you are tutorial. Thanks, Amit Ghadge On Mon, May 16, 2016 at 08:34:55PM -0700, Greg KH wrote: > > A: No. > Q: Should I include quotations after my reply? > > h

Re: [PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning issue

2016-05-16 Thread Greg KH
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Tue, May 17, 2016 at 08:55:56AM +0530, Amit Ghadge wrote: > I check with "./scripts/checkpatch.pl --file --terse > drivers/staging/comedi/drivers/quatech_daqp_cs.c" and show the warning > message,

[PATCH] Drivers: hv: vmbus: fix the race when querying & updating the percpu list

2016-05-16 Thread Dexuan Cui
There is a rare race when we remove an entry from the global list hv_context.percpu_list[cpu] in hv_process_channel_removal() -> percpu_channel_deq() -> list_del(): at this time, if vmbus_on_event() -> process_chn_event() -> pcpu_relid2channel() is trying to query the list, we can get the general p

Re: [PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning issue

2016-05-16 Thread Amit Ghadge
I check with "./scripts/checkpatch.pl --file --terse drivers/staging/comedi/drivers/quatech_daqp_cs.c" and show the warning message, "drivers/staging/comedi/drivers/quatech_daqp_cs.c:646: WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" This patch reduced the warning message. On Mon,

RE: [PATCH v11 net-next 0/1] introduce Hyper-V VM Sockets(hv_sock)

2016-05-16 Thread Dexuan Cui
> From: David Miller [mailto:da...@davemloft.net] > Sent: Monday, May 16, 2016 1:16 > To: Dexuan Cui > Cc: gre...@linuxfoundation.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com; cav...@redhat.com

Re: [lustre-devel] [PATCH v3] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Drokin, Oleg
On May 16, 2016, at 2:51 PM, Lidza Louina wrote: > The lustre_msg_buf method could return NULL. Subsequent code didn't > check if it's null before using it. This patch adds two checks. > > Signed-off-by: Lidza Louina Acked-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/ptlrpc/sec.c

[PATCH v3] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 3 +++ drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 8 ++-- 2 files cha

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
On 05/16/2016 02:35 PM, Dilger, Andreas wrote: On 2016/05/16, 12:16, "James Simmons" wrote: This looks wrong - You return -EINVAL from sptlrpc_pack_user_desc, but then the caller checks "!desc". Desc will not be null, since you've returned -EINVAL. Actually 'if (!desc)' is equal to 'if (de

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Dilger, Andreas
On 2016/05/16, 12:16, "James Simmons" wrote: > >> This looks wrong - You return -EINVAL from sptlrpc_pack_user_desc, but then >> the caller checks "!desc". Desc will not be null, since you've returned >> -EINVAL. > >Actually 'if (!desc)' is equal to 'if (desc != 0). Yes it can be confusing. Ver

Re: [PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning issue

2016-05-16 Thread Greg KH
On Mon, May 16, 2016 at 11:04:31PM +0530, Amit Ghadge wrote: > Fixed a warning issue to use 'unsigned int'. > build warning? I don't see that anywhere in the build output. Please be specific. ___ devel mailing list de...@linuxdriverproject.org http://

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Patrick Farrell
James, No. You've got it backwards. 0 is false, any non-zero value is true. if(desc) would be equal to if (desc != 0). - Patrick On 05/16/2016 01:16 PM, James Simmons wrote: This looks wrong - You return -EINVAL from sptlrpc_pack_user_desc, but then the caller checks "!desc". Desc will no

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread James Simmons
> James, > > No. You've got it backwards. 0 is false, any non-zero value is true. > > if(desc) would be equal to if (desc != 0). Ah, you are right. Didn't get much sleep last night :-( > - Patrick > > On 05/16/2016 01:16 PM, James Simmons wrote: > > > This looks wrong - You return -EINVAL

Re: [lustre-devel] [PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread James Simmons
> This looks wrong - You return -EINVAL from sptlrpc_pack_user_desc, but then > the caller checks "!desc". Desc will not be null, since you've returned > -EINVAL. Actually 'if (!desc)' is equal to 'if (desc != 0). Yes it can be confusing. I recommend 'if (desc < 0)' instead to make it clearer wh

[PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning issue

2016-05-16 Thread Amit Ghadge
Fixed a warning issue to use 'unsigned int'. Signed-off-by: Amit Ghadge --- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c in

Re: [PATCH net-next v2 0/6] hv_netvsc: avoid races on mtu change/set channels

2016-05-16 Thread David Miller
From: Vitaly Kuznetsov Date: Fri, 13 May 2016 13:55:19 +0200 > Changes since v1: > - Rebased to net-next [Haiyang Zhang] > > Original description: > > MTU change and set channels operations are implemented as netvsc device > re-creation destroying internal structures (struct net_device stays).

Re: [PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning added missing 'int' in 'unsigned'.

2016-05-16 Thread Greg KH
On Mon, May 16, 2016 at 01:15:24AM +0530, Amit Ghadge wrote: > Signed-off-by: Amit Ghadge > --- > drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I can't take a patch without a changelog text in it. Please fix and resend.

[PATCH v2] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 ++ drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 9 +++-- 2 files cha

Re: [PATCH] staging/lustre/ptlrpc: Removes potential null dereference

2016-05-16 Thread Lidza Louina
On 05/13/2016 12:43 PM, Drokin, Oleg wrote: On May 12, 2016, at 6:33 PM, Lidza Louina wrote: The lustre_msg_buf method could return NULL. Subsequent code didn't check if it's null before using it. This patch adds two checks. Thank you for the patch, it looks good code-wise, but there are som

Re: [PATCH 6/6] Staging: comedi: Fix CHECK:Avoid CamelCase issue in daqboard2000.c

2016-05-16 Thread Ian Abbott
On 16/05/16 11:18, Ravishankar Karkala Mallikarjunayya wrote: This is a patch to the daqboard2000.c file that fixes up a issues found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/daqboard2000.c | 12 ++-- 1 file chan

Re: [PATCH 5/6] Staging: comedi: Fix WARNING issue in dt2801.c

2016-05-16 Thread Ian Abbott
On 16/05/16 11:18, Ravishankar Karkala Mallikarjunayya wrote: This is a patch to the dt2801.c file that fixes up a Block comments issues found by the checkpatch.pl tool. i.e. Block comments use a trailing */ on a separate line Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/st

Re: [PATCH] Staging: comedi: quatech_daqp_cs.c: fixed a warning added missing 'int' in 'unsigned'.

2016-05-16 Thread Ian Abbott
On 15/05/16 20:45, Amit Ghadge wrote: Signed-off-by: Amit Ghadge --- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index

[PATCH 6/6] Staging: comedi: Fix CHECK:Avoid CamelCase issue in daqboard2000.c

2016-05-16 Thread Ravishankar Karkala Mallikarjunayya
This is a patch to the daqboard2000.c file that fixes up a issues found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/daqboard2000.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging

[PATCH 5/6] Staging: comedi: Fix WARNING issue in dt2801.c

2016-05-16 Thread Ravishankar Karkala Mallikarjunayya
This is a patch to the dt2801.c file that fixes up a Block comments issues found by the checkpatch.pl tool. i.e. Block comments use a trailing */ on a separate line Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/dt2801.c | 84 --

Re: [PATCH 4/4] Staging: comedi: fix line over 80 characters issue in s626.c

2016-05-16 Thread Ian Abbott
On 12/05/16 07:59, Ravishankar Karkala Mallikarjunayya wrote: This is a patch to the s626.c file that fixes up a line over 80 characters issues found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/s626.c | 3 ++- 1 file chang

Re: [PATCH 3/4] Staging: comedi: fix type issue in s626.c

2016-05-16 Thread Ian Abbott
On 12/05/16 07:59, Ravishankar Karkala Mallikarjunayya wrote: This is a patch to the s626.c file that fixes up a type issues found by the checkpatch.pl tool. i.e Prefer kernel type 'u8' over 'uint8_t' Prefer kernel type 'u16' over 'uint16_t' Prefer kernel type 'u32' over 'uint32_t'

Re: [PATCH 2/4] Staging: comedi:Fix checkpatch issue in s626.c

2016-05-16 Thread Ian Abbott
On 12/05/16 07:59, Ravishankar Karkala Mallikarjunayya wrote: This is a patch to the s626.c file that fixes up a WARNING: Prefer 'unsigned int' to bare use of 'unsigned' found by the checkpatch.pl tool Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/staging/comedi/drivers/s626.

Re: [PATCH 1/4] Staging: comedi: Fix WARNING issue in s626.c

2016-05-16 Thread Ian Abbott
On 12/05/16 07:59, Ravishankar Karkala Mallikarjunayya wrote: This is a patch to the s626.c file that fixes up a Block comments issues found by the checkpatch.pl tool. i.e. Block comments use a trailing */ on a separate line Signed-off-by: Ravishankar Karkala Mallikarjunayya --- drivers/stag

Re: [PATCH] staging:comedi:Use unsigned int instead of unsigned

2016-05-16 Thread Ian Abbott
On 03/05/16 16:22, Nikita Eshkeev wrote: This patch fixed the checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Nikita Eshkeev --- drivers/staging/comedi/comedi.h | 2 +- drivers/staging/comedi/drivers/comedi_bond.c | 10 +++