Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-21 Thread Baoquan He
On 03/21/19 at 05:19am, William Kucharski wrote: > > > > On Mar 21, 2019, at 4:35 AM, Michal Hocko wrote: > > > > I am sorry to be snarky but hasn't this generated way much more email > > traffic than it really deserves? A simply and trivial clean up in the > > beginning that was it, right? Ye

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-21 Thread William Kucharski
> On Mar 21, 2019, at 4:35 AM, Michal Hocko wrote: > > I am sorry to be snarky but hasn't this generated way much more email > traffic than it really deserves? A simply and trivial clean up in the > beginning that was it, right? That's rather the point; that it did generate a fair amount of e

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-21 Thread Michal Hocko
On Thu 21-03-19 04:24:35, William Kucharski wrote: > > > > On Mar 21, 2019, at 3:21 AM, Baoquan He wrote: > > It appears as is so often the case that the usage has far outpaced the > documentation and -EEXIST may be the proper code to return. > > The correct answer here may be to modify the do

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-21 Thread William Kucharski
> On Mar 21, 2019, at 3:21 AM, Baoquan He wrote: It appears as is so often the case that the usage has far outpaced the documentation and -EEXIST may be the proper code to return. The correct answer here may be to modify the documentation to note the additional semantic, though if the usage i

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-21 Thread Baoquan He
On 03/21/19 at 02:40pm, Baoquan He wrote: > Hi all, > > On 03/20/19 at 05:58am, Matthew Wilcox wrote: > > On Wed, Mar 20, 2019 at 02:36:58PM +0200, Mike Rapoport wrote: > > > There are more than a thousand -EEXIST in the kernel, I really doubt all > > > of > > > them mean "File exists" ;-) > > >

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Baoquan He
Hi all, On 03/20/19 at 05:58am, Matthew Wilcox wrote: > On Wed, Mar 20, 2019 at 02:36:58PM +0200, Mike Rapoport wrote: > > There are more than a thousand -EEXIST in the kernel, I really doubt all of > > them mean "File exists" ;-) > > And yet that's what the user will see if it's ever printed wit

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Matthew Wilcox
On Wed, Mar 20, 2019 at 02:36:58PM +0200, Mike Rapoport wrote: > There are more than a thousand -EEXIST in the kernel, I really doubt all of > them mean "File exists" ;-) And yet that's what the user will see if it's ever printed with perror() or similar. We're pretty bad at choosing errnos; look

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Oscar Salvador
On Wed, Mar 20, 2019 at 05:22:43AM -0700, Matthew Wilcox wrote: > On Wed, Mar 20, 2019 at 01:20:15PM +0100, Oscar Salvador wrote: > > On Wed, Mar 20, 2019 at 04:19:59AM -0700, Matthew Wilcox wrote: > > > On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > > > > /* > > > > - * returns the

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Mike Rapoport
On Wed, Mar 20, 2019 at 05:22:43AM -0700, Matthew Wilcox wrote: > On Wed, Mar 20, 2019 at 01:20:15PM +0100, Oscar Salvador wrote: > > On Wed, Mar 20, 2019 at 04:19:59AM -0700, Matthew Wilcox wrote: > > > On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > > > > /* > > > > - * returns the

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Matthew Wilcox
On Wed, Mar 20, 2019 at 01:20:15PM +0100, Oscar Salvador wrote: > On Wed, Mar 20, 2019 at 04:19:59AM -0700, Matthew Wilcox wrote: > > On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > > > /* > > > - * returns the number of sections whose mem_maps were properly > > > - * set. If this i

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Oscar Salvador
On Wed, Mar 20, 2019 at 04:19:59AM -0700, Matthew Wilcox wrote: > On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > > /* > > - * returns the number of sections whose mem_maps were properly > > - * set. If this is <=0, then that means that the passed-in > > - * map was not consumed and

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Baoquan He
On 03/20/19 at 04:19am, Matthew Wilcox wrote: > On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > > /* > > - * returns the number of sections whose mem_maps were properly > > - * set. If this is <=0, then that means that the passed-in > > - * map was not consumed and must be freed. >

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Matthew Wilcox
On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > /* > - * returns the number of sections whose mem_maps were properly > - * set. If this is <=0, then that means that the passed-in > - * map was not consumed and must be freed. > + * sparse_add_one_section - add a memory section > + *

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Baoquan He
On 03/20/19 at 09:50am, Mike Rapoport wrote: > Hi, > > On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > > The code comment above sparse_add_one_section() is obsolete and > > incorrect, clean it up and write new one. > > > > Signed-off-by: Baoquan He > > --- > > mm/sparse.c | 9

Re: [PATCH 1/3] mm/sparse: Clean up the obsolete code comment

2019-03-20 Thread Mike Rapoport
Hi, On Wed, Mar 20, 2019 at 03:35:38PM +0800, Baoquan He wrote: > The code comment above sparse_add_one_section() is obsolete and > incorrect, clean it up and write new one. > > Signed-off-by: Baoquan He > --- > mm/sparse.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > d