RE: [PATCH] intel: i40e: fix confused code

2015-10-20 Thread Nelson, Shannon
> -Original Message- > From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > Sent: Saturday, October 17, 2015 1:58 PM > Subject: [PATCH] intel: i40e: fix confused code > > This code is pretty confused. The variable name 'bytes_not_copied' > clearly ind

RE: [PATCH] intel: i40e: fix confused code

2015-10-20 Thread Nelson, Shannon
> From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > Sent: Tuesday, October 20, 2015 12:22 AM > > On Mon, Oct 19 2015, "Nelson, Shannon" wrote: > > >> From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > >> Sent: Saturday, October 17, 201

Re: [PATCH] intel: i40e: fix confused code

2015-10-20 Thread Rasmus Villemoes
On Mon, Oct 19 2015, "Nelson, Shannon" wrote: >> From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] >> Sent: Saturday, October 17, 2015 1:58 PM >> Subject: [PATCH] intel: i40e: fix confused code >> >> This code is pretty confused. The variable name

RE: [PATCH] intel: i40e: fix confused code

2015-10-19 Thread Nelson, Shannon
> From: Rasmus Villemoes [mailto:li...@rasmusvillemoes.dk] > Sent: Saturday, October 17, 2015 1:58 PM > Subject: [PATCH] intel: i40e: fix confused code > > This code is pretty confused. The variable name 'bytes_not_copied' > clearly indicates that the programmer knew

[PATCH] intel: i40e: fix confused code

2015-10-17 Thread Rasmus Villemoes
This code is pretty confused. The variable name 'bytes_not_copied' clearly indicates that the programmer knew the semantics of copy_{to,from}_user, but then the return value is checked for being negative and used as a -Exxx return value. I'm not sure this is the proper fix, but at least we get rid