Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440913 > unrolled thread

Re: [PATCH] mm: gup: Re-define follow_page_mask output parameter page_mask usage

Started byAndrew Morton <akpm@linux-foundation.org>
First post2016-07-11 23:20 +0200
Last post2016-07-17 02:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] mm: gup: Re-define follow_page_mask output parameter  page_mask usage Andrew Morton <akpm@linux-foundation.org> - 2016-07-11 23:20 +0200
    Re: [PATCH] mm: gup: Re-define follow_page_mask output parameter  page_mask usage Chen Gang <chengang@emindsoft.com.cn> - 2016-07-12 19:10 +0200
      Re: [PATCH] mm: gup: Re-define follow_page_mask output parameter  page_mask usage Michal Hocko <mhocko@kernel.org> - 2016-07-13 10:00 +0200
        Re: [PATCH] mm: gup: Re-define follow_page_mask output parameter  page_mask usage Chen Gang <chengang@emindsoft.com.cn> - 2016-07-17 02:20 +0200

#1440913 — Re: [PATCH] mm: gup: Re-define follow_page_mask output parameter page_mask usage

FromAndrew Morton <akpm@linux-foundation.org>
Date2016-07-11 23:20 +0200
SubjectRe: [PATCH] mm: gup: Re-define follow_page_mask output parameter page_mask usage
Message-ID<rTQMp-41w-9@gated-at.bofh.it>
On Sun, 10 Jul 2016 01:17:05 +0800 chengang@emindsoft.com.cn wrote:

> For a pure output parameter:
> 
>  - When callee fails, the caller should not assume the output parameter
>    is still valid.
> 
>  - And callee should not assume the pure output parameter must be
>    provided by caller -- caller has right to pass NULL when caller does
>    not care about it.

Sorry, I don't think this one is worth merging really.

[toc] | [next] | [standalone]


#1441596

FromChen Gang <chengang@emindsoft.com.cn>
Date2016-07-12 19:10 +0200
Message-ID<rU9m2-7TC-25@gated-at.bofh.it>
In reply to#1440913
On 7/12/16 05:17, Andrew Morton wrote:
> On Sun, 10 Jul 2016 01:17:05 +0800 chengang@emindsoft.com.cn wrote:
> 
>> For a pure output parameter:
>>
>>  - When callee fails, the caller should not assume the output parameter
>>    is still valid.
>>
>>  - And callee should not assume the pure output parameter must be
>>    provided by caller -- caller has right to pass NULL when caller does
>>    not care about it.
> 
> Sorry, I don't think this one is worth merging really.
> 

OK, thanks, I can understand.

It will be better if provide more details: e.g.

 - This patch is incorrect, or the comments is not correct.

 - The patch is worthless, at present.

 - ...

By the way, this patch let the callee keep the output parameter no touch
if callee no additional outputs, callee assumes caller has initialized
the output parameter (for me, it is OK, there are many cases like this).

Thanks.
-- 
Chen Gang (陈刚)

Managing Natural Environments is the Duty of Human Beings.

[toc] | [prev] | [next] | [standalone]


#1442138

FromMichal Hocko <mhocko@kernel.org>
Date2016-07-13 10:00 +0200
Message-ID<rUnfk-8tL-27@gated-at.bofh.it>
In reply to#1441596
On Wed 13-07-16 01:03:10, Chen Gang wrote:
> On 7/12/16 05:17, Andrew Morton wrote:
> > On Sun, 10 Jul 2016 01:17:05 +0800 chengang@emindsoft.com.cn wrote:
> > 
> >> For a pure output parameter:
> >>
> >>  - When callee fails, the caller should not assume the output parameter
> >>    is still valid.
> >>
> >>  - And callee should not assume the pure output parameter must be
> >>    provided by caller -- caller has right to pass NULL when caller does
> >>    not care about it.
> > 
> > Sorry, I don't think this one is worth merging really.
> > 
> 
> OK, thanks, I can understand.
> 
> It will be better if provide more details: e.g.
> 
>  - This patch is incorrect, or the comments is not correct.
> 
>  - The patch is worthless, at present.

I would say the patch is not really needed. The code you are touching
works just fine and there is no reason to touch it unless this is a part
of a larger change where future changes would be easier to
review/implement.

-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [next] | [standalone]


#1444966

FromChen Gang <chengang@emindsoft.com.cn>
Date2016-07-17 02:20 +0200
Message-ID<rVHYl-27u-5@gated-at.bofh.it>
In reply to#1442138
On 7/13/16 15:50, Michal Hocko wrote:
> On Wed 13-07-16 01:03:10, Chen Gang wrote:
>> On 7/12/16 05:17, Andrew Morton wrote:
>>> On Sun, 10 Jul 2016 01:17:05 +0800 chengang@emindsoft.com.cn wrote:
>>>
>>>> For a pure output parameter:
>>>>
>>>>  - When callee fails, the caller should not assume the output parameter
>>>>    is still valid.
>>>>
>>>>  - And callee should not assume the pure output parameter must be
>>>>    provided by caller -- caller has right to pass NULL when caller does
>>>>    not care about it.
>>>
>>> Sorry, I don't think this one is worth merging really.
>>>
>>
>> OK, thanks, I can understand.
>>
>> It will be better if provide more details: e.g.
>>
>>  - This patch is incorrect, or the comments is not correct.
>>
>>  - The patch is worthless, at present.
> 
> I would say the patch is not really needed. The code you are touching
> works just fine and there is no reason to touch it unless this is a part
> of a larger change where future changes would be easier to
> review/implement.
> 

OK, thanks. I shall try to find other kinds of patches in linux/include,
next.  :-)

-- 
Chen Gang (陈刚)

Managing Natural Environments is the Duty of Human Beings.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web