Re: [PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-15 Thread David Miller
From: Vito Caputo Date: Sat, 12 Oct 2019 04:55:09 -0700 > + if ((copy = min(start - offset, len)) > 0) { As Eric said, we try to avoid this very construct these days. I'm not applying this patch. Thank you.

Re: [PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-13 Thread Eric Dumazet
On 10/13/19 3:41 PM, Vito Caputo wrote: > I read it, thank you for your responses. > > Do you have any guidance to offer someone wanting to contribute with 1-2 > hours available per day? I don't want to cause a nuisance, but would > like to help where I can. My flawed assumption was that

Re: [PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-13 Thread Vito Caputo
On Sun, Oct 13, 2019 at 01:17:18PM -0700, Eric Dumazet wrote: > > > On 10/13/19 1:01 PM, Vito Caputo wrote: > > On Sun, Oct 13, 2019 at 12:30:41PM -0700, Eric Dumazet wrote: > >> > >> > >> On 10/12/19 4:55 AM, Vito Caputo wrote: > >>> Eliminate some verbosity by using min() macro and

Re: [PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-13 Thread Eric Dumazet
On 10/13/19 1:01 PM, Vito Caputo wrote: > On Sun, Oct 13, 2019 at 12:30:41PM -0700, Eric Dumazet wrote: >> >> >> On 10/12/19 4:55 AM, Vito Caputo wrote: >>> Eliminate some verbosity by using min() macro and consolidating some >>> things, also fix inconsistent zero tests (! vs. == 0). >>> >>>

Re: [PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-13 Thread Vito Caputo
On Sun, Oct 13, 2019 at 12:30:41PM -0700, Eric Dumazet wrote: > > > On 10/12/19 4:55 AM, Vito Caputo wrote: > > Eliminate some verbosity by using min() macro and consolidating some > > things, also fix inconsistent zero tests (! vs. == 0). > > > > Signed-off-by: Vito Caputo > > --- > >

Re: [PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-13 Thread Eric Dumazet
On 10/12/19 4:55 AM, Vito Caputo wrote: > Eliminate some verbosity by using min() macro and consolidating some > things, also fix inconsistent zero tests (! vs. == 0). > > Signed-off-by: Vito Caputo > --- > net/core/datagram.c | 44 ++-- > 1 file

[PATCH] net: core: datagram: tidy up copy functions a bit

2019-10-12 Thread Vito Caputo
Eliminate some verbosity by using min() macro and consolidating some things, also fix inconsistent zero tests (! vs. == 0). Signed-off-by: Vito Caputo --- net/core/datagram.c | 44 ++-- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git